reading segmentation file from Slicer (NRRD) with multiple segments with SimpleITK shows Exception

Hi Andrey!

I totally get the workaround you propose it makes sense since having separate nrrd files for each segment will give SimpleITK easily recognizable nrrd headers. However I can’t implement it! I have about 900+ segmentations already from 3 different radiologists… so I couldn’t possibly do this by hand.

Last night I develop code that reads these multi-segment segmentations which in nrrd terms means a 4-dimensional array where the first index indicates the segment s (like this [s, x, y, z])

And generates a SimpleITK image with for each segment. I made sure that the metadata for each image was preserved so each image has its origin, spacing, direction, etc.

I wonder if there is a way for me to contribute this code ??
multi-volume nrrd (like in this case) seems to be a current limitation for sitk.ReadImage

Diego

2 Likes