ExtractRTStruct

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

Purpose

This module extracts a RT Structure Set from a DICOM tree. The tree can, e.g., be loaded with LoadDicomTree. The output is a CSOList that contains the contours and additional attributes extracted from the file.

Usage

Extracting of the contours from a DICOM tree is pretty much automatic if the Mode is set to AUTO_UPDATE, otherwise one can press the Update button.

Details

This module reads the StructureSetROISequence tag and uses the following tags from this sequence (user data tag names are the same as 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, sub-values are transformed into user data values ‘referenceImageExtent’ and ‘voxelToWorldMatrix’, which can be used to create a reference image (e.g., 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 one 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

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.

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

Level planar CSOs

name: levelPlanarCSOs, type: Bool, default: TRUE

If this is enabled (the default), planar CSOs (e.g. CSOs of type CLOSED_PLANAR and OPEN_PLANAR) will be corrected to be really in-plane if needed.

This allows to account for minor deviations of the CSO points from the plane that may be caused by insufficient precision of the saved contour data, especially in oblique images.

Mode

name: updateMode, type: Enum, default: AUTO_UPDATE

What to do when the input DICOM tree or parameter fields change.

Values:

Title Name Description
Off OFF Do nothing, output isn’t 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

Update the output of this module. Not necessary if Mode is AUTO_UPDATE, and the output has not been cleared using Clear.

Clear

name: clear, type: Trigger

Clears the output of this module.

Had Error

name: hadError, type: Bool, persistent: no

This flag will be set if there were DICOM conformance errors while extracting the RT structure set (check the log for messages).

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

This field is set before outCSOList is updated.