the problem I think is that I want to do this in simpleITK, because otherwise I am mixing things together in a convoluted way, and having tried the above I get a type error.
either I need an equivalent SimpleITK version for RGB, or a way to convert a composite sitk transform to itk transform…
I have discovered this :
# Extract first three channels of joined image (assuming RGB)
select = sitk.VectorIndexSelectionCastImageFilter()
channel1_image = select.Execute(joined_image, 0, sitk.sitkUInt8)
channel2_image = select.Execute(joined_image, 1, sitk.sitkUInt8)
channel3_image = select.Execute(joined_image, 2, sitk.sitkUInt8)
I found that I can resample each component individually.
You should open a new questions, but SimpleITK’s Resample working with RGB or vector pixel types by default, so there is not need to run in on a per component basis.