Here’s a piece of code I’m trying to run using pydicom and itk (using pydicom for a better dicom tag extraction since itk was failing to get some tags).
However, lumfilter fails since it’s expecting an RGB image itkImageRGBUC2, but the image that ITK created from the array is of type itkImageUC3. Is itkCastImageFilter the only way to go, or am I missing something?
That said, we can make this similar to the functional ITK Python filter interfaces, support passing a ttype keyword argument to the ITK NumPy interface functions. This will enable explicit specification of the type desired. For example:
This just ensures it is a contiguous buffer, which is a requirement for the conversion. But, we are looking to make the conversions required implicit for ITK 5.1b02.