Hey guys… what up?
I am working with PyRadiomics in some python scripts and I saw that the examples use SimpleITK for leading the images into the processing pipeline… I’ve tried doing the same with whole ITK pack (imread() function),
but it dioesn’t work propperly…
the problem sounds to be that PyRadiomics input images HAVE TO BE SimpleITK::ImageType… and if I use a ITK::ImageType it gets that error…
Is there any constraint on the usage of SimpleITK for Pyradiomics operations?
- at the end, I post the Error Message!
Thanks for yout comensts!
hugs!
Traceback (most recent call last):
File "FeatureClassExtraction.py", line 49, in <module>
firstOrderFeatures = radiomics.firstorder.RadiomicsFirstOrder(image, mask, **settings)
File "/home/leonardo/anaconda3/lib/python3.6/site-packages/radiomics/firstorder.py", line 32, in __init__
super(RadiomicsFirstOrder, self).__init__(inputImage, inputMask, **kwargs)
File "/home/leonardo/anaconda3/lib/python3.6/site-packages/radiomics/base.py", line 88, in __init__
self._initSegmentBasedCalculation()
File "/home/leonardo/anaconda3/lib/python3.6/site-packages/radiomics/base.py", line 91, in
_initSegmentBasedCalculation
self.imageArray = sitk.GetArrayFromImage(self.inputImage)
File "/home/leonardo/anaconda3/lib/python3.6/site-packages/SimpleITK/SimpleITK.py", line 3412, in
GetArrayFromImage
arrayView = GetArrayViewFromImage(image)
File "/home/leonardo/anaconda3/lib/python3.6/site-packages/SimpleITK/SimpleITK.py", line 3388, in
GetArrayViewFromImage
pixelID = image.GetPixelIDValue()
AttributeError: 'itkImageSS3' object has no attribute 'GetPixelIDValue'