itk-wasm PipelineFunctor with 2 input image types


I am making a checkerboard itk-wasm pipeline that takes 2 images, with possibly different component types. Using a itk::wasm::SupportInputImageTypes with a PipelineFunctor would be perfect. But I don’t know how to support 2 different input image types in the template.

Ideally this would compile:

template <typename TImage, typename TFixedImage>
class PipelineFunctor

return itk::wasm::SupportInputImageTypes<PipelineFunctor,

The current checkerboard pipeline goes, but has runtime error when passed 2 images of different component types:

Any suggestions would be great.

Here is an example:

1 Like