WEMDicomSave

MacroModule
genre DICOM
author MeVis Medical Solutions AG
package MeVisLab/Standard
definition WEMDicomSave.def
see also WEMDicomLoad, WEMSave, WEMLoad
keywords save, store, write, mesh, surface, segmentation, object, sso

Purpose

The module WEMDicomSave saves a WEM object as a DICOM Surface Segmentation Object.

Usage

Connect a WEM to inWEM and some reference DICOM tree to inRefTree, fill in the required fields, and press Save.

Details

The module will copy a number of required tags from inRefTree. Each WEM patch will be put into its own segment. If you require something different, you need to copy this module (or use the wrapper used in this module directly) and modify the use of addSurface and addSegment accordingly.

Windows

Default Panel

../../../Modules/Macros/WEMDicomStorage/mhelp/Images/Screenshots/WEMDicomSave._default.png

Input Fields

inWEM

name: inWEM, type: WEM(MLBase)

Connect a WEM object to this input.

For accessing this object via scripting see the Scripting Reference: MLWEMWrapper.

inRefTree

name: inRefTree, type: DicomTree(MLBase)

Connect a reference DICOM tree to this input. If you only have a reference image, you can use GetDicomTreeFromImage to extract the DICOM information.

For accessing this object via scripting see the Scripting Reference: MLABDicomTree.

Parameter Fields

Field Index

Algorithm Name: String Copy Equipment Tags From Reference: Bool Save: Trigger
Algorithm Type: Enum Device Serial Number: String Scheme: String
Algorithm Version: String Filename: String segmentationPropertyMappingJSON: String
Code: String Instance Number: Integer Series Number: Integer
Content Creators Name: String Manufacturer: String Set Now: Trigger
Content Date: String Manufacturers Model Name: String Software Versions: String
Content Description: String Meaning: String Status: String
Content Label: String Ok: Bool  
Content Time: String referenceReferenceTree: Bool  

Visible Fields

Filename

name: filename, type: String

Sets the filename to save the resulting DICOM file under.

Save

name: save, type: Trigger

When pressed, the generation and saving of the DICOM file is triggered.

Status

name: status, type: String, persistent: no

Shows error reasons if Ok is not true; otherwise, it will just show “Ok”.

Ok

name: ok, type: Bool, persistent: no

Shows whether the last save operation performed without problems.

Copy Equipment Tags From Reference

name: copyEquipmentTagsFromReference, type: Bool, default: TRUE

If checked, copies the equipment tags from inRefTree; otherwise, the equipment tag values must be filled.

Manufacturer

name: manufacturer, type: String

Sets the value of the Manufacturer (0008,0070) tag.

Manufacturers Model Name

name: manufacturersModelName, type: String

Sets the value of the ManufacturersModelName (0008,1090) tag.

Device Serial Number

name: deviceSerialNumber, type: String

Sets the value of the DeviceSerialNumber (0008,1000) tag.

Software Versions

name: softwareVersions, type: String

Sets the value of the SoftwareVersions (0008,1020) tag.

Set Now

name: setContentDateTimeToNow, type: Trigger

Sets the value of Content Date and Content Time to the current time.

Content Date

name: contentDate, type: String

Sets the value of the ContentDate (0008,0023) tag.

Content Time

name: contentTime, type: String

Sets the value of the ContentTime (0008,0033) tag.

Content Label

name: contentLabel, type: String

Sets the value of the ContentLabel (0070,0080) tag.

Content Description

name: contentDescription, type: String

Sets the value of the ContentDescription (0070,0081) tag.

Content Creators Name

name: contentCreatorsName, type: String

Sets the value of the ContentCreatorsName (0070,0084) tag.

Series Number

name: seriesNumber, type: Integer, default: 1, minimum: 1

Sets the value of the SeriesNumber (0020,0011) tag.

This should be the number of the (generated) series in the study given by inRefTree. To be correct, one would need to know how many series have been generated for the study already, but probably one can get away with an incorrect number (there is always the SeriesInstanceUID that is guaranteed to be unique).

Instance Number

name: instanceNumber, type: Integer, default: 1, minimum: 1

Sets the value of the InstanceNumber (0020,0013) tag.

The number of the generated instance in the current (generated) series. 1 should always be correct.

Algorithm Type

name: algorithmType, type: Enum, default: AUTOMATIC

Sets the value of the SegmentAlgorithmType (0062,0008) tag in the SegmentSequence (0062,0002) sequence.

Values:

Title Name
Automatic AUTOMATIC
Semiautomatic SEMIAUTOMATIC
Manual MANUAL

Algorithm Name

name: algorithmName, type: String

Sets the value of the AlgorithmName (0066,0036) tag in the SegmentSurfaceGenerationAlgorithmIdentificationSequence (0066,002D) sequence in the ReferencedSurfaceSequence (0066,002B) sequence in the SegmentSequence (0062,0002) sequence.

This should be the user-defined name of the algorithm used to generate the surface.

Algorithm Version

name: algorithmVersion, type: String

Sets the value of the AlgorithmVersion (0066,0031) tag in the SegmentSurfaceGenerationAlgorithmIdentificationSequence (0066,002D) sequence in the ReferencedSurfaceSequence (0066,002B) sequence in the SegmentSequence (0062,0002) sequence.

This should be the user-defined version string of the algorithm used to generate the surface.

Code

name: algorithmCode, type: String

Sets the value of the CodeValue (0008,0100) tag (or LongCodeValue (0008,0119) tag) in the AlgorithmFamilyCodeSequence (0066,002F) sequence in the SegmentSurfaceGenerationAlgorithmIdentificationSequence (0066,002D) sequence in the ReferencedSurfaceSequence (0066,002B) sequence in the SegmentSequence (0062,0002) sequence.

This identifies the principal type of algorithm employed. This will be automatically set if the user selects one of the predefined values offered for Meaning.

Scheme

name: algorithmScheme, type: String

Sets the value of the CodingSchemeDesignator (0008,0102) tag in the AlgorithmFamilyCodeSequence (0066,002F) sequence in the SegmentSurfaceGenerationAlgorithmIdentificationSequence (0066,002D) sequence in the ReferencedSurfaceSequence (0066,002B) sequence in the SegmentSequence (0062,0002) sequence.

This serves as a namespace for Code value. This will be automatically set if the user selects one of the predefined values offered for Meaning.

Meaning

name: algorithmMeaning, type: String

Sets the value of the CodeMeaning (0008,0104) tag in the AlgorithmFamilyCodeSequence (0066,002F) sequence in the SegmentSurfaceGenerationAlgorithmIdentificationSequence (0066,002D) sequence in the ReferencedSurfaceSequence (0066,002B) sequence in the SegmentSequence (0062,0002) sequence.

This is the user-readable description for Code. There is a list of predefined values. Selecting one of these will also set Code and Scheme.

Hidden Fields

referenceReferenceTree

name: referenceReferenceTree, type: Bool, default: FALSE

If checked, all SOPInstanceUIDs contained in the inRefTree will be referenced in the ReferencedSeriesSequence (0008,1115) tag.

segmentationPropertyMappingJSON

name: segmentationPropertyMappingJSON, type: String

Sets the JSON representation of a map that will map WEM patch labels to SegmentedPropertyCategoryCodeSequence (0062,0003) and SegmentedPropertyTypeCodeSequence (0062,000F) values. These will tell what is represented by these surfaces. The user interface for this will have selection lists for the category meaning and category type columns that will automatically fill the code and scheme columns for the user.