Masking unwanted features from an image for analysis using ImageJ

Hello everyone,

I am trying to analyze a fluorescence image (mean gray value, standard deviation, etc.) excluding certain regions (marked in image-1). I tried to adjust the threshold to exclude those regions as they are generally either dark or super bright - but the threshold would also exclude some region of interest (image-2). I am wondering if there is any technique or plugin I can use to make manual masks or control the threshold.

Hello Sashank -

If manually marking the regions to exclude works for you (isn’t
too much work), you can do the following:

Mark the first region to exclude – i.e., select it as an ROI – and
then add it to the ROI Manager (e.g., using <CTRL-t>). Do this
with each region you wish to exclude. (The ROI Manager will
now contain all of the ROIs you added.)

Now run from the ROI Manager More >> OR (Combine).
You now have a single ROI made up of the regions you wish
to exclude.

Now run Edit > Selection > Make Inverse. The ROI
is now everything but the regions you wish to exclude. You can
now run Analyze > Measure (or <CTRL-m>). This will run the
measurements on this ROI – that is, on all of the image except
what you excluded.

As I understand your issue, no single pair of global bright / dark
thresholds excludes the correct regions. If it works to exclude
regions that are some amount brighter (or darker) than the area
of the image that they’re in, you could experiment with local
thresholding, Image > Adjust > Auto Local Threshold.

There are also some plugins that don’t ship with Fiji / Image that
you could try, for example, Dynamic Threshold. (I never tried it, so
I have know idea how – or whether – it works.)

Thanks, mm