Crashes with both writeImage from the cdn or writeImageNode in nodejs.
Let me know if this is expected behavior or not. The documentation seems to indicate uint32 should be supported.
Repro:
import { writeImageNode } from '@itk-wasm/image-io'
const dtypes = [
{componentType: 'uint8', data: new Uint8Array(100*100), name: 'uint8_test'},
{componentType: 'uint16', data: new Uint16Array(100*100), name: 'uint16_test'},
{componentType: 'uint32', data: new Uint32Array(100*100), name: 'uint32_test'},
]
dtypes.forEach(async (d) => {
console.log("Writing", d.name)
const res = await writeImageNode(
{
imageType: {
dimension: 2,
pixelType: 'Scalar',
componentType: d.componentType,
components: 1
},
name: d.name,
direction: new Float64Array([1.0, 0.0, 0.0, 1.0]),
size: [100, 100],
data: d.data, // <- !!! Will crash if Uint32Array
},d.name + '.tif')
console.log(d.name, res)
})
Crashes with both
writeImagefrom the cdn orwriteImageNodein nodejs.Let me know if this is expected behavior or not. The documentation seems to indicate
uint32should be supported.Repro: