Counting grid points using ROI manager in imageJ

I’m trying to figure out if there is a way I can use ROI manager in imageJ to count grid points (crosses) in three different selected regions of tissue. ROI manager will give me the area of the selected regions but how do I switch the area measurements to counting the grid points in that region?

Do mean something like this:

Not exactly. I’ve tried this method but it has been unsuccessful in rendering what I desire.

Dear @acamillek,

Unfortunately this reply is not enough for us to provide you with further help. Could you please describe how it is not what you would desire?

For some native support for nested regions of interest (points in rois for example) you could have a look at QuPath https://github.com/qupath/qupath/wiki/Counting-cells

If you want to draw points, and you’re inside a certain region within ImageJ, you’d still need a smal script to relate the points to the areas you have. Perhaps if you posted a .zip file that is the contents of the ROI Manager?

Best,

Oli

1 Like

Explaining a little bit, the example you attached (Counting Points Using a Grid) is similar to what I hope to be able to accomplish, but when I try to mimic the setup the attachment suggests it gives me an “0” or N/A for counting the gird crosses. My desire is to have ImageJ count the grid crosses in the area I select using the selection tool.
Overall, I would prefer to be able to select multiple areas on the same tissue which would give me three different calculations for grid crosses in those regions. I thought ROI Manager might be applicable for handling this since it allows me to select the different regions; now I just need it to count the crosses in those areas. My .zip file is: Brain regions example.zip (7.9 MB)

How can I get ImageJ to count the crosses in the areas selected?

Thanks.

You should have told us that the crosses are an Overlay and not part of the image pixel data.

To put all crosses to the ROI Manager you can use Image->Overlay->To ROI Manager.

In the ROI Manager you can switch the Overlay on and off with the “Show All” action.

The in my previous post mentioned count crosses action would work if you flatten the image (burn the crosses in the image), convert the image to 8-bit, then threshold the crosses, select you regions and make a particle analysis (for the crosses in that region only, restrict to a certain particle size to only count the crosses).

For your image something like this:

run("Flatten");
run("8-bit");
setAutoThreshold("Default");
//run("Threshold...");
setThreshold(0, 71);
makeRectangle(1312, 1856, 800, 632);//a rectangle selection!
run("Analyze Particles...", "size=50-Infinity show=Outlines display exclude summarize");

This is one method.

Of course you could also create a flatten image from the crosses only and then flatten the crosses in it’s own image and then apply the threshold and your before created ROI’s (selected in the original image and added to the ROI Manager) on the crosses image to count the region crosses.

1 Like

Thank you so much for your help. This worked out perfectly!