ITK 5.2, whose release candidate is coming up, has more support for vector pixel types in these functions and in an image.astype
function.
While we can add more wrapping for join_image_filter
, but combining scalar images into a multi-component image is already supported with itk.compose_image_filter
. For example,
arrays = [component1, component2, component3]
together = itk.compose_image_filter(*arrays)
# or
images = [itk.image_view_from_array(a) for a in arrays]
together = itk.compose_image_filter(*images)