Percent of ROI for given threshold?

So, I am very new to this software and downloaded it only to try to accomplish this one task:

I am working with nephrin stained images (green). Each image needs to be analyzed by selecting the Region Of Interest (ROI) and analyzing the PERCENTAGE of GREEN that has been customarily threshold-ed by ME. The point of this is to analyze how much of the nephrin has leaked out of the glomerulus and into the tubules. Again, the only way of quantifying this is getting a percentage of green “stuff” that is within the ROI, which can only be known by acquiring a threshold of everything OUTSIDE of the ROI.

If you are interested in helping me with this, please reach out to me if I need to further clarify.


Welcome to the Forum and the wonderful world of ImageJ!

So… let’s see about getting you some help.

Would you be able to post an image that show what you want to measure exactly? How are you setting your thresholds at the moment - what is your current workflow?

Also - do you have other channels to define the ROI and then measure your nephrin staining? In general - it is never really a good idea to use the signal you want to measure the intensity of to set the threshold for your ROIs… Check out this older Forum post that explains this issue with measurements of intensity involving a threshold on the same channel as the one being measured.

Here are some other super helpful links to get you started with ImageJ, Image Analysis, and Segmentation:

Hope this helps!

eta :slight_smile:

Thank you so much for the response!!!

Now, to answer your questions…

Here, you can see the original images plus my attempt at quantifying the percentage of thresholded amount of color within the ROI that I have drawn. I want to threshold the entire image but be able to adjust is accordingly so I can get a good representation of a percentage that is within the ROI. The method that I have been using is:
Upload original image. Split channels. Close all of the windows except for the split channel that is labeled as “green”, which is actually grayscaled. Draw the region of interest. Subtract background (reducing to an arbitrary number for each image (50) which I have seen to show a lot of inconsistency and I hate this method). Add threshold using more arbitrary numbers (33 for the top bar and 255 for the bottom). And then I click add to place it into the ROI manager. Then Ctrl+M to get the %Area of what is within the ROI.

I do believe this method is working, but I just have a feeling that something is still off about what I’m doing, plus there is very little consistency between images. I feel like a good idea would be to use an image with very low percentage of color within the ROI in order to create a “standard” for my thresholds.

Any and all help on this is very appreciated!!! I feel like it will only get more complicated from here, so if you have any major suggestions or questions, please feel free to call me (769)7nine8-0400.

Thank you again etarena!!!


So… let’s get you started.

FIRST - you should really work through at least the Segmentation in Fiji workshop (and slides) as I posted above. There are great tips in there to make your workflows more robust and reproducible. For example…

This is an obvious issue - the selection of ‘arbitrary’ numbers - especially in science. Any thresholding you do - you want to be consistent and should therefore be using auto-thresholding techniques. That is all discussed in the workshop I linked above.

SECOND - You would need to post here your original datasets (not snapshots/screenshots of them). That way - we have access to those raw images and can help you develop a more robust protocol - that’s the only way to really help you. Just discussing it is not enough - we need to test things out ourselves to get you the best advice.

So - start with the workshop… and once you’ve gone through it - you can try out a new workflow based on what you learned and then post it here along with some original images.

Sound like a good plan?!

eta :slight_smile:

1 Like

Thank you so much for the great advice and quick response! I will start working on the workshops. I will also add the original datasets that you will need when I am ready for more help!

Thank you again, I will be in touch soon…

Okay, so… I have read all of the available literature, including the workshops. I am getting close to finishing the “segmentation in Fiji workshop”, but so far I have noticed that the workflow that I have been using is: converting the image to 8 bit, then using the “invert LUT”, auto-thresholding. The problem is that I am still feeling a bit lost on the thresholding and how to appropriately acquire it in order to get the measurement I need. I have noticed that this project takes a lot of different disciplines (auto-threshold, segmentation) and I still haven’t seen anything that mentions taking an ROI and comparing that to everything thresholded throughout the entire image. I hope to finish that 2 hr workshop today and maybe that will help clear things up. But as of now, please be on standby because I don’t think I’ll be able to make it too far without you!


I finished the workshop. It was VERY helpful in getting me familiar with ImageJ. However, I am still lost on what I am doing and if I am even doing it right. I listed my steps in my previous response to you. After drawing my ROI and adding it to the ROI manager, I am still not convinced that the % area being measured is correct. Would really appreciate more of your help on this as I have a deadline! :scream:

Thank you again!!!


dear @moraydah,
if I’ve understood well your goal I think that a way to achieve your goal could be this one:

  1. set a threshold (following @etadobson suggestions)
  2. draw a roi
  3. add the roi to the manager
  4. analyse particles with only add to manager checked
  5. select all the ROIs founded
  6. combine them in a single ROI from roi manager more->OR(combine) menu
  7. click on add
  8. measure this new combined ROI (this would be your inside area thresholded inside the ROI you’ve drawn)
  9. deselect ROIs
  10. in set measurements set Limit to the threshold
  11. analyse->measure : this will give you all the area thresholded (inside and outside the ROI you’ve drawn before)

now you have the measurements of the inside area and the inside+outside area and you can calculate the ratio: inside/(inside+outside).

At the moment, I don’t have a fastest and quickest way to do the same but maybe someone else has better ideas.
If I was you I will write a little script that does all those steps beforementioned.

Hoping to being helpful,
Emanuele Martini

1 Like


This looks very close to what I’m trying to achieve!!! Will be trying this now! Thank you so much for taking the time to add your suggestion. VERY helpful.

I will upload my results and let you guys take a look! @etadobson

Thanks again y’all

1 Like

OKAY! We are definitely making progress… I believe.

So I followed both of your instructions. For the auto-thresholding, I used IsoData. And I think that’s perfect for the analysis I am trying to obtain (I think). Now Emanuele, I followed your instructions exactly. When I got to the “deselect” part, I don’t think anything changed when I pressed deselect. Everything within the ROI was still highlighted yellow. But despite this, I proceeded to the next step (analyze->measure) and came out with this:

Now, this definitely can’t be right. Because It’s clear that these particles are WAY more than I need thresholded. I the original image is attached below, plus the thresholded image.

Another update… Sorry for the spam!

Okay, so… I followed your instructions again. And I have a lot of questions/concerns. This time after pressing deselect, I finally got the measurement. It says 45% is for the inside+outside ROI and 94% for inside the ROI. Does this seem right to you? How is it possible that there is more % thresholded inside the smaller ROI as compared to the entire image? Should I be using a different preset for the auto-threshold parameter instead of IsoData? @etadobson

Also, just for clarification… In step 6 of your instructions, am I supposed to select ALL of the analyzed particles INCLUDING the original ROI (big, yellow circle) , or, do I just select everything except for the original ROI value (big, yellow circle) to be combined?

Furthermore, I got three different values:
Area: Mean: Min Max %Area MinThr Max Thr
1 78620 255.000 255 255 94.057 255 255
2 2212499 255.000 255 255 45.013 255 255
3 1195682 255.000 255 255 24.326 255 255

1 = the results from inside ROI
2 = the results inside+outside ROI
3 = the results from reopening the image, using IsoData auto-threshold, No ROI, and then analyze->measure (Limit to Threshold)

Again, I have a ton of questions but we can cross that bridge when I hear back from y’all!

Thank you again!