# 3D Shape plugin

Hello,

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!

Regards,

Sam

Hi,

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.

Best,

Thomas

3 Likes

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

Thanks for your message and for clarification!

Best regards,

Sam

Thanks Thomas for precision.
I was thinking the â€ś3D shapeâ€ť plugin in question was this one:

Are they related in some ways ?

Best,
David

Hi,

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.

Best,

Thomas

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?

Maria

Hi @mchar,

Thanks for the feedback, and glad to see that our work is useful . 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.

Best,

Thomas

1 Like

Hello,

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

Best,

Ludwig