ERROR: Pixel type: vector of 8-bit signed integer is not supported

Dear all,

I write because I got this error and i have tried all types but it returns an error with whatever casting I do in the image.

Exception thrown in SimpleITK LabelStatisticsImageFilter_Execute: d:\a\1\sitk\code\common\include\sitkDualMemberFunctionFactory.hxx:193:
sitk::ERROR: Pixel type: vector of 8-bit signed integer is not supported in 3D byclass itk::simple::LabelStatisticsImageFilter

The code i use is very simple

    img = sitk.GetImageFromArray(np.array(img, dtype=np.int8))   
    msk = sitk.GetImageFromArray(np.array(msk, dtype=np.int8))  

Thank you

Hello @zandarina

did you try to use sitk types like sitk.sitkInt8? Or try casting it with a filter like CastImageFilter: sitk.Cast(img,sitk.sitkInt8).