I want to extract HU values at each voxel from my CT scan files, which for I use the following command:
HU_Array = slicer.util.array(‘myfile.nrrd’)
However, using “nrrd” file I get the values at all voxels. I was wondering if there is a way that I can extract values in a specific area after segmenting?
Run either the maskvolume or Split Volume effect with your segmentaiton and then run your one liner.
MaskVolume will set all voxels out of segmentation are to 0 (or your value of your choosing). While SplitVolume will crop out everything outside of the segmentation area.
Thank you @muratmaga for your reply. Do you know how I can get " the coordinates of voxels" inside a specific segmentation, instead of the whole nrrd file?