DicomModifyMLToRTStructPlugin¶
- MLModule¶
author
package
dll
definition
see also
RTStructToML,RTStructInfo,ModifyDicomTree,CreateEmptyRTObjectkeywords
Purpose¶
DicomModifyMLToRTStructPlugin converts inCSOList and input0 to Structure Set ROI Sequence (3006,0020), RT ROI Observations Sequence (3006,0080), ROI Contour Sequence (3006,0039) and Referenced Frame of Reference Sequence (3006,0010). The sequences can be added to a DICOM tree via ModifyDicomTree along with other tag modifications. For all modifications performed by this module see Details section.
Usage¶
See example network to see how to use DicomModifyMLToRTStructPlugin.
Details¶
The module performs the following:
- Structure Set Module:
- Referenced Frame of Reference Sequence (3006,0010) is added. Sequence contains one item item0:
item0’s Frame of Reference UID (0020,0052) is set to
input0’s Frame Of Reference UID.- RT Referenced Study Sequence (3006,0012) is added to the item0. Sequence contains one item item1:
item1’s Referenced SOP Class UID (0008,1150) is set to 1.2.840.10008.3.1.2.3.2 (Study Component Management SOP Class (Retired)).
item1’s Referenced SOP Instance UID (0008,1155) is set to
input0’s Study Instance UID (0020, 000D).- RT Referenced Series Sequence (3006,0014) is added to the item1. Sequence contains one item item2:
item2’s Series Instance UID (0020,000E) is set to
input0’s Series Instance UID.- Contour Image Sequence (3006,0016) is added to the item2. For each
input0’s slice ifReference All Image Slicesis true, otherwise only for slices containing at least one CSO, an item item3 is added: item3’s Referenced Frame Number (0008,1160) is set to 1.
item3’s Referenced SOP Class UID (0008,1150) is set to
input0’s SOP Class UID (0008,0016).item3’s Referenced SOP Instance UID (0008,1155) is set to slice’s SOP Instance UID (0008,0018).
- Contour Image Sequence (3006,0016) is added to the item2. For each
- Structure Set ROI Sequence (3006,0020) is added. For each
inCSOList’s CSOGroup (1..i..n, n - number of CSOGroups) an item item is added: item’s ROI Number (3006,0022) is set to i.
item’s Referenced Frame Of Referenced UID (3006,0024) is set to
input0’s Frame of Reference UID (0020,0052).item’s ROI Name (3006,0026) is set to CSOGroup’s label.
item’s ROI Description (3006,0028) is set to CSOGroup’s description.
- Structure Set ROI Sequence (3006,0020) is added. For each
- ROI Contour Module:
- ROI Contour Sequence (3006,0039) is added. For each
inCSOList’s CSOGroup (1..i..n, n - number of CSOGroups) an item item0 is added: item0’s Referenced ROI Number (3006,0084) is set to i.
item0’s ROI Display Color (3006,002A) is set to CSOGroup’s path point color.
- Contour Sequence (3006,0040) is added to the item0. For each CSOGroup’s CSO (1..j..m, m - number of CSOs) an item item1 is added:
item1’s Contour Number (3006,0048) is set to j.
- item1’s Contour Geometric Type (3006,0042) is set to:
“POINT” if CSO is of “SUB_TYPE_POINT” sub type.
“CLOSED_PLANAR” if CSO is of “SUB_TYPE_CLOSED_POLYLINE” sub type and is closed.
“OPEN_PLANAR” if CSO is of “SUB_TYPE_OPEN_POLYLINE” sub type, is not closed and is in plane.
“OPEN_NONPLANAR” if CSO is of “SUB_TYPE_OPEN_POLYLINE” sub type, is not closed and is not in plane.
item1’s Contour Slab Thickness (3006,0044) is set to
input0’s Slice Thickness (0018,0050).item1’s Number Of Contour Points (3006,0046) is set to CSO’s total number of unique path points.
item1’s Contour Data (3006,0050) is set to coordinates of CSO’s path points.
- ROI Contour Sequence (3006,0039) is added. For each
- RT ROI Observations Module:
- RT ROI Observations Sequence (3006,0080) is added. For each
inCSOList’s CSOGroup (1..i..n, n - number of CSOGroups) an item item is added: item’s Observation Number (3006,0082) is set to i.
item’s Referenced ROI Number (3006,0084) is set to i.
item’s RT ROI Interpreted Type (3006,00A4) is set to CSOGroup’s user data found under key “RTROIInterpretedType”.
- RT ROI Observations Sequence (3006,0080) is added. For each
Windows¶
Default Panel¶
Input Fields¶
input0¶
- name: input0, type: Image¶
Input CT or MR image.
inCSOList¶
- name: inCSOList, type: MLBase¶
Input CSO List. The module does not accept CSOLists with ungrouped CSOs.
inputModifierList¶
- name: inputModifierList, type: MLBase¶
Here other DicomModifyPlugin module can be connected in order to apply further modification to a DICOM tree.
Output Fields¶
outputModifierList¶
- name: outputModifierList, type: MLBase¶
The
outputModifierListfields provides a reference-counted Base object to be connected to other DicomModifyPlugin modules or toModifyDicomTreeto apply modifications to a DICOM tree.
Parameter Fields¶
Field Index¶
|
|
|
Visible Fields¶
Precision¶
- name: precision, type: Integer, default: 2, minimum: 0¶
Contour data numerical precision.
Reference All Image Slices¶
- name: referenceAllImageSlices, type: Bool, default: FALSE¶
Should reference all image slices in the Referenced Frame Of Reference Sequence in the Structure Set Module. If not set, only the slices where CSOs lie completely in the slice will be referenced.
Treat collinear CSOs as planar¶
- name: treatCollinearAsPlanar, type: Bool, default: FALSE¶
If this option is set, collinear CSOs (i.e. CSOs that form a straight line) are treated as planar and marked as such. If this is not set, collinear CSOs are always marked as OPEN_NONPLANAR (since there seems to be no value CLOSED_NONPLANAR in DICOM tag ContourGeometricType).
CSO Image Reference Mode¶
- name: csoImageReferenceMode, type: Enum, default: RequireExactlyOneSlice¶
When to reference image slices from a Contour Sequence.
Values:
Title |
Name |
Description |
|---|---|---|
Require Exactly One Slice |
RequireExactlyOneSlice |
Always reference an image slice from a contour. It is required that all CSOs lie on a valid slice of the image, if this isn’t the case an error is thrown. |
Reference Image If One Slice |
ReferenceImageIfOneSlice |
Reference an image slice from a contour if the CSO lies on one valid image slice. It is no error if a CSO lies on a slice outside the image volume or if the CSO intersects several slices, there just will be no image slice reference created. |
Do Not Reference Image |
DoNotReferenceImage |
Never reference an image slice from individual contours. |