The transform assumes label is a 4D volume with shape CDHW. I'm wondering if this is right? I'm working with the MSD spleen dataset currently. spleen_2.nii.gz is axial with shape 512x512x90 and resolution 0.79x0.79x5. The image shape once loaded in using the LoadImaged transform is (512, 512, 90), and following the AddChannel1d transform, the shape is (1, 512, 512, 90). I believe that we would describe spleen_2 as having 90 slices.
The link below shows label.shape[1] (=512), being used to find valid slices:
|
for sid in range(label.shape[1]): # Assume channel is first |
Should we not be looking in label.shape[-1] (=90) for valid slices? If yes, further changes will be needed in the FindAllValidSlicesd transform and the AddInitialSeedPointd transform.
The transform assumes label is a 4D volume with shape CDHW. I'm wondering if this is right? I'm working with the MSD spleen dataset currently. spleen_2.nii.gz is axial with shape 512x512x90 and resolution 0.79x0.79x5. The image shape once loaded in using the LoadImaged transform is (512, 512, 90), and following the AddChannel1d transform, the shape is (1, 512, 512, 90). I believe that we would describe spleen_2 as having 90 slices.
The link below shows label.shape[1] (=512), being used to find valid slices:
MONAI/monai/apps/deepgrow/transforms.py
Line 45 in aa5fa1d
Should we not be looking in label.shape[-1] (=90) for valid slices? If yes, further changes will be needed in the FindAllValidSlicesd transform and the AddInitialSeedPointd transform.