'NoneType' object has no attribute 'GetPointData' error in exporting RTSTRUCT object into DICOM-SEG

Hi everyone,



![Screen-shot of 3D Slicer (DICOM Export-2)|533x499]

(upload://nUHM4oyIkkUDF76n6Fw9f15xgfA.png)

I am having trouble saving/exporting RTSTRUCT object into DICOM-SEG format. The RTSTRUCT loads up and displays correctly in Slicer (attached ‘display’) and also is properly associated w/ the CT series in which the segmentation was performed.

I have both DCMQI and QuantitativeReporting extensions installed and see the option for ‘DICOMSegmentation’ under ‘Select export type’ menu available when I click on the study or RTSTRUCT node (attached ‘DICOM Export’). However, I get a segmentation object export failure error message that says ‘NoneType’ object has no attribute ‘GetPointData’.

I have tried both the stable version of Slicer 5.2.2 as well as 5.3.0 to no avail. This particular RTSTRUCT can be correctly open/displayed in platform other than Slicer (i.e., MiM). Any ideas as to what could be causing this error?

When you get the error you mentioned you get a complete call stack. It starts with ‘Traceback:’. Can you please paste the whole thing?

Here it is:

Traceback (most recent call last):
File “C:/Users/hjyu2/Downloads/3D Slicer/Slicer 5.3.0-2023-08-12/slicer.org/Extensions-31925/QuantitativeReporting/lib/Slicer-5.3/qt-scripted-modules/DICOMSegmentationPlugin.py”, line 367, in export
exporter.export(exportable.directory, segFileName, metadata)
File “C:/Users/hjyu2/Downloads/3D Slicer/Slicer 5.3.0-2023-08-12/slicer.org/Extensions-31925/QuantitativeReporting/lib/Slicer-5.3/qt-scripted-modules/DICOMSegmentationPlugin.py”, line 504, in export
nonEmptySegmentIDs = self.getNonEmptySegmentIDs(segmentIDs)
File “C:/Users/hjyu2/Downloads/3D Slicer/Slicer 5.3.0-2023-08-12/slicer.org/Extensions-31925/QuantitativeReporting/lib/Slicer-5.3/qt-scripted-modules/DICOMSegmentationPlugin.py”, line 582, in getNonEmptySegmentIDs
return [segmentID for segmentID in segmentIDs if not self.isSegmentEmpty(segmentation.GetSegment(segmentID))]
File “C:/Users/hjyu2/Downloads/3D Slicer/Slicer 5.3.0-2023-08-12/slicer.org/Extensions-31925/QuantitativeReporting/lib/Slicer-5.3/qt-scripted-modules/DICOMSegmentationPlugin.py”, line 582, in
return [segmentID for segmentID in segmentIDs if not self.isSegmentEmpty(segmentation.GetSegment(segmentID))]
File “C:/Users/hjyu2/Downloads/3D Slicer/Slicer 5.3.0-2023-08-12/slicer.org/Extensions-31925/QuantitativeReporting/lib/Slicer-5.3/qt-scripted-modules/DICOMSegmentationPlugin.py”, line 588, in isSegmentEmpty
imagescalars = r.GetPointData().GetArray(“ImageScalars”)
AttributeError: ‘NoneType’ object has no attribute ‘GetPointData’