Closed
Description
While using the @itk-wasm/image-io typescript "demo webpage" the direction array of an input image is different than the output image.
Steps
- Using an image with non-trivial direction array.
- On image-io test webpage modified to
console.log(image.direction)
, run readImage, note direction array. - On writeImage, upload image, serializedImage set to
out.nii
, "Run". - With readImage, load
out.nii
, note direction array. Expect array to be similar to input image direction.
With this image:
labelmap-nii.zip
Input direction array is
"0": 1, "1": -1.9901096072372604e-10, "2": 4.9618989722737154e-11, "3": 2.0510340648094427e-10, "4": 0.9702957283983676, "5": -0.24192188394878414, "6": 1.3830191008187543e-17, "7": 0.2419218870873018, "8": 0.970295729180888
After writing to .nii
or .nrrd
, readImage gives direction array
"0": 1, "1": 2.051034067230632e-10, "2": 1.3704920054353578e-17, "3": -1.9901096048879907e-10, "4": 0.9702957283983676, "5": 0.24192188394878414, "6": 4.9618989472755004e-11, "7": -0.2419218870873018, "8": 0.970295729180888
Indexes 5 and 7 are negated.