Making a black area transparent


I was hoping for some help measuring % Area fraction on a set of histological images. Essentially, I am trying to evaluate the OD of my stained tissue.

I am working on a composite image which is the result of multiplying an original RGB microscopy images with a second image, an ROI mask of a sub-region of interest created from the original image. This multiplied image contains a large black area surrounding the tissue of interest.

My ultimate goal is to threshold this composite image in order to quantify the % Area of pixels specifically in the tissue of interest within the ROI mask. Because the area outside of ROI mask is black, I am unable to get an accurate measurement of % Area within the ROI.

Is there a way to set all black (0 value) pixels in my original multiplied image to “transparent” so that after thresholding only pixels within the ROI are measured?

I have tried using the paste control>transparent-white and transparent-zero, however when I paste the image the black background is still present. I’ve also tried setting the background to transparent in Photoshop, however, this is not preserved when I open the image up again in ImageJ.

Any help on this matter would be appreciated. I may not have made myself clear and will gladly clarify any points.

If you threshold an image and select an area with the different ImageJ selection tools only the selected (and within only the thresholded part of the selection) area will be measured.

So create a selection from your mask (your Region Of Interest), e.g., with the Wand tool:

and transfer it to the ROI-Manager which can be used later for a measurement of the thresholded pixel selection of your “Composite” image :

Thank you very much for your response. This was very helpful :slightly_smiling: