Interpolating contours from a RTSTRUCT file using batch processing


I have an RTSTRUCT file (.dcm) and its reference files (ultrasound images in dicom format). RTSTRUCT file contains contour data for ROI at some slice locations, I would like to interpolate the contour data to all the slices using batch processing in 3D slicer or Platimatch.

I have done this manually in 3D Slicer manually and saved them to label maps for each ROI, since 3D slicer interpolated the contour data automatically. I would like to know how to interpolate the contour to all slices and save them as label maps using batch processing.

Thank you in advance for your help.


Please try the BatchProcessing module that does just this:

Hello Csaba,

I have my RTSTRUCT file and reference files in the same folder, but when I run the script as you suggested it gives the following error. The output folder is empty.

Script Used:

Slicer.exe --no-main-window --python-script --input-folder Dir/RTandImages --output-folder /Output

Error Message:
No reference volume found for segmentation RTSTRUCT: RTSTRUCT


The CT does not just need to be in the same folder, but needs to be referenced from the RT structure set via DICOM to be considered reference. The reason for this is that you can have multiple structure sets and CTs in the input folder and they are paired automatically using this method. Most TPSs where you can export RTSTRUCT from create this link. How do you get the RTSTRUCT file?