3D Manager Convex Hull measurement

fiji
3d
imagej

#1

Hi all and more specifically @ThomasBoudier,

I’m trying to calculate some of the convex hull measurements that I can get from the 3D Manager GUI just by script.

I found in the 3DObjectPopulation class all the other measurements but can’t find this one. Do you know how I could get those measurements ? (I’m especially looking for solidity).

Thanks !


#2

Hi @lguerard,

Thanks for using my library :slight_smile: . The convex hull computation is calling code from QuickHull3D. If you want to get the convexHull of an Object3D :

Object3D obj=population.getObject(i);
Object3D conv=obj.getConvexObject();

Hope this helps,

best,

Thomas


#3

Hi @ThomasBoudier,

Sorry for the delay in answering. So this getConvexObject() returns a Convex Hull object, is that correct ? Is there any way to calculate things like Solidity out of it ? I couldn’t find it in the API on the page you sent…

Thanks again ! :slight_smile:


#4

Hi @lguerard,

If I am not wrong solidity is the ration between volume and convex volume, there is no specific function to compute that but the code should look like this :

Object3D obj = population.getObject(i);
Object3D conv = obj.getConvexObject();
double solidity = obj.gtVolumePixels() / conv.getVolumePixels();

Hope this helps

Best

Thomas


#5

Sorry there is a typo in the code, should read getVolumePixels() , and the system does not allow me to edit it (body too similar :wink: )

Best

Thomas


#6

Hi !

Thanks a lot, I actually found it in the end with the getVolumeUnit() but result should be the same :wink:

Awesome tool by the way :wink:


#7

Hi @lguerard,

Thanks for your comment and happy to help :slight_smile:

Best,

Thomas