How to measure 3D volume's dimensions?

Operating system: Windows 10
Slicer version: 4.7.0-2017-09-21

Hi, I wanted to know how to measure the dimensions of the 3D volume data. For example the perimeter or mass.

Thanks in advance.

If you segment and make a model you can get volume and surface area. To get mass you’d need to know the density, which Slicer doesn’t store.

https://www.slicer.org/wiki/Documentation/Nightly/Modules/Models

Maybe you can give more details about what you are trying to do and we can give further pointers.

1 Like

You can get density (mean intensity of a volume in a selected segment) by Segment Statistics module. Segment Statistics also computes surface, volume, and other properties of segments. You need to use recent nightly version of Slicer and create segments using Segment Editor module.

but to know the overall mass of the segmented volume you’d still need to know the mapping from “signal” density to “mass” density which probably depends on many factors which may not be in the imaging data.

For CT, it is reasonable to neglect atomic number and assume all materials are density-scaled water. Density would be (1000+intensity)/1000 g/cc.

1 Like

Thanks Steve for your answer. Yes i was looking for that data as i want to compare the data size before and after decimation.
Thanks again for referring the doc.
Thanks for everyone’s answer as well.

Regards,

When using segment statistics, why does it generate 3 different values for volume in mm3 and cm3 per segment? Also, is there a way to compute maximum/minimum 3D diameter with any of the statistics modules? I know radiomics has it, but I guess radiomics is down…

There are several ways of computing these metrics. The main difference is what is the representation used (surface or volumetric) and if the entire segment is used or only the part that overlaps with the selected scalar volume.

Also, is there a way to compute maximum/minimum 3D diameter with any of the statistics modules?

Currently diameter computation is not offered by any of the Segment Statistics plugins.

SimpleITK’s LabelShapeStatisticsImageFilter can compute many kind of diameters and it is already available in Slicer. So, it would be just a matter of adding a few ten lines of code to run the segment’s labelmap representation through this filter and add outputs to the table. Would you be interested in working on this?

It should be back soon. You can monitor the status here. Maybe add a note there to show that you would like to get this up and working again (and maybe offer your help, if you can).

I want to compare a segmentation from an ultrasound image to that of a CT-image. Which of the three values is most accurate to use for this purpose?
Thanks

Is there a significant difference between the reported values?

Thank you Andras for getting back to me so soon.

First of all, the values are very different when I use my segmentation or segmentation preview as input (which I don’t understand).

Secondly, the different volumes (1 and 2, when I use segmentation preview) are respectively 3482,77 mm3 and 3449,25 mm3. Not the biggest difference, but since I will be comparing two different images, I need to make sure that the volume i am using is as accurate as possible and is calculated with the same input as the computed surface area.

Also, I noticed that earlier in this discussion topic, you’ve stated that it was not possible to compute the maximum/minimum 3D diameter. Is this still correct?

Until you apply an auto-complete effect (Grow from seeds, Watershed, etc.) current segmentation stores seeds and preview segmentation stores the final results. Apply the segmentation effect before quantification.

It does not matter which method you use (the difference is less than 1%), just choose one and use always that. If you primarily work with labelmaps (and use 3D surface for visualization only) then you may prefer labelmap based method; if you mainly work with surfaces then you may choose the volume computed from the generated surface.

Correct. It would not be difficult to implement something like this, but for arbitrary shapes, maximum/minimum 3D diameter is not a well-defined metric. How would you define maximum/minimum 3D diameter for your segmented objects?

You are right! this worked for me.

Thank you for your explanation.

I understand that it would be difficult for arbitrary shapes. However, it could also be interesting to know the maximum diameter in the three different axes or the average diameter in those three different axes. Is this possible with the current modules and extensions?

@Lottemarijn, the SlicerRadiomics extension (based on PyRadiomics) has maximum diameters implemented in the shape feature classes.

For class shape (describing 3D volumes) this is the maximum diameter in row (=saggital), column (=coronal) and slice (=axial) plane, as well as the maximum 3D overall.
These diameters are calculated on the 3D surface mesh, as the other shape features also work with this representation. This mesh is build-up from point that lie half-way between a voxel-center that is part of the segmentation and one that is not. Moreover, this class also implements volume and surface area calculated on the mesh (MeshVolume and SurfaceArea), as well as volum based on counting the voxels (VoxelVolume)

For class shape2D (describing 2D surfaces), equivalent features for 2-dimensional surfaces have been implemented. Instead of MeshVolume and VoxelVolume, there is MeshSurface and PixelSurface, respectively and instead of SurfaceArea, there is Perimeter. This also implements a maximum diameter, but it is just the one (2D).

1 Like

Hey Joost,

Thanks for responding to this topic.
I’ve tried to use the SlicerRadiomics extension for calculation these diameters, but the module doesnt function properly. When I press the “Apply” button, after selecting the input image volume and input region, the button changes to “Working…”. After this the program crashes.
Do you have a suggestion on how to solve this problem?

My apologies for this late reply,
There have been some updates to the extension, so it may work now. If not, can you share an anonymized image/mask so we can debug the issue?
Alternatively, you can also try to extract features using the PyRadiomics command line interface.