PIL reader axis swap #7837
aeye-slater
started this conversation in
General
Replies: 1 comment
-
Hi @aeye-slater, thanks for your interest here. We have an argument MONAI/monai/data/image_reader.py Line 1136 in 08d5728 Hope it helps, thanks. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am struggling to understand the reason behind the axis swap for PIL reader that swaps axis 0 and 1.
Granted I can swap it back-- reading up it has something to do with the other writers and backends. However the same image from loaded from DICOM, saved as a JPG, reloaded gets the axis swap when displayed. If the axis swap is needed I should get the same image orientation back.
I've read about compatibility with other backend readers, but my experience so far is that MONAI is the only one among PIL, OpenCV, 3D Slicer, that appears to be doing this and I'm not understanding why this is needed. We're also struggling with orienting 3d masks and volumes so this extra axis swap had caused us some pain when loading .seg.nrrd files as well trying to keep track of the all the axis changes. It could be the seg.nrrd files were setup wrong, but even a simple jpg img off google makes no sense why it is being loaded with axis 0 (X) and axis (Y) swapped.
Beta Was this translation helpful? Give feedback.
All reactions