InsightSoftwareConsortium / ITK-Wasm

High performance spatial analysis in a web browser and across programming languages and hardware architectures
https://wasm.itk.org
Apache License 2.0
198 stars 52 forks source link

VectorImage output from Pipeline has only 1 component #803

Open PaulHax opened 1 year ago

PaulHax commented 1 year ago

After npm run test with this pipeline: https://github.com/PaulHax/itk-wasm-vector-image-example

the attached output image has only 1 component. I expected 2 after the ComposeImageFilter.

Could be doing something silly in the VectorImageTest.cxx file.

output

PaulHax commented 1 year ago

If I change this line in the example: https://github.com/PaulHax/itk-wasm-vector-image-example/blob/a8d2c9626d2c1eb225b7b5510f90ee9fe165b0db/VectorImageTest.cxx#L49

From using PipelineOutputType = typename itk::VectorImage<typename ImageType::PixelType, ImageType::ImageDimension>;

To using PipelineOutputType = itk::Image<itk::Vector<uint8_t, 2>, ImageType::ImageDimension>;

Output image has 2 components! 🎉

output