3D Shape plugin


I am using the 3D shape plugin to measure various attributes of 3D images. I need to find the defintion of the attributes:

  • Compactness
  • Sphericity
  • Elongation
  • Flatness
  • Spareness (sparseness?)

There are various definitions in the literature. Thanks for any useful hint!




As you pointed out, the definitions in the literature are various, so it is difficult to have unambiguous definitions.

Usually, the book of Russ (“The Image Processing Handbook”) is a good start and contains usefull references.

Some definitions that appear rather consensual:

  • “Sphericity” is often defined as a ratio of V^2/S^3 up to a constant, similarily to circularity in 2D
  • “Compactness” or “Convexity” is usually ratio of volume divided by volume of convex hull
  • “Elongation”, “Flatness” are usually based on ratio of lengths of the equivalent ellipsoid obtained after applying principal component analysis.

The best is to recall the definition of the parameters used before interpreting them.

Thanks for your reply. I did look in the Image Processing Handbook, however there are still some ambiguities. For example Russ defines a “sparseness” whereas the plugin returns a “spareness”. I wonder if this is a typo or a different parameter altogether.

I was wondering if there is a way to access the source code and find out how these parameters are calculated? Thanks for your suggestions.

Best regards,

I am not aware of spar(s)ness parameter…

You can try to extract sources from the jar file. Sometimes (not always…), they are packaged together with the classes into the jar.

Be aware also that some parameters may be measured by different ways. For example surface area can be estimated by computing a triangular mesh, or by computing intersections with lines. Depending on the method, you also get different results for sphericity…

Hi @sambayat and @dlegland,

It is indeed sometimes difficult to find a consensus of the names of shape descriptors, I will be happy to rename the descriptor if it can be useful.
The definition of the descriptors :

  • Compactness : ratio between volume square and surface power 3, to be precise 36.PI.VolVol / surfsurf*surf, volume and surface are computed in calibrated unit

  • Sphericity : just compactness power 1/3 (cubic root) of compactness

  • Elongation : ratio between radius first axis of ellipsoid and second axis

  • Flatness : ratio between second axis of ellipsoid and third axis

  • Sparseness (sorry for typo) : ratio between volume of ellipsoid and volume of object

Hope this helps, the code is freely available on my github.




And a lot of ideas came from the excellent plugin BoneJ .

Thanks for your message and for clarification!

Best regards,


Thanks Thomas for precision.
I was thinking the “3D shape” plugin in question was this one:

Are they related in some ways ?



Actually I talked to the developer of 3D Shape plugin some years ago about how to implement the convex hull computation. I was referring to my plugin 3D analysis, part of the 3D ImageJ Suite. But I guess results should be quite similar between the two plugins.



Hello, @ThomasBoudier,

My congrats for the useful plugin!
I was wondering how can someone interpret the “sparseness” parameter. The smaller the value <1 is for more “dense” data?
And… elongation parameter is like Aspect Ratio from Feret diameter or am I getting this wrong?

Thanks for your time,

Hi @mchar,

Thanks for the feedback, and glad to see that our work is useful :slight_smile: . About sparseness closer to 1 means object looks like an ellipsoid, and is quite compact; lower values may refer to less compact object. I would not talk about dense object as dense is more related to points distribution. And yes elongation is the ratio between main and second axis, and in 2D you can compute these two axes with Feret diameter.



1 Like


I am currently working with the 3D Manager and i am trying to get a lot of information about pores in a 3D structure. Does somebody know how they compute the “3D Moments”? Would be very helpful. Thank you for your help