MLToRTStructureSetConverter

MacroModule
author Alexander Köhn
package FMEwork/ReleaseMeVis
definition MLToRTStructureSetConverter.def
keywords rt, dicom, converter, csolist, structureset

Purpose

Converts ML datatypes (CSOList and DICOMTree of an image) to valid RTStructureSet IOD.

Usage

Connect source CSOList to inCSOList and source image to inImage. Enter additional information in the UI of the module and press ‘Update’.

Details

This module adds additional information to the RTStructureSet created out of a given CSOList, which is needed in order to create a valid RTStructureSet IOD. Currently these include:

  • The following DICOM modules are copied from the inImage DicomTree:
  • The SeriesInstanceUID (0020,000E) is generated anew.
  • ‘Manufacturer’ (0008,0070) from the field Manufacturer is set
  • ‘ManufacturerModelName’ (0008,1090) from the field Manufacturer Model Name is set
  • ‘StructureSetName’ (3006,0004) from the field Name is set
  • ‘StructureSetDescription’ (3006,0006) from the field Description is set
  • ‘StructureSetLabel’ (3006,0002) from the field Label is set
  • ‘TimezoneOffsetFromUTC’ (0008,0201) from the field Timezone Offset From UTC is set
  • ‘StructureSetDate’ (3006,0008) is set to now
  • ‘StructureSetTime’ (3006,0009) is set to now
  • ‘InstanceCreationDate’ (0008,0012) is set to now
  • ‘InstanceCreationTime’ (0008,0013) is set to now
  • The value of FrameOfReferenceUID (0020,0052) from the inImage is added to ‘ReferencedFrameOfReferenceSequence’
  • An item is added to ‘RTReferencedStudySequence’ (3006,0012):
    • ‘ReferencedSOPClassUID’ (0008,1150) is set to ‘1.2.840.10008.3.1.2.3.2’ (UID_RETIRED_StudyComponentManagementSOPClass)
    • ‘ReferencedSOPInstanceUID’ (0008,1155) is set to StudyInstanceUID of the inImage
    • An item is added to ‘RTReferencedSeriesSequence’ (3006,0014):
      • ‘SeriesInstanceUID’ (0020,000E) is set to the SeriesInstanceUID of the inImage
      • For each slice of the inImage with at least one CSO an item is added to ‘ContourImageSequence’:
        • ‘ReferencedFrameNumber’ (0008,1160) is set to 1
        • ‘ReferencedSOPClassUID’ (0008,1150) is set to the SOPClassUID of the inImage
        • ‘ReferencedSOPInstanceUID’ (0008,1155) is set the SOPInstanceUID of the inImages slice
  • For each item of the ‘StructureSetROISequence’ (i.e. each CSOGroup) the following is set:
    • ‘ReferencedFrameOfReferenceUID’ is set to the FoR of inImage
  • For each item of the ‘ROIContourSequence’ (i.e. each CSOGroup) the following is set:
    • For each item of the ‘ContourSequence’ (i.e. each CSO in the CSOGroup) the following is set:
      • ‘ContourSlabThickness’ is set to the z-extent of inImage
      • An item is added to the ‘ContourImageSequence’:
        • ‘ReferencedSOPClassUID’ is set to SOPClassUID of inImage
        • ‘ReferencedSOPInstanceUID’ is set to SOPInstanceUID of the inImage corresponding slice
        • ‘ReferencedFrameNumber’ is set to 1
  • For each item of the ‘RTROIObservationsSequence’ (i.e. each CSOGroup) the following is set:
    • ‘RTROIInterpretedType’ (3006,00a4) is set to the value stored in the CSOGroup’s userData with the key ‘RTROIInterpretedType’.
  • To be able to create a valid SOPInstance UID for the StructureSet you have to set the field Dicom UIDPrefix. Have a look e.g. here: https://groups.google.com/forum/?fromgroups=#!topic/comp.protocols.dicom/qlXA1OBGBpA

Windows

Default Panel

../../../Modules/Macros/MLToRTStructureSetConverter/mhelp/Images/Screenshots/MLToRTStructureSetConverter._default.png

Input Fields

inCSOList

name: inCSOList, type: MLBase

This input Base connector must be connected to a CSOList, which gets converted to a RTStructureSet.

inImage

name: inImage, type: Image

This input image connector must be connected to a MLImage, from which the DICOM tags are used to complement the RTStructureSet information (e.g. Patient and Study information).

Output Fields

outRTStruct

name: outRTStruct, type: MLBase

The RTStructureSet IOD wrapped in a Base object.

Parameter Fields

Field Index

Description: String
Dicom UIDPrefix: String
Label: String
Manufacturer: String
Manufacturer Model Name: String
Name: String
progress: Float
Timezone Offset From UTC: String

Visible Fields

Name

name: name, type: String

User-defined name for Structure Set.

Description

name: description, type: String

User-defined description for Structure Set.

Label

name: label, type: String

User-defined label for Structure Set.

Manufacturer

name: manufacturer, type: String

Manufacturer of the equipment that produced the composite instances.

Manufacturer Model Name

name: manufacturerModelName, type: String

Manufacturer’s model name of the equipment that contributed to the composite instance.

Timezone Offset From UTC

name: timezoneOffsetFromUTC, type: String, default: +0100

Contains the offset from UTC to the timezone for all DA and TM Attributes present in this SOP Instance. Encoded as an ASCII string in the format “&ZZZZ”. The components of this string, from left to right, are & = “+” or “-”, and ZZZZ = Hours and Minutes of offset. Notes: 1. This encoding is the same as described in PS 3.5 for the DT Value Representation. 2. This Attribute does not apply to values with a DT Value Representation, which may contain an explicitly encoded timezone. 3. The corrected time may cross a 24 hour boundary. For example, if Local Time = 1.00 a.m. and Offset = +0200, then UTC = 11.00 p.m. (23.00) the day before. 4. The “+” sign may not be omitted. Time earlier than UTC is expressed as a negative offset. Note: For example: UTC = 5.00 a.m. Local Time = 3.00 a.m. Offset = -0200 The local timezone offset is undefined if this Attribute is absent. Contributing Equipment Sequence (0018,A001) 3 Sequence of Items containing descriptive attributes of related equipment which has contributed to the acquisition, creation or modification of the composite instance. One or more Items may be included in this Sequence. See C.12.1.1.5 for further explanation.

Dicom UIDPrefix

name: dicomUIDPrefix, type: String

To be able to create a valid SOPInstance UID for the StructureSet you have to set the field ‘dicomUIDPrefix’. Have a look e.g. here: https://groups.google.com/forum/?fromgroups=#!topic/comp.protocols.dicom/qlXA1OBGBpA

Hidden Fields

progress

name: progress, type: Float, default: 0