Sholl Analysis (From Image): Quantification of Mitochondria

I am trying to analyze mitochondria using Sholl Analysis. I realize that this is not the intended purpose, but it works for what we need it to do. However, the problem is that when the shell intersects it will only count it as one intersection value. However, I need for it to count every pixel that has been segmented of a different color of the background. In a research paper, the authors had to customize the plugin to match what they wanted. I believe I could do this also if I only knew how to read the source code and type in what I wanted. Does anyone know how to do this? What part of the source code would need to be changed? What would I write in place to change it? (Maybe give line numbers with the source code so I can follow along). Thank you.

Hi @sjr07130,

That is perfectly fine. Sholl has been applied to all sorts of unexpected cell types and tissues (mammary gland, vasculature, thalloids, to name a few), so mitochondria distribution is not that unexpected.

It would be useful to know which paper, and exactly what was done. In cases like this, the most appropriate approach is to submit a pull request to the plugin repository (which I don’t recall being made): Even if the modifications fulfill a very specific niche that is not of general interest, we could still write a script that could be distributed with the plugin so that others can use it.

Anyway, In the Sholl Analysis plugin data is extracted using parsers. Currently, there are parsers for tabular data and images, but you could imagine implementing parsers for other data types. Let’s create one for your mitochondrial analysis! For now, I’ll assume your images are 2D, so we’ll focus on the ImageParser2D class, but the approach is comparable to ImageParser3D that parses image stacks, with the extra complexity of having to handle anisotropic 3D shells.

In the Sholl Analysis plugin, the 2D sampling occurs in three steps: 1) Compute the pixel locations of the sampling shell; 2) extract all segmented pixels at those locations and 3) extract the unique groups of 8-connected pixels from the pool in 2). If I understand correctly, you would like to suppress step 3), correct?

I am very skeptical of that idea. Detection of pixel-connectivity is what makes the plugin’s approach robust. Lots of effort were put into it so that it would be resilient to noise, and segmentation artifacts, but I’ll give you the benefit of the doubt, as I don’t know your data. Also, the current approach assumes 8-pixel connectivity, which arguably may not be always desirable. Options for other patterns (4/6-connected) were on my to-do list, I just never had time to implement them.

Anyway, assuming that you really want to bypass step 3: Step 3 is performed by the groupPositions() method. So you could, a) comment out this line to effectively suppress it or b) use one of ImageJ scripting languages (Python, Groovy, etc.) to override the method in a script, so that groupPositions() does not modify the input data int[][] points (i.e., the product of step 2) above). E.g., Something like:

