Need to transpose array obtained from itk instead of reversing of itk.size() in ITKReader
See original GitHub issueDescription
In ITKReader, itk.size(img)
should not be reversed since it outputs correct size of an image. Instead, itk.array_view_from_image(img, keep_axes=False) provides the transposed array and such numpy array must be transposed because of the differences of storing the data in numpy and itk.
This PR is wrong: https://github.com/Project-MONAI/MONAI/pull/1045. See also https://github.com/InsightSoftwareConsortium/ITK/issues/2006
Expected behavior
- Need to remove the reverse for itk.size.
- Transpose array obtained from itk.array_view_from_image.
Issue Analytics
- State:
- Created 3 years ago
- Comments:20 (12 by maintainers)
Top Results From Across the Web
Source code for monai.data.image_reader
This function must return two objects, the first is a numpy array of image data, the second is a dictionary of metadata. Args:...
Read more >TRANSPOSE - L3HarrisGeospatial.com
The TRANSPOSE function returns the transpose of Array. If an optional permutation vector is provided, the dimensions of Array are rearranged as well....
Read more >Transpose 3-D MRI image axis to different image view
The issue is that you're using the pixel spacing from the original image. You need to transpose the pixel spacings the same way...
Read more >TRANSPOSE function - Microsoft Support
How to use the TRANSPOSE function in Excel to switch or rotate cells. ... you don't want that, you can type a formula...
Read more >Why does ITK Snap automatically transpose my scans?
I was thinking that maybe the nifti files have some parameters that make ITK to transpose them. However, I opened a file in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
To follow-up, I made some progress on this, but I will come back to it after I return in the new year. Happy pre-2021!
I plan to work on this issue soon - in case somebody is already working on it or planned to.