Hi Kalle,
The code has a clue. The default value for the result entry is
NaN. If the ellipsoid fitting for a particle returns null, then
NaN is entered.
Check whether an ellipsoid is generated for each particle by
turning on the 3D output 'show ellipsoids' and one of the other
values, e.g. 'show axes'. If there are missing ellipsoids for some
axes then we have a culprit: ellipsoid fitting failed. Could you
please check that on your data.
I can see that there is another possibility in the ellipsoid
fitting class FitEllipsoid, which is that the radii are calculated
from eigenvalues, and maybe that maths is broken. If I remember
correctly the Petrov fit that BoneJ uses does not constrain the
result to an ellipsoidal quadric and other quadric surfaces may
result from the fitting, if the input data are not particularly
ellipsoidal in shape. That would be a strong hint that modelling
such particles as ellipsoids is inappropriate. See this for a list
of other potential quadric surfaces:
https://en.wikipedia.org/wiki/Quadric
Best regards,
Michael