Convert RT structure to Nrrd

Hi everyone,

I’m trying to convert the RT structure to nrrd using the script BatchStructureSetConversion.py from the SlicerRT module. I executed the script from terminal in this way:
/path/to/Slicer/Slicer-4.11.0-2020-08-29-linux-amd64/Slicer --no-main-window --python-script /path/to/thescript/BatchStructureSetConversion.py -i /path/to/RTStructure/ -r /path/to/theDicom -o outputpath

The script freezes when it is creating the labelmaps. The output I get is:
libpng warning: iCCP: known incorrect sRGB profile
qSlicerSequencesModulePrivate::addToolBar: no main window is available, toolbar is not added
This plugin dir: /home/luciano/.config/NA-MIC/Extensions-29335/NvidiaAIAssistedAnnotation/lib/Slicer-4.11/qt-scripted-modules
Loading Slicer RC file [/home/luciano/.slicerrc.py]
Import reference anatomy DICOM data from /mnt/Luco/Documents/AIQ/HandN/borrar/CT
Switching to temporary DICOM database: /mnt/Luco/Programs/Slicer/TemporaryDirecotory/20210226_144833_TempDICOMDatabase
TagCacheDatabase adding table

“DICOM indexer has successfully inserted 91 files [0.06s]”
“DICOM indexer has successfully processed 91 files [0.10s]”
“DICOM indexer has updated display fields for 91 files [0.02s]”
Loading with imageIOName: GDCM
Window/level found in DICOM tags (center=40.0, width=400.0) has been applied to volume 2: CT IMAGES
Import DICOM data from /mnt/Luco/Documents/AIQ/HandN/borrar/RTStructure-CT/
Switching to temporary DICOM database: /mnt/Luco/Programs/Slicer/TemporaryDirecotory/20210226_144836_TempDICOMDatabase
TagCacheDatabase adding table

“DICOM indexer has successfully inserted 1 files [0.00s]”
“DICOM indexer has successfully processed 1 files [0.01s]”
“DICOM indexer has updated display fields for 1 files [0.00s]”
Load first patient into Slicer
Please install SlicerRT extension to enable loading of DICOM RT Structure Set objects
Please install SlicerRT extension to enable loading of DICOM RT Structure Set objects
W: OperatorsName (0008,1070) absent in RTSeriesModule (type 2)
W: PositionReferenceIndicator (0020,1040) absent in FrameOfReferenceModule (type 2)
W: OperatorsName (0008,1070) absent in RTSeriesModule (type 2)
W: PositionReferenceIndicator (0020,1040) absent in FrameOfReferenceModule (type 2)
Warning: In /work/Preview/S-0-E-b/SlicerRT/DicomRtImportExport/ConversionRules/vtkPlanarContourToClosedSurfaceConversionRule.cxx, line 1244
vtkPlanarContourToClosedSurfaceConversionRule (0x6f44a00): GetSpacingBetweenLines: Contour spacing is not consistent.

Warning: In /work/Preview/S-0-E-b/SlicerRT/DicomRtImportExport/ConversionRules/vtkPlanarContourToClosedSurfaceConversionRule.cxx, line 1244
vtkPlanarContourToClosedSurfaceConversionRule (0x6f44a00): GetSpacingBetweenLines: Contour spacing is not consistent.

Convert loaded structure set to labelmap volumes
Converting structure set 1: RTSTRUCT: RTstruct

It freezes there, and nothing happen. I could load this RT structure within Slicer, so I assume I’m doing something wrong.

Does anyone could help me with this?
I could create the nrrd for some samples but I can’t in others.

Thanks!!!

1 Like