protected Set<UPoint> groupPositions(int[][] points) {
    // see
    Set<UPoint> sPoints = new HashSet<>();
    for (i in 0..points.length-1) { sPoints.add(new UPoint(points[i][0], points[i][1], cal)); }
    return sPoints;

(Have a look at the Templates> menu in the Script editor for examples). Note that in addition, you’d need to decide whether to perform “spikeSupression()”, another sophistication of the plugin that mitigates spurious detection of intersections.

If this is a feature of broader utility, then I would urge you to create a new ImageParser and submit a pull request so that others can profit from it. In this case you would extend the ImageParser2D.class, overriding only the groupPositions method as per above. Here is a boilerplate to get you started:

 * Parser for 2D images, that ignores pixel connectivity and does not perform "spike supression",
*  i.e., considers every segmented pixel as a valid intersection.
public class ImageParser2DIgnoringConnectivity extends ImageParser2D {

	public ImageParser2DIgnoringConnectivity(ImagePlus imp, Context context) {
		super(imp, context);

	 * @param points the array of (x,y) coordinates of every segmented pixel found.
	 * @return the set containing intersection points, in this case the set of will
	 *         contain as many elements as {@code points}.
	protected Set<UPoint> groupPositions(int[][] points) {
		Set<UPoint> sPoints = new HashSet<>();
		for (int i = 0; i < points.length; i++) {
			sPoints.add(new UPoint(points[i][0], points[i][1], cal));
		return sPoints;

NB. I have not tested any of the above, you would need to validate it.


Thank you for the assistance. However, I did get their modified plugin to work. I was wrong, it was not looking at intesection points. Rather it was counting all the pixels of a particular color within the concentric rings. So Sholl is used, but the analysis is not. Sholl is just used to create the concentric rings. You could do this by hand in imagej by make binary command, use the sholl to create the rings and then overlay to ROI manager, generate an image histogram to get how many pixels are white to generate a probability map. It works, the modified plugin is just a simpler way to get the same thing done. Thank you sooo much, I’ll let you know if I have further questions about anything.


Hi Steve, I am Jun Zhang from UT Health San Antonio. I also want to analyze the mitochondria distribution. Could you share me with the modified plugin? or could you please let me know how I can get the plugin? My email is Looking forward to your reply, and appreciated you kind assistance. Thank you very much!

They have a specific application for FIJI, but you have to use CYTOO technology. Fig. 2D is what is generated and the cells that are triangular shaped is the CYTOO technology, very expensive. Then you need 2 stains for membrane and mitochondria.


Miro proteins coordinate mictrotubule and actin dependent mitochondrial transport and distribution.pdf (2.96 MB)

Hi Steve, Thank you very much for the reply! I have read their paper, and requested the plugin, but did not get reply. I will see whether I can find a way to do the analysis. Thanks again!

The G_Mo-Raw.class file is the plugin they used as it was created by the first author of that paper (probably no longer in the lab). You will have to play around with it as it has been a very long time since I’ve used it and no longer remember. The word doc file is another way to do it without the plugin, but that takes 10-15min per image, and if you have 50 images per condition, then you can do the math. It is more to give you an idea of what is going on as the plugin will not show you the concentric rings or what is going on, but will just generate the numbers. Once you get the plugin to work, you will appreciate how quick you can assess all you images (50 images = 1-2h). Best of luck.


(Attachment G_Mo_Raw.class is missing)

(Attachment Mitochondria signal counting protocol_MRT.docx is missing)

Hi Steve, thank you so much for the information! The two attachments were missing in your message. Could you please send them by email? My email is: If it is quite big, could you please upload again? Thank you!

Just sent email, hopefully that works. This forum wouldn’t allow me to send the designated file based on its extension.


Hi Steve, I received the files. Thank you so much! You really help me a lot!

@Jun_Zhang, @sjr07130 ,

I looked at the publication to know more about this “modified Sholl”. I looked at what was done on that citation:

Mitochondrial signal was quantified within shells radiating out from the soma (…) and the cumulative distribution of mitochondrial signal plotted per genotype.

This hints that at each sampling shell, the normalized sum of all pixel intensities was obtained. This type of plotting is a ‘radial profile’, and can be obtained in ImageJ by a plethora of means, see e.g., here for detailed explanations. It would be fairly straightforward to implement in the existing Sholl Analysis plugin, because (as you can imagine) the plugin is already aware of pixel intensities at sampled locations. (by posting the technical details above, I was hoping someone would have looked into it). Anyway… We just released an update to the plugin that implements such radial profiles and (respective cumulative distributions). Here is how it looks:

A couple of notes for future reference:

  1. You will have to subscribe to the Neuroanatomy update site
  2. The functionality is accessed through the “Plots” list of choices in the Sholl Analysis dialog
  3. The values retrieved are the integrated density (sum of all voxel intensities) along the sampling shell normalized to the perimeter/surface of the shell
  4. All other options in the plugin remain applicable. E.g., It is still possible to use repeated-measurements on each sample, ignore isolated voxels with 3D images, etc. You can read about all of these here
  5. You can also threshold the image. The profile will consider the original intensities but only those within the threshold limits
  6. I did not have the bandwidth to test things thoroughly. It would be great if you both could compare the results. It seems to be much faster than what you have reported, which could be a perk of the implementation or something else that got neglected


Go back to the message where I sent Jun the microsoft file. That file describes exactly what the plugin does (but just takes a little longer to complete the process).

FYI: Those files are not visible to forum readers. Usually any non-image (png/jpeg) images you attach (either via email or on the webpage) are not going to be considered. You can bypass this by appending a safe extension (e.g. ‘.txt’) to the filename. Alternatively, you can use a file sharing service. Make sure the original author of the file(s) agrees with the sharing, because they will be public once in the forum.

I have not been given permission to share that .class file, but happy to share what we found we could do with FIJI alone. I don’t believe it was copywritten, so there is no legal issues surrounding it, but should respect them. By the way, I left biological research, or the lab, because I was told to be unethical (I was told to lie about data) and because I refused, I never found any positive results and that lab environment became very toxic and so I left. So to be accused of being unethical in any way, is highly embarrassing and rude as I strive to maintain what is ethical. If you’re first approach was more of toward what you just told me, this would have gone over more smoothly. Don’t ever throw out accusations where you have no idea what people have been through. I know you’re not going to apologize… Here is the file giving instructions the long way on how to do what we did. You can test it out, but again we did not publish any results on this but does the same thing as the .class file. I just don’t know how to write code using java like the individual did that gave it to me.


Mitochondria signal counting.txt (1.73 KB)

There is a misunderstanding here. I was complaining about the fact that it is extremely silly that details of published methodology need to be hunt down by folks, 4 years on. I was complaining about the authors, editors and reviewers that thought making the methods accessible only “upon request” was a good idea. It is simply not (for the reasons I mentioned*). I had no intentions to offend anyone but the status quo. But it was an unsolicited rant, so yes, I do apologize. This is a discussion is about applying Sholl to the quantification of cellular organelles, and I deviated from it.

To make it clear: I don’t need access to the files. I created the Sholl Analysis plugin, and tried to make everything around it as accessible as possible, from the documentation, to the code, scripts, etc. It is a personal disappointment when my work gets used under different accessibility premisses.

*For others reading this: It was a mini rant about reproducible science, meanwhile removed because it triggered a toxic discussion. The original posts remains accessible on each post’s history.

Thank you for your apology and I also apologize for the misunderstanding. When “unethical” gets thrown around, I’m very sensitive to that as my whole career I’ve striven for what is ethical. I hope the text document makes it clear what our intentions were for the program. The Scholl Analysis works great for our intended purposes with respect to mitochondrial distribution that is all the plugin ever did but could do a lot more rings in 1 micron steps and taking far less time. I don’t like it when authors don’t respond and I believe I have a due diligence in this case to provide the program so it is more open. I can send it to you in a separate email if you want so you can see how it works, just not sure how to open and send in a text file then maybe you can make it more open for all. I’m not gonna flag this conversation. I deal with issues head on, not by flagging.