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

writeArrayBuffer and readArrayBuffer change properties of image

Open WillCMcC opened this issue 2 years ago • 3 comments

  // Read series
  const { image } = await readImageDICOMFileSeries(files);

  console.log(image.direction.toString()); // 0,0,-1,1,0,0,0,-1,0

  // serialize and deserialize the series
  const { arrayBuffer: itkImageArrayBuffer } =
    await writeArrayBuffer(null, image,'test.mha', "", false);

  const { image: cachedImage } = await readArrayBuffer(
    null,
    itkImageArrayBuffer,
    'test.mha'
  );

  console.log(cachedImage.direction.toString()); // 0,1,0,0,0,-1,-1,0,0

WillCMcC avatar Jun 02 '22 21:06 WillCMcC

Noted. I am looking into this.

jadh4v avatar Jun 07 '22 16:06 jadh4v

@jadh4v what did you find?

thewtex avatar Jun 20 '22 18:06 thewtex

I have done some digging but not found anything solid yet.

jadh4v avatar Jun 22 '22 14:06 jadh4v

@sankhesh we should probably close this issue. Do we need some documentation in the code for noting this issue?

jadh4v avatar Aug 25 '22 13:08 jadh4v

The primary issue here is the itkMetaImageIO does not take AnatomicalOrientation into consideration. This issue is documented in detail here.

sankhesh avatar Aug 25 '22 17:08 sankhesh

@thewtex I don't have permissions. Could you please close this? The earlier comment explains why this issue cannot be fixed.

sankhesh avatar Sep 14 '22 21:09 sankhesh

@sankhesh thanks for the follow-up.

You should receive an invite for permissions, but closing for now.

thewtex avatar Sep 15 '22 14:09 thewtex