How to find the change in length and/or area for each ROI in two images?

Hi everyone, I am analyzing the difference in each green fluorescent mitochondria from Image 1 to Image 2 (in the first image they appear very circular and in the second they are elongated).

Currrently, I am attempting to find the difference in area for each mitochondria by using Fiji. In both images, I use thresholding and “analyze particles” to determine the area of each fluorescent labeled mitochondria (there are about 126 mitochondria per image detected). I then determine the change is area (and whether there is significance) of each labeled mitochondria. My workflow is shown below.

// open file
open(“C:/Users/toral/Desktop/6_30 HAC15 30uM BDE_7-1 hi res.jpg”);
// convert to 8 bit image
// threshold (%0.15)
setAutoThreshold(“Default dark”);
//setThreshold(73, 255);
setOption(“BlackBackground”, true);
// Analyze particles
run(“Convert to Mask”);
run(“Analyze Particles…”, " show=[Count Masks] display add");
selectWindow(“Count Masks of 6_30 HAC15 30uM BDE_7-1 hi res.jpg”);

My question- is this the best way to find the difference between each mitochondria in the two images? Is there a more efficient way to do this?

I believe a more efficient way would be to only find the change in length (not area) for each mitochondria. However, I am very new to Fiji and image analysis and do not know where to start. Any help is appreciated and as always, thank you!

Sounds like you are looking for the options to change the measurements generated by ImageJ. By default any measurement gives the area and average intensity. You can change the measurement behaviour by going to ‘Analyze -> Set Measurements’. There you have the option to select additional measurement parameters such as ‘Shape descriptors’ and ‘Feret’s diameter’, which might be helpful.

A few additional comments:

  • For a start, I would strongly suggest to not save your images in jpeg format, but use a lossless data format instead - .tiff is probably the most common for multichannel fluorescent images.
  • I don’t think just converting the colour jpeg image to an 8-bit grey scale image and using a simple global threshold for the mitochondria segmentation is going to be the best approach. Using your macro on the first provided sample image (30um BDE) resulted in 94 particles, but many of the brighter mitochandria (green dots) appeared to have been fused into single particles. As the mitochondria markers are in the green channel, I would suggest to first split the image into separate colour channels (To try this, you can use Image -> Color -> Split channels. However, I assume that the different colour channels were acquired separately in the first place. This would be retained if the images were saved in .tiff format).
    Using ‘Process -> Find Maxima’ with Prominence > 20 results in a better separation of individual mitochondria and finds 117 maxima in the first sample image.
  • The situation in the second sample image (DMSO) gets more complicated as the mitochondria are more elongated and less separated. So, segmenting and counting individual mitochondria becomes far more challenging. I would suggest that you have a look in the literature and find out how other studies in this field have analysed these types of problems.

Good luck with the analysis,


Thank you for the response and tips! They were very helpful. I was able to use a .tiff image for my analysis. When I try to analyze particles, it still requires thresholding. Would this still be part of my workflow? My steps are below.

open(“C:/Users/toral/Desktop/Mitochondrial images/6_30 HAC15 30uM BDE_7-1 hi res.tiff”);
//splitting channels
run(“Split Channels”);
selectWindow(“6_30 HAC15 30uM BDE_7-1 hi res.tiff (blue)”);
selectWindow(“6_30 HAC15 30uM BDE_7-1 hi res.tiff (green)”);
selectWindow(“6_30 HAC15 30uM BDE_7-1 hi res.tiff (blue)”);
selectWindow(“6_30 HAC15 30uM BDE_7-1 hi res.tiff (green)”);
selectWindow(“6_30 HAC15 30uM BDE_7-1 hi res.tiff (red)”);
selectWindow(“6_30 HAC15 30uM BDE_7-1 hi res.tiff (green)”);
setAutoThreshold(“Default dark”);
//setThreshold(132, 255);
setOption(“BlackBackground”, true);
run(“Convert to Mask”);
//finding maxima with prominence > 20
run(“Find Maxima…”, “prominence=20 output=[Point Selection]”);
run(“Analyze Particles…”, " show=[Count Masks] display add");
//analyzing particles using feret’s diameter, area, and shape descriptors
selectWindow(“Count Masks of 6_30 HAC15 30uM BDE_7-1 hi res.tiff (green)”);
roiManager(“Select”, 0);

Using this, I was able to analyze 76 particles for the first image.
When I try to find maxima before thresholding, I have a hard time selecting where to adjust my threshold to. Therefore, I did the thresholding first. Not sure if this is the best way to do it.

Have you tried MiNA?

See here:

It’s specifically designed for this kind of analysis…


Okay, looks like the macro code you included is the direct output from the Macro Recorder. So, it is all a bit untidy (e.g. there is no real reason for all the selectWindow() commands that switch forwards and backwards between the images). Also note that the lines starting // are comments and don’t do anything.
If you have a multi-channel tiff file, you don’t really need to split the channels - you just need to make sure that your focus is on the right channel (in a macro, this can be done with Stack.setChannel(n))
If you use the ‘Find Maxima’ function, you also don’t need the Threshold. In your steps, you create a thresholded image and then use ‘Find Maxima’ on the thresholded image, which just finds all the already thresholded objects. You would get exactly the same result if you just run the ‘Analyze Particles’ on the thresholded image without the ‘Find Maxima’.

Here is some simplified macro code that illustrates the steps you might want to use if you wanted to use Find Maxima:

//Get name of image
//Set channel number of green channel of image; usually 2 for 3 channel colour images
//Find local maxima and create mask including all pixels within tolerance of local maxima
run(“Find Maxima…”, “prominence=50 output=[Maxima Within Tolerance]”);
//Analyse particles, create results table and add to ROI manager
run(“Analyze Particles…”, " show=[Nothing] display clear add");
//Select original image and show ROIs
roiManager(“Show All without labels”);

I am not saying that this is the best approach to analyse your images and I would really suggest that you look at the literature to see what is the standard in this field or perhaps consider using established tools like the one suggested by Matthieu. I would also suggest that you have a look at some of the ImageJ tutorials to make yourself more familiar with the basic image processing steps.

Good luck,