Skip to content

Image reader rotating images 90 degrees to the left #1818

@NMVRodrigues

Description

@NMVRodrigues

Using the provided monai.transforms.LoadImage to load Nifti images rotates them 90 degrees to the left.
Is the rotation intended?
Is there any way to overcome this issue and load them without the rotation?

Here is the code showing a slice of the image:

from monai.transforms import LoadNifti 
loader = LoadNifti(image_only=True) 
img_array = loader(images[0]) 
plt.figure() 
plt.imshow(img_array[:, :, 0], cmap="gray") 
plt.show()

Here is the output image:

image

And here is the correct image orientation as seen on ITK Snap:

image

EDIT:

The slices are not the same but they are from the same volume.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions