ExtractRTStruct

MLModule
genre DICOM
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLRTStructSupport
definition MLRTStructSupport.def
keywords radiotherapy, structure, contours, dicom, roi

Purpose

The module ExtractRTStruct extracts an RT Structure Set from a DICOM tree. The tree can, for example, be loaded with LoadDicomTree. The output is a ml.CSOList that contains the contours and additional attributes extracted from the file.

Usage

Extracting the contours from a DICOM tree is automatic if the Mode is set to AUTO_UPDATE; otherwise, the Update button can be pressed.

Details

This module reads the StructureSetROISequence tag and uses the following tags from this sequence (user data tag names are identical to the DICOM tag names):

  • ROINumber - Is written as user data into the generated CSO group
  • ROIName - Is set as label attribute of the CSO group
  • ROIDescription - Is set as description attribute of the CSO group
  • ROIVolume - Is written as user data into the generated CSO group
  • ROIGenerationAlgorithm - Is written as user data into the generated CSO group
  • ROIGenerationDescription - Is written as user data into the generated CSO group

These tags are read from the ROIContourSequence tag:

  • ContourSequence - Read ContourGeometricType, ContourData, and NumberOfContourPoints to construct the contours
  • ROIDisplayColor - Set path point color for the CSO group
  • SourcePixelPlanesCharacteristicsSequence - If present, subvalues are transformed into user data values ‘referenceImageExtent’ and ‘voxelToWorldMatrix’, which can be used to create a reference image (for example, with ConstantImage and ImagePropertyConvert)

These tags are read from the RTROIObservationsSequence tag:

  • RTROIInterpretedType - Is written as user data into the generated CSO group
  • ROIInterpreter - Is written as user data into the generated CSO group

Note that if more than one item from the RTROIObservationsSequence references the same ROI, only the first item is used.

Tips

Tags that are not handled by this module can be extracted from the DICOM tree by scripting or, e.g., with DicomTagViewer.

Windows

Default Panel

../../../Projects/DicomImport/MLRTStructSupport/Modules/mhelp/Images/Screenshots/ExtractRTStruct._default.png

Input Fields

inDicom

name: inDicom, type: DicomTree(MLBase)

The DICOM tree to extract the RT Structure Set from.

For accessing this object via scripting see the Scripting Reference: MLABDicomTree.

Output Fields

outCSOList

name: outCSOList, type: CSOList(MLBase)

The CSOList contains the contours, organized by CSO groups that represent the ROI Contour items.

For accessing this object via scripting see the Scripting Reference: MLCSOListWrapper.

Parameter Fields

Field Index

Clear: Trigger
Had Error: Bool
Level planar CSOs: Bool
Max Point Distance: Double
Mode: Enum
Update: Trigger

Visible Fields

Max Point Distance

name: maxPointDistance, type: Double, default: 0

Sets a maximum point distance.

If this field is set to a value greater 0, the module will add additional points to contours if two consecutive points in a contour are farther apart than this value.

If this field is set to a value greater than 0, the module will add additional points to contours if two consecutive points in a contour are farther apart than this value.

Some algorithms that work on CSOs might perform better if the line segments in a CSO are not too long.

Level planar CSOs

name: levelPlanarCSOs, type: Bool, default: TRUE

If checked (the default), planar CSOs (for example, CSOs of type CLOSED_PLANAR and OPEN_PLANAR) will be corrected to ensure they are genuinely in-plane if necessary.

This allows for accounting for minor deviations of the CSO points from the plane that may result from insufficient precision of the saved contour data, especially in oblique images.

Mode

name: updateMode, type: Enum, default: AUTO_UPDATE

Defines how to respond to changes in the input DICOM tree or parameter fields.

Values:

Title Name Description
Off OFF Do nothing; the output is not changed. Update must be triggered manually.
Auto Clear AUTO_CLEAR Automatically clear the output. Update must be triggered manually.
Auto Update AUTO_UPDATE Automatically update the output.

Update

name: update, type: Trigger

When pressed, the output of this module is updated.

This is not necessary if Mode is AUTO_UPDATE and the output has not been cleared using Clear.

Clear

name: clear, type: Trigger

When pressed, the output of this module is cleared.

Had Error

name: hadError, type: Bool, persistent: no

Shows whether there were DICOM conformance errors while extracting the RT structure set (check the log for messages).

It may not be advisable to save the result as an RTSTRUCT file again in this case.

This field is set before outCSOList is updated.