Asking of how to save the predicted mask and image from registration model as Nifti image #6287
-
Hi Team, I want to thank for good library with good feature. My Question is about how can I save the predicted images and masks so that I can be able to check if registration was successful performed using 3D slicer? I trained model using LocalNed model and to get the pair data I rotated image and mask by 20 degrees, by evaluating the model I got 0.97 mean dice score. My question is about how can I save the predicted image and masks? Your help will be much appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
please make sure the data shape: [channels, spatial_dim_1, spatial_dim_2, ...], then you can use saver = SaveImage(resample=False)
saver(data) more examples in this tutorial https://github.com/Project-MONAI/tutorials/blob/main/modules/load_medical_images.ipynb |
Beta Was this translation helpful? Give feedback.
-
Thanks @wyli, It works. |
Beta Was this translation helpful? Give feedback.
-
I found that the affine of the predicted image after registration is the same as the affine of the moving image. Is it normal that the monai registration prediction affine matrix to be the same as the moving affine matrix? Due to that when I saw that the predicted image is same as moving image which means that the registration did not happen. Team help me to understand this |
Beta Was this translation helpful? Give feedback.
please make sure the data shape: [channels, spatial_dim_1, spatial_dim_2, ...], then you can use
more examples in this tutorial https://github.com/Project-MONAI/tutorials/blob/main/modules/load_medical_images.ipynb