Is it possible to have ImageJ do histology analysis automatically?


I have been using ImageJ to count central nucleation (manually) in muscle tissue that has been stained with Hematoxylin and Eosin. However, I am looking to see if this can be done automatically with ImageJ OR if there is a different software that can do this.

I am also looking to measure the diameter and surface area of each cell. Is it possible for ImageJ or another software to do this? I have been looking around but can’t seem to find any.

An example image of the cells I am quantifying is below:

TKOD2_7106 TA 20X-2.tif (4.0 MB)


The quick answer for ImageJ is ‘yes’.

There are multiple ways to carry out Segmentation in ImageJ … here are some helpful links to get you started:

If you want to automate a workflow - carrying it out on multiple images in a folder for example - then you’ll need to have a go at scripting:

For your case - I’m not exactly sure what you need to segment. The little blue dots in the cells? Based on your images… I would take a look at TWS plugin that I linked above. But if you provide a more detailed explanation of what exactly you need to segment and then measure - we can better help get you started.

Hi, for full flexibility Fiji is a very good solution. I also think TWS is a good idea or in case you consider also commercial alternatives, ZEN Intellesis will do the job as well (can be also scripted via Python).

A quick shot yielded in this:

I did something similar in QuPath a while back with another user. The biggest two problems I recall running into were nuclei on the very edge of the cell being much smaller than centrally located nuclei, and sometimes merging in with the strong hematoxylin border of the cell, and some of the cells essentially overlapping at the resolution the image was taken. Sebi’s image in the lower left and upper right looks very similar to what I was seeing. You may want to make sure some sort of watershedding or splitting based on circularity is available as a feature, whatever you choose.

Thank you for your quick replies. I will look into these options. Regarding segmentation, I would be segmenting the separate cells to measure the surface area of the entire cell. I would not be measuring the nuclei size but would be counting to see if there is a nuclei in the center (as you can see some do and some don’t). I have been doing this part manually already Is there a plugin that can do this automatically? I am not concerned with nuclei on the edge or the number inside the cell. I am only concerned with is there a nucleus in the cell that isn’t on the border (Yes or No). Finally, is there a plugin to measure the cell diameter or would that have to be scripted?

If you are in ImageJ or QuPath you can use the Feret diameter, it is one of the Measurements available (not on by default) when you Analyze Particles.

And unless you have a Z stack, you could get the cross sectional area, but I doubt you would be able to get the surface area of the entire cell of a muscle cell. Just want to be clear we are talking about the same thing! Nuclei in the center are a bit easier, but the sum total of what you want to do is a bit more complex and I’d leave it to someone else to figure out how to link all of the steps together :slight_smile:

To add to the fun, it looks like you might have the diaphragm set too tight/small on the light arm of your microscope, as I can see darkened areas at all four corners. If you are doing any kind of simple thresholding, dark areas tend to be problematic since they show up as all colors. The scale bar could also be problematic and should not be included in any image with automatic processing.

For the actual area, you would want to set the metadata in ImageJ using the Image->Properties. Once you have the pixel sizes, I think most areas should be generated in um^2 or some similar unit. The TIFF provided doesn’t seem to have pixel size metadata included. You might also be able to estimate it back in using the scale bar.

Most pixel classifiers (Weka might be an option if you are using ImageJ) should get you semi decent, though not perfect data (same errors as mentioned above, circled in blue here), with that kind of image. You can see why I would draw the area of interest to avoid the corners, though :slight_smile:

*TLDR: The more automation you want, the better your original images tend to need to be. Or you need a lot of them (Deep learning). Human brains are still pretty good at providing context. Sometimes not as good as they believe, though…