-
Hi, I'm using the data from the medical segmentation decathlon(the liver ones) : http://medicaldecathlon.com
I think that all of thoose errors are because I'm not using SaveImaged as it's intendeed to be used, so do you know how should I use it ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @JumpLK. I took your code, added the |
Beta Was this translation helpful? Give feedback.
Hi @JumpLK.
SaveImage
andSaveImaged
require the image to be passed with the channel dimension first. So firstly you should addAddChanneld
just after theLoadImaged
. This also might solve your data allocation problem (currentlySpacingd
andOrientationd
will be assuming that you have an image that is 512x75 with 512 channels).I took your code, added the
AddChanneld
and then could open the saved image in ITKSnap. However, image metadata still says that the image is 4D (with a singleton channel dimension). This may not cause any problems for you, but I've submitted a PR to allow the user to squeeze the final dimensions, which would remove the singleton channel dimension, giving a 3D nifti…