I segmented two prostate lesions in Slicer and saved the segmentation as NRRD.
I am trying to read this file using SimpleITK but I am getting the following error message:
File "/Users/odin/anaconda/lib/python2.7/site-packages/SimpleITK/SimpleITK.py", line 8332, in ReadImage return _SimpleITK.ReadImage(*args) RuntimeError: Exception thrown in SimpleITK ReadImage: /scratch/dashboards/SimpleITK-OSX10.6-intel-pkg/SimpleITK/Code/IO/src/sitkImageReaderBase.cxx:285: sitk::ERROR: Only Complex image with float and double are supported!
However I can perfectly read segmentation files with one segment. Is this a limitation of the current version?
When looking at the NRRD headers:
dimension = 4 sizes= [2, 41, 80, 9] kinds=['complex', 'domain', 'domain', 'domain']
So I know I have my two segments there (first index of sizes gives the number of segments) and that actually matches with the data array.
Does anyone know about this problem?