how to read non uniform sampling dicom file #4820
-
I read the non-uniformly sampled dcm files as a list and then concateated them. There will be some deviation when I read RT Structure using the same method. This seems to be caused by the difference in spacing. The code of my method is as follows, # this is a list cover different spacing SITKImage
patient_img = sitk_get_image(patient_dir, ignore_nonuniform=False)
new = []
new_img = []
for img in patient_img:
# this is RT Structure.
patient_ste = rtstruct2stencil(img, patient_rts, roi_names).astype(np.uint8)[..., 0]
new.append(patient_ste)
new_img.append(sitk.GetArrayFromImage(img))
patient_ste = np.concatenate(new, axis=0)
patient_img = np.concatenate(new_img, axis=0) I just use SimpleITK in the above method, MONAI is there a better way to read non uniform sampling dicom and RT Structure? or, my model using NifTI file format(nii.gz) as the input data format , because the DCM file format needs some time to reading it, Is there any way to shorten the time to read the data and make sure the data is correct? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
thanks for reporting, dicom rt is not supported at the moment, we may host a separate dicom utility codebase for this, but this is still under discussion. |
Beta Was this translation helpful? Give feedback.
thanks for reporting, dicom rt is not supported at the moment, we may host a separate dicom utility codebase for this, but this is still under discussion.