Ellipsoid Factor - BoneJ



Hi All,
I’m getting wildly inconsistent results with the Ellipsoid Factor plugin in BoneJ when running it on the same image stack, despite having altered a number of the adjustable parameters in an attempt to solve this. Is there any specific parameters that might be causing the problem? or that need to be controlled explicitly, i.e. apart from the automatic settings? Would be grateful for any input as this is for my masters project and I’d like to sort it out as soon as possible.


Dear Ciaran,

The appropriate set of input parameters for Ellipsoid Factor depends to an extent the data (in particular the relation between feature size and voxel size) and how your preprocess it, as far as I can tell. Can you tell us what your images look like and how you pre-process them?

A minimal example may help - could you post a link to one image and specify which parameters you have tried on it? This would also help us improve EF.

As you may already know, the meaning of all the input parameters is detailed on the BoneJ website. Note that the ImageJ Log window always tells you the percentage of trabecular bone that EF managed to fill. Could that explain the variation in your results?

There is a BSc student in our group who has used EF a bit and found the input parameters to get consistently high-percentage ellipsoid filling on trabecular data from mice. I have asked her which parameters she used, which may give you an idea, and I will post them as a rough guideline here once I have them - but again this is just what worked in a specific situation and may not work in yours.

A priori I would say increasing the number of vectors sampled (input parameter Vectors) and reducing Skeleton points per ellipsoid (not below 1, maybe 1 or 5 could work) will lead to a more dense sampling of ellipsoids and therefore more accurate results. Also, ensure the sampling increment is < you pixel size in mm!

I am currently working on an improved version of EF (for BoneJ2) which should be less sensitive to this kind of issue - but that will only be available in a month or so, which I expect is too late for you :confused: - sorry.

I hope this helps nevertheless… Do not hesitate to ask more questions about EF here - @mdoube or I will do our best to answer them.



Hi Alessandro,
I’m using 16-bit TIFFs of a cubic ROI with only Trabeculae in them from microCT scan data (I’ve (hopefully) attached an example here >>)view000. I then obviously run the ‘Optimise Threshold’ function in BoneJ before running the EF function. The relative resolution (Trab.Th/Pixel Size) ranges between 4.66-7.23.

From what I remember the percentage of the trabecular bone EF filled was fairly consistent. I have tried reducing Skeleton points per ellipsoid (both 2,5 and 10) and vectors sampled (up to 200 from 100) and they didn’t seem to have a significant effect. I’ve checked all my absolute resolutions are larger that the sampling increment. Also, weirdly the weighted Flinn plot seems comes up blank (just a black box).

(Another thing I’ve noticed is that the histogram and accompanying summary statistics seem to sample the EF stack per slice and therefore have a much higher count than the number of ellipsoids present in the 3D structure. I’m not sure if I’m missing something here but surely that would create a bias towards those ellipsoids that appear in more slices, either because of their geometry or orientation.)

If there’s anything else that I can provide that would help please ask.
Thank you for the help,


Hi Ciaran,

Unfortunately, I don’t think you’ve managed to attach an example image? If you could try again through other means (post a link to a dropbox or google drive, or worst case via e-mail (afelder@rvc.ac.uk)?), I would be happy to try to reproduce your problem. Could you report the versions of ImageJ and BoneJ you are using?

Two small things that may help in the meantime (you may already have tried them):

  1. When you run analyse > histogram, it should give you the option to check stack histogram, which should then analyse the stack as a whole. Is that the case? More details in this previous post by Michael.

  2. This is a very speculative thought and may be completely wrong: are you sure the weighted Flinn plot is completely black (as in contains only pixels with value 0) or could it be that you’re not seeing anything because the contrast settings are somehow messed up? You can check this by playing with the Brightness and Contrast tools (Image > Adjust > Brightness and Contrast) after selecting the weighted Flinn Plot.

Hope this helps - let me know how you get on!



Hi Alessandro,

The advice about the Flinn plot worked so thanks for that! I’m already running the histogram for the whole stack so that’s not whats causing the problem. Hopefully, this link works >> https://drive.google.com/open?id=1YEQMRsniOejtLTz0Sw4ycWjRKkn0fSRA , it should go to a google drive folder with the all of the TIFFs for one of my samples.

Thanks again,


Hi Ciaran,

I’ve run EF a few times on your sample data with the following parameters:

I get more or less consistent results, and consistent, but not very satisfying filling percentages (~50%):


The mean EF does vary a bit (but way less that StdDev) - is this the sort of result you are getting too? Maybe varying the parameters more may help (have you tried vectors=1000)? I don’t know…

EF works in the same way as Trabecular Thickness in the sense that the EF at any foreground pixel is given by the largest (in volume) ellipsoid (in Tr. Th. it is the largest sphere) that covers that pixel - so in some way a larger ellipsoid will have more “weight” than a smaller one - is this what you are worrying about or have I misunderstood your question?



Hi Alessandro,

The my results are now turning out pretty consistent with those parameters too, so thank you. With regards to my other question, it was more to do with whether EF is recorded independently for each image in a stack or whether it takes into account the 3D nature of the ellipsoids? As it seems that if done independently per image that this would produce biases.

All the best,


Hi Ciaran,

I’m glad I could help.

If you don’t mind, I would like to emphasize a point again: please make sure to report your filling percentages and the input parameters you used in your methods and results: I don’t know what you get, but I would recommend playing with the parameters enough to get fill percentages ideally >90% for the EF distribution to be representative of your sample. Otherwise there will be a lot of foreground voxels that do not have an EF.

This is related to your question: The ellipsoids are in 3d and therefore not per slice, and EF is calculated per foreground voxel: so the histogram is showing you the EF values for each foreground voxel in the stack, and, as long as your have isotropic scan, it will not matter whether it is calculated per slice.

Hope this helps!