Ellipsoid Factor Convergence


I am continuously using EF of BoneJ plugIn. However, I’m not sure to trust my outputs, even with high filling percentage. It takes long time to process my images, but with a slight change in input parameters I may get very different values (once 0.07 and the other 0.15) for Median EF, both with filling percentages above 85.

Is there any other output parameter, that we can check to make sure about the accuracy of our results?

And the other question is about median change and max changes reported as the algorithm convergence. Are they some kind of error reported for each iteration?

Thanks for your help.


1 Like

Thanks for having a go with Ellipsoid Factor! We really appreciate your feedback.

Please have a look at @alessandrofelder 's paper The plate-to-rod transition in trabecular bone loss is elusive (in proof at RSOS). It gives a nice background into what EF is doing.

Would you be able to share the parameters and some input data here? The best way to record your parameters is with the macro recorder, Plugins > Macros > Record… then post the output here.

The Flinn peak plot is usually very helpful (run a Gaussian blur and adjust the contrast), and it’s also worthwhile looking at the graphical output EF stack to inspect how ellipsoids have been fitted to your structure.

There isn’t a gold standard that you could use, unless you set up a synthetic image with similar scale and shape with a theoretically derived correct answer. The next best thing for this situation is to systematically vary your parameters (use a simple macro in a loop, maybe with a timer to check efficiency) and plot them against the output to look for a stable setting for your images. To speed it up you could use a smaller sub-image (e.g. 256³ instead of 1024³), provided there are sufficient features in it to fit ellipsoids to.


Dear Michael,

Thanks for your support and help.
The article you shared is very helpful, I have problems with analyzing Flinn peak plots, now I guess I can find the answer in this article. Right now, I don’t know how to use them to confirm my results.
Unfortunately, I didn’t record the macros for my trials (I appreciate suggesting it and will do that from now on), but I can share the original image I wanted to measure EF (uploaded as attachment):
SP8.tif (426.0 KB)

The other point is about median change reported in convergence algorithm of the last iteration. Sometimes this number is very close to the reported median EF. This makes me think that if this value is the possible variation in reported median EF, it means that my median EF can be even doubled. Is that how it works, or am I misinterpreting the algorithm?

Thanks for your help and guidance.


The two values represent different things.

  • median EF is the median pixel value of the EF image, and is a measure of the distribution of EF.
  • median change in EF is a measure of how much (in absolute value) the pixels changed from one “run” or “repetition” to the next, and so is a measure of algorithm convergence.

The number of runs is set by the user: the “Repetitions” parameter.
My experience is that the median change can be quite a lot after two runs (like ~0.4-0.5) but then drops down to very quite small median changes if you do 6 repetitions or so. The maximum change is ~0.1 after 6 runs in my experience, which we deem acceptable in the paper @mdoube mentioned. See Fig S2 in the paper!

Hope this helps!

1 Like

Thanks Alessandro,

In my case, for a 20-repetition run, here are the values:

median EF= 0.048
filling percentage= 94.192 %
number of ellipsoids found in total: 31011
median changn#last repetiotion=0.056
max changn#last repetiotion= 0.410

Do you think that the results with such a condition are converged and accurate?

And you are right, after first 4-5 repetitions, the median change is stabilized and max changes reduce slightly to the end.
So, in my understanding, stabilizing median change is more important than minimizing it. I haven’t read the paper thoroughly yet, for sure many of my questions are answered there.

I appreciate your help and support.


As @mdoube points out, we don’t have a gold standard for this (yet).

I would say that the max change that you report is slightly larger than I’d expect, but that may be fine.
I think it may be fine because the median change (which I interpret as “by how much does a pixel typically change from one repetition to the next?”) is small enough for me, and the stats like the median won’t be much affected by the outliers in the distribution.

You should keep the median change in mind when you do your further analysis though: say you are comparing median EF between osteoporotic and non-osteoporotic samples with some statistical test - you’d want the difference that you observe in median EF between these two groups to be >> 0.056 to be sure that you are not observing an effect of the stochasticity of EF - does that make sense?


Thank you Alessandro,

Yes, it perfectly makes sense. In terms of comparison, I should keep an eye on the median changes.

Thanks a lot for your helpful comments.


1 Like

Thanks for this, it’s very helpful. The geometry in the image looks well suited to EF analysis. I am a bit concerned that the feature size is small in relation to pixel spacing, which may mean that some features aren’t well fitted, or are missed altogether. The lower limit of feature size at which EF is expected to work well is 5-8 pixels. You could try Gaussian blurring (3D) and upscaling by 2× your input image prior to thresholding.

I had a go by scaling up 2× the binary image with no interpolation. Original on the left, upscaled on the right:
Screenshot from 2021-05-25 10-14-33

I expect that you will get better numerical stability in your results, and better modelling of the structure, if you upscale or otherwise get your features at a higher resolution (more pixels per feature).


We are happy to take suggestions on how to analyse them numerically! In the meantime, it is helpful to view the graphical output to see if you can observe a shift in points (each representing a unique pair of a/b and b/c axis ratios) from rod-like (top left) to plate-like (bottom right), usually passing through a boomerang-shaped distribution (convex to lower left). Dominant features often show up in a Gaussian-blurred Flinn plot as bright blobs, or a cluster of blobs.

1 Like

Thanks a lot, Michael.

Actually, I have considered independency of voxel sizes (resolution) for other features (e.g. connectivity, Tb.Th, …) based on different but not EF, unfortunately. So thanks for pointing this out.
I can regenerate the structure with a higher resolution to solve this problem.

About the Flinn peak ploy, which I think is the same as the weighted Flinn plot on your documentations, yes I can see the boomerang-shaped. As far as I understood, each point represents a fitted ellipsoid, located on its representing a/b and b/c rations:

Thanks a million for your help and support.


More precisely in the Flinn peak plot (the weighted Flinn plot) each point’s pixel value represents the pixel-wise count of a/b and b/c ratios. The program goes through all the pixels in the 3D output map, finds the ellipsoid(s) that best fit(s) that pixel, then adds 1 to the corresponding (a/b, b/c) coordinate in the Flinn plot.

Because bigger ellipsoids ‘win’ pixels, the bright spots in the Flinn plot tend to relate to dominant features’ biggest ellipsoids, and the bigger the feature the brighter the spot (because there are more pixels in bigger features). If you have a structure made of many similar features, for example a stack of plates, you might get just one bright spot in the Flinn plot which represents the frequency of the plate geometry (how much of the image is plate-like), but not the arrangement of the plates in space.

Thanks Michael,

I was not sure about the concept of EF for each point at first place. I went through your documentations mentioning:
“The EF at a point in the structure is determined as the EF of the most voluminous ellipsoid which contains that point.”, and your explanations now makes sense.

Thanks a lot for your kind support.