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¶
This module 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¶
Creating of the contours is done automatically if the Mode
is set to AUTO_UPDATE, otherwise on pressing the Update
button.
Details¶
This module create 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 sub-images) 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 should 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 set for the ROI:
- ROI Number - taken from CSO group user data “ROINumber” if set, otherwise from the CSO ID, or the next available number, if that is already used
- ROI Name - taken from CSO group label
- ROI Description - taken from CSO group description if set, otherwise not created
- ROI Volume - taken from CSO group user data “ROIVolume” if set, otherwise not created
- ROI Generation Algorithm - taken from CSO group user data “ROIGenerationAlgorithm” if set, otherwise taken from field generation
Generation Algorithm
- ROI Generation Description - taken from CSO group user data “ROIGenerationDescription” if set, otherwise 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 empty
- ROI Interpreter - taken from CSO group user data “ROIInterpreter” if set, otherwise 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 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
¶ User-defined label for Structure Set. Used for mandatory DICOM tag ‘Structure Set Label’.
Name¶
-
name:
structureSetName
, type:
String
¶ User-defined name for Structure Set. Written to DICOM tag ‘Structure Set Name’ if set.
Description¶
-
name:
structureSetDescription
, type:
String
¶ User-defined description for Structure Set. Written to DICOM tag ‘Structure Set Description’ if set.
Manufacturer¶
-
name:
manufacturer
, type:
String
¶ Manufacturer of the RTSTRUCT. Used for mandatory DICOM tag ‘Manufacturer’.
Model Name¶
-
name:
manufacturersModelName
, type:
String
¶ Model name that produced the RTSTRUCT instance.
Use time points from CSOs¶
-
name:
useCSOTimePoints
, type:
Bool
, default:
TRUE
¶ If set, the referenced image is taken from the time point saved in the CSO, otherwise
Time Point
is used.
Time Point¶
-
name:
timePoint
, type:
Integer
, default:
0
¶ 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
¶ The number of decimal places used for writing the x, y and z components of each contour point. Defaults to 6, maximum is 10.
Mode¶
-
name:
updateMode
, type:
Enum
, default:
AUTO_UPDATE
¶ What to do when the input CSO list or image 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. |
Generation Algorithm¶
-
name:
generationAlgorithm
, type:
Enum
, default:
NONE
¶ The generation mode for the ROI. 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) |