# itk-wasm PipelineFunctor with 2 input image types

**URL:** https://discourse.itk.org/t/itk-wasm-pipelinefunctor-with-2-input-image-types/5657
**Category:** Engineering
**Created:** [January 30, 2023, 3:53pm UTC](https://discourse.itk.org/t/itk-wasm-pipelinefunctor-with-2-input-image-types/5657 "2023-01-30T15:53:58Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![PaulHax](https://discourse.itk.org/user_avatar/discourse.itk.org/paulhax/32/2949_2.png) [@PaulHax](https://discourse.itk.org/u/PaulHax)
#### Post date: [January 30, 2023, 3:53pm UTC](https://discourse.itk.org/t/itk-wasm-pipelinefunctor-with-2-input-image-types/5657/1 "2023-01-30T15:53:58Z")

</div>

Hello!

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:

```auto
template <typename TImage, typename TFixedImage>
class PipelineFunctor
{
...

return itk::wasm::SupportInputImageTypes<PipelineFunctor,
                                           uint8_t,
                                           int8_t,...

```

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

> <https://github.com/PaulHax/itk-vtk-viewer/blob/checkerboard/src/IO/Checkerboard/Checkerboard.cxx#L145-L161>

Any suggestions would be great.

---

<div class="post-metadata">

### Author: ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)
#### Post date: [January 31, 2023, 12:07pm UTC](https://discourse.itk.org/t/itk-wasm-pipelinefunctor-with-2-input-image-types/5657/2 "2023-01-31T12:07:36Z")

</div>

Here is an example:

> <https://github.com/InsightSoftwareConsortium/itk-wasm/pull/746>
>
> Demonstrates how to create a pipeline that accepts two different input image typ…es.
