itk-wasm icon indicating copy to clipboard operation
itk-wasm copied to clipboard

Handling negative indices on WebAssembly memory IO

Open ramonemiliani93 opened this issue 1 year ago • 0 comments

Hi 👋

I've noticed a difference while working with padding filters, particularly when using WebAssembly memory IO versus the filesystem.

When employing ITK filters with padding, the image's origin is preserved, and negative indices handle padding. However, when saving images via the filesystem, metadata updates smoothly, while WebAssembly memory IO seems to miss the mark.

I've set up a quick example here to illustrate. When running the pipeline with the WASI build, the image is correct, but in the browser, the origin behaves oddly.

I'm curious: should WebAssembly memory IO handle this, or is it the pipeline's job to manage negative indices and update the image origin?

Looking forward to your insights!

ramonemiliani93 avatar Feb 19 '24 17:02 ramonemiliani93