monai.transforms.SaveImage saves image with the axis swapped - help needed #4681
-
Hi, I want to save (in "*.nii.gz" format) the channel 1 (MR) separately to view on 3D Slicer software. So, I save it as: The file is saved as: "MR_img1_saved.nii.gz" in the "Data_3D" folder. When I try to load this image again using: The loaded img shape is (128,64,1,128) and this is the reason I cannot view the file "MR_img1_saved.nii.gz" on 3D slicer. Please let me know the problem here and how do I fix it? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey @soumbane , Maybe the docs could help you. SaveImage docs The Parameters of call of the SaveImage Class is
shape is [C,H,W,[D]], but yours is [H, W, D]. Hope this is useful to you. |
Beta Was this translation helpful? Give feedback.
Hey @soumbane ,
Maybe the docs could help you. SaveImage docs
The Parameters of call of the SaveImage Class is
img
andmeta_data
where the requirements ofimg
are as following:shape is [C,H,W,[D]], but yours is [H, W, D].
Hope this is useful to you.