I am new here, and have been recently struggling with the following.
I have a dataset from TCIA I am hoping to analyze containing a CT series and associated segmentations in RTStruct format. Although, I can extract radiomic features through the GUI, I am hoping to use script this in python specifically and use pyradiomics-labs to process the dicom imagery.
Using dcmrtstruct2nii, I have been able to extract .nii masks of all the features from the RTStruct, and similarly using SimpleITK, have convered it to a .nrrd format. However, this is where I am stuck trying to convert either of these masks to a Dicom SEG object.
It may be simpler at this point to convert my dicom series to .nrrd potentially.
I don’t know how dcmrtstruct2nii works, but in SlicerRT we have a quite sophisticated algorithm that can convert the antiquated contour set to an interpolated surface and then labelmap. If you’re interested after all let me know. All you need are the SlicerRT and DCMQI extensions.
Is there an available API or a way to script it to work over multiple files without user intervention?
dcmrtstruct2nii seemed to work well for the meantime. It took ~5h to convert about 400 RtStruct files with ~20 masks within each. Not sure if this is fast or slow haha.