Fiji 3D Object Counter vs MorphoLibJ

Hi everyone,

I have a binary image, already segmented, of a z=25 stack, of mitochondria. I’m looking at differences in shapes and volumes, and trying to quantify the in vivo range.

When using the FIJI pre-installed “3D Object Counter” plugin I get a very different result from when I use the plugin “Connected Components Labelling” from the MorphoLibJ collection. (3D Counter settings - size filter >10 voxels; MorphoLibJ settings - connectivity 6 and 16-bit result). It’s a binary image, with a voxel depth of 0.2663212, and pixel width/length of 0.0658941 microns., 3D Objects Counter retrieves 1137 objects while Connected Components Labelling retrieves 2109 objects. When I plot the Volumes retrieved by both, or the surface areas, the ranges are very different… A link for the image I’m using (25MB) is here (not sure if I could upload the file here…) if you want to replicate my data.

Can someone help me understand the differences in both methods (if there should be any!) and what I might be doing wrong?



Both libraries should give similar results, up to the parameter used.
The results can be different depending on the connectivity: using 6 connectivity usually results in more labels that using 26 (there are more possiblities to connect voxels to the same region).

When investigating with your image, I discovered a bug in MorphoLibJ… The “label size filtering” does not work for 3D image. If you want to remove regions smaller than 10 voxels, you can use binary -> size opening 2D/3D before CC Analysis.

But I could find same results. You can try the following with MorphoLibJ:

  1. Open the binary image
  2. Apply size filtering ('MorphoLibJ > Binary > Size Filter 2D/3D", with value 11 (minimal value to keep).)
  3. Apply MorphoLibJ > Binary > Connected Component Labeling, with Connectivity 26 and 16-bits images.
  4. Apply MorphoLibJ > Kill Borders,
  5. Use MorphoLibJ > Label Images > Remap Labels
  6. Compute histogram : you should obtain 1337 objects.

[edit]: I just read the doc of 3D OC, and the algorithm corresponds to the 26 Connectivity. Also, there is a “Exclude objects on edges” option, that I suppose was checked in your case.

Hope this helps?

1 Like

Hi @dlegland,

Thanks for your explanation. It’s good to know how to do the size filtering before Connected Component Labelling, and I guess it should be similar to perform it before the 3D reconstruction as you suggest.

In your step 3, I guess you mean Binary > Size Filter 2D/3D - used Binary > size opening 2D/3D, right? I cannot find any “Size Filter 2D/3D” under “Binary”.

And now, indeed I get the same numbers of objects. The sizes are not exactly the same, but differ only slightly. This has quite helpful.

One more quick question: after mapping my labels ( Fire LUT assigned to volume), is there a way to get a scale bar for the LUT used, with the corresponding volume scale?

Thanks once again!