SaveImaged not saving the image with correct metadata #468
Closed
ArpanGyawali
started this conversation in
General
Replies: 1 comment
-
I got the solution. |
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
-
Here I have created a skull strip app that takes nifty as an input. So i created a niftyloader_operator that loads the image data and the metadata from the file and is given to SkullStrip_operator which performs pretransforms and posttransforms.
The code for NiftyLoader_operator is something like this
import numpy as np
And the Pre transforms performed in SkullStrip_operator are
Here LoadImaged is a custom InMemImageReader
Issue
Here, when i run the code using monai-deploy exec I get this sort of output in the terminal
Where the metadata are correctly shown, but the SaveImaged that is immidiately after LoadImaged provides you a new nifty data with completely different metadata than the loaded image itself.
It has origin:(0,0,0) and spacing(1,1,1).
Why is this happening. Why is the SaveImaged not saving the correct metadata?
I really need the help. I tried everything I could. Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions