I am quite new in ITK. I implemented using LabelGeometryImageFilter.
I extracted label volumes. Output results are in voxels.
I would like to convert to cc`3 or mm^3.
Could you help me how I can do that ?
What is the best way ?
I would be appreciate for any help.
Multiply the number of voxels by the volume of a single voxel:
auto sp = image->GetSpacing();
double voxelVolume = sp*sp*sp;
Thanks for reply.
I was thinking about something like this …
volume_in_voxels = labelGeometryImageFilter->GetVolume(labelValue);
volume_in_cc = volume_in_voxels/(spacing*spacing*spacing*1000)
But I am not sure that I am right … ??