ComposeRTStruct¶
-
MLModule
¶ genre DICOM
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLRTStructSupport
definition MLRTStructSupport.def see also ExtractRTStruct
keywords radiotherapy
,structure
,contours
,dicom
,roi
Purpose¶
The module ComposeRTStruct
creates an RT Structure Set DICOM tree from a CSO list and the associated image. The DICOM tree can be manipulated if needed and saved to an RTSTRUCT DICOM file using SaveDicomTree
.
Usage¶
The creation of the contours is performed automatically if the Mode
is set to AUTO_UPDATE; otherwise, they are created upon pressing the Update
button.
Details¶
This module creates a DICOM conform RTSTRUCT DICOM tree from the input CSO list and the input image to which they related.
The input image shall be either an original image or the output of a (Direct)DicomImport module. Any operations on that image that may have broken the relationship between the image and the contained original DICOM tree (such as creation of subimages) are not supported. The DICOM tree will contain all modules that are required for an RT Structure Set IOD:
- Patient Module (C.7.1.1)
- General Study (C.7.2.1)
- General Equipment (C.7.5.1)
- SOP Common (C.12.1)
- RT Series (C.8.8.1)
- Structure Set (C.8.8.5)
- ROI Contour (C.8.8.6)
- RT ROI Observations (C.8.8.8)
To generate a valid DICOM file, at least the following fields must not be empty:
Manufacturer
(used for DICOM tag Manufacturer)Label
(DICOM tag Structure Set Label)
Each CSO group defines a ROI in the RTSTRUCT, which is defined as an item in the Structure Set ROI Sequence. The following tags are assigned for the ROI:
- ROI Number - Taken from the CSO group user data, the “ROINumber” is used if set; otherwise, it is derived from the CSO ID or the next available number if that is already in use
- ROI Name - Taken from CSO group label
- ROI Description - Taken from CSO group description if set; otherwise, it is not created
- ROI Volume - Taken from CSO group user data “ROIVolume” if set; otherwise, it is not created
- ROI Generation Algorithm - Taken from the CSO group user data “ROIGenerationAlgorithm” if set; otherwise, it is obtained from the enum field :field:generationAlgorithm, where the value ‘None’ is mapped to the empty string
- ROI Generation Description - Taken from CSO group user data “ROIGenerationDescription” if set; otherwise, it is not created
Each CSO group also defines an item in the RT ROI Observations Sequence. The following tags are set for this item:
- Referenced ROI Number - Same as ROI Number in the Structure Set ROI Sequence
- Observation Number - Same as Referenced ROI Number
- RT ROI Interpreted Type - Taken from CSO group user data “RTROIInterpretedType” if set; otherwise, it is left empty
- ROI Interpreter - Taken from CSO group user data “ROIInterpreter” if set; otherwise, it is left empty
Each CSO group also defines an item in the ROI Contour Sequence, which contains the actual contour data. The CSO group color defines the ROI Display Color value. Each CSO in the group defines an item in the Contour Sequence with the following tags:
- Contour Geometric Type - Depending on the ROI type, it is one of POINT, OPEN_PLANAR, OPEN_NONPLANAR, and CLOSED_PLANAR. Note that closed non-planar CSOs cannot be mapped to a contour. If such CSOs are encountered, a warning will be issued, the
Had Error
flag will be set, and the CSO will be ignored. - Number of Contour Points - The number of CSO path points
- Contour Data - The CSO path points
Input Fields¶
inCSOList¶
-
name:
inCSOList
, type:
CSOList(MLBase)
¶ The CSOList containing the contours to be converted into an RT Structure Set.
For accessing this object via scripting see the Scripting Reference:MLCSOListWrapper
.
Output Fields¶
outDicom¶
-
name:
outDicom
, type:
MutableDicomTree(MLBase)
¶ The DICOM tree containing the RT Structure Set.
For accessing this object via scripting see the Scripting Reference:MLABMutableDicomTree
.
Parameter Fields¶
Field Index¶
Clear : Trigger |
Name : String |
Description : String |
Number of decimal places : Integer |
Generation Algorithm : Enum |
numberOfTimePoints : Integer |
Had Error : Bool |
Time Point : Integer |
Label : String |
Update : Trigger |
Manufacturer : String |
Use time points from CSOs : Bool |
Mode : Enum |
|
Model Name : String |
Visible Fields¶
Label¶
-
name:
structureSetLabel
, type:
String
¶ Sets a user-defined label for Structure Set. Used for mandatory DICOM tag ‘Structure Set Label’.
Name¶
-
name:
structureSetName
, type:
String
¶ Sets a user-defined name for Structure Set. Written to DICOM tag ‘Structure Set Name’ if set.
Description¶
-
name:
structureSetDescription
, type:
String
¶ Sets a user-defined description for Structure Set. Written to DICOM tag ‘Structure Set Description’ if set.
Manufacturer¶
-
name:
manufacturer
, type:
String
¶ Sets the manufacturer of the RTSTRUCT. Used for mandatory DICOM tag ‘Manufacturer’.
Model Name¶
-
name:
manufacturersModelName
, type:
String
¶ Sets the model name that produced the RTSTRUCT instance.
Use time points from CSOs¶
-
name:
useCSOTimePoints
, type:
Bool
, default:
TRUE
¶ If checked, the referenced image is taken from the time point saved in the CSO; otherwise, the time point set in
Time Point
is used.
Time Point¶
-
name:
timePoint
, type:
Integer
, default:
0
¶ Sets the zero-based time point index if the image is a 4D image.
If
Use time points from CSOs
is not set, this time point is used as reference time point for all contours.
Number of decimal places¶
-
name:
pointPrecision
, type:
Integer
, default:
6
¶ Sets the number of decimal places used for writing the x, y, and z components of each contour point. The default is 6, and the maximum is 10.
Mode¶
-
name:
updateMode
, type:
Enum
, default:
AUTO_UPDATE
¶ Defines how to react upon changes in the input CSO list or input image.
Values:
Title | Name | Description |
---|---|---|
Off | OFF | Do nothing, 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. |
Generation Algorithm¶
-
name:
generationAlgorithm
, type:
Enum
, default:
NONE
¶ Defines the generation mode for the ROI and defines the DICOM tag ROI Generation Algorithm.
Values:
Title | Name | Description |
---|---|---|
Automatic | AUTOMATIC | Calculated ROI |
Semiautomatic | SEMIAUTOMATIC | ROI calculated with user assistance |
Manual | MANUAL | User-entered ROI |
None | NONE | No algorithm defined (tag will be empty) |