Hello,
I am using itk with python for the first time. I am trying to convert a mha image (2d) to a png image. To be perfectly honest I am not sure how to use pixel types, I hope you can point me into the right direction
My code looks like this:
pixelType = itk.F
imageType = itk.Image[pixelType, 2]
writerType = itk.ImageFileWriter[imageType]
reader = itk.ImageFileReader.New(FileName=mha_file)
input_image_type = itk.template(reader.GetOutput())
image_filter = itk.CastImageFilter[input_image_type, itk.Image[itk.UC,3]].New(reader.GetOutput())
The error I get is quite long:
`KeyError: ((<itkTemplate itk::Image>, (<itkCType float>, 3)), <class 'itkImagePython.itkImageUC3'>)
itkTemplate.TemplateTypeError: itk.CastImageFilter is not wrapped for input type `tuple, itk.Image[itk.UC,3]`.