Hey Guys,
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.
Best
Multiply the number of voxels by the volume of a single voxel:
auto sp = image->GetSpacing(); double voxelVolume = sp[0]*sp[1]*sp[2];
Thanks for reply. I was thinking about something like this …
volume_in_voxels = labelGeometryImageFilter->GetVolume(labelValue); volume_in_cc = volume_in_voxels/(spacing[0]*spacing[1]*spacing[3]*1000)
But I am not sure that I am right … ??
That seems right.