Thank you very much now I find a way to manage with this problem.
my problem: Creating a segmentation dataset with CT has transformed. but Python cant read the CT transform and can only read raw CT.
so I solve it by creating an inverted transform segmentation.
for more details:
- I have CT .dcm with transformed. and have segmentation nrrd.
- Import segmentation as volume.
- Clone transform form CT to segmentation volume.
- Invert transform and Edit properties to apply to segmentation volume.
- then “Harden transform” segmentation.
and save it as dicom.
for the shape problem that will change I slove in Python (just cut it off):
# read dicom filse (CT, mask)
ct_image_array = readCT(dir_ct_paths[n])
label_image_array = readLabel(dir_label_paths[n])
# preprocess mass
label_image_array = label_image_array[:ct_image_array.shape[0], :512, :512]