Purpose

The module DicomTagModify modifies the DICOM tags of an image.

The DICOM tags are stored in a list associated with the image and are considered to be part of the image properties.

Similar to the module ImagePropertyConvert, the module DicomTagModify modifies the properties of the input image and gives access to the result at its image output field.

Usage

Up to six DICOM tags can be specified in the Tag Name fields, either by their tag names or by their group/element IDs in hexadecimal (gggg,eeee) notation. New values for these tags are entered in the corresponding Tag Value fields.

A tag can be removed from the image’s tag list by checking the Remove checkbox. The Get Values button resets the Tag Value fields to the original input values.

If Auto Apply is enabled, all modifications are applied immediately to the output image, otherwise the Apply button must be clicked to update the output image.

Details

The DICOM tag list of an image is usually read from the DICOM file containing the source image data and may contain a large amount of data. In order to not unnecessarily duplicate this data when only a part of the list (e.g. a single DICOM tag) is modified, only the modified tags are stored with the output image properties. The unmodified tags are inherited by a reference to the input image properties.

This approach allows to differentiate between tags owned by an image, inherited from a predecessor image, or read from the original DICOM source image. The Tag List Subset setting of the module DicomTagViewer refers to these categories.

Windows

Default Panel

../../../Modules/ML/MLImageFile/mhelp/Images/Screenshots/DicomTagModify._default.png

Input Fields

input0

name: input0, type: Image

The source image.

inReferenceImage

name: inReferenceImage, type: Image

An optional reference image which is used with Synchronize Tags String.

Output Fields

output0

name: output0, type: Image

The resulting image.

Parameter Fields

Field Index

0: String removeTag2: Bool tagValue2: String
1: String removeTag3: Bool tagValue3: String
2: String removeTag4: Bool tagValue4: String
3: String removeTag5: Bool tagValue5: String
4: String Source tags present: Bool tagVR0: String
5: String stdTagVR0: Bool tagVR1: String
Apply: Trigger stdTagVR1: Bool tagVR2: String
Auto Apply: Bool stdTagVR2: Bool tagVR3: String
Discard Source Tags: Enum stdTagVR3: Bool tagVR4: String
Get Values: Trigger stdTagVR4: Bool tagVR5: String
Modify Tags String: String stdTagVR5: Bool Trim Spaces: Bool
Remove Tags String: String Synchronize Tags String: String Update Mode: Enum
removeTag0: Bool tagValue0: String Use Tags String: Bool
removeTag1: Bool tagValue1: String  

Visible Fields

0

name: tagName0, type: String

1

name: tagName1, type: String

2

name: tagName2, type: String

3

name: tagName3, type: String

4

name: tagName4, type: String

5

name: tagName5, type: String

Discard Source Tags

name: discardSource, type: Enum, default: None

defines whether all or certain parts of the input DICOM tags are discarded.

Values:

Title Name Deprecated Name
None None FALSE
All Source AllSource TRUE
All Private AllPrivate  
Frame Specific FrameSpecific  

Source tags present

name: sourcePresent, type: Bool, persistent: no

Shows whether Dicom tags from the source image are available.

Use Tags String

name: useTagsString, type: Bool, default: FALSE

If checked, a list of name/value pairs to modify and a list of names to remove can be given.

Modify Tags String

name: modifyTagsString, type: String

Sets a list of name/value(/VR) pairs to modify.

The name can be given as a description name or as in group/entry format. If group/entry format is chosen, it must be escaped with quotes:

"(0008,0040)"

A VR can be given optionally. If the tag is a standard tag, the standard VR overwrites the VR set by the user. If no VR is given and the tag is unknown, UT is set as VR.

Value strings containing spaces or commas must be enclosed in escaped quotes.

The name/value/VR entries must be separated by space, multiple entries must be separated by comma:

"(0008,0040)" FirstEntry, SeriesDescription \"Value Containing Spaces\" UT

If you want to specify several sub-values separated by backslash you need to replace each backslash by four backslashes:

ImageType DERIVED\\\\SECONDARY\\\\OTHER\\\\MEVIS CS

Remove Tags String

name: removeTagsString, type: String

Sets a list of names separated by spaces to be removed.

The name can be given as a description name or as in group/entry format. If group/entry format is chosen, it must be escaped with quotes:

"(0008,0040)"

Synchronize Tags String

name: synchronizeTagsString, type: String

Sets a list of names separated by spaces to be synchronized from the reference image.

The name can be given as a description name or as in group/entry format. If group/entry format is chosen, it must be escaped with quotes:

"(0008,0040)"

If the respective tag exists in the reference image, it will overwrite the same tag in the resulting image. If the tag does not exist, the tag will also be removed from the resulting image, if it existed in the source image.

Get Values

name: getValues, type: Trigger, deprecated name: getTagValues

If pressed, the values are read anew from the Dicom tags of the input image.

Trim Spaces

name: trimSpaces, type: Bool, default: TRUE, deprecated name: eliminateTrailingSpaces

If checked, trailing spaces of tag values are removed automatically.

Apply

name: apply, type: Trigger

If pressed, the new values are written to the tags of the output image.

Auto Apply

name: autoApply, type: Bool, default: FALSE

If checked, changes of parameter fields lead to an update of the output image.

Update Mode

name: updateMode, type: Enum, default: AutoUpdate

Defines how the module behaves on changing its input image fields.

Values:

Title Name Description
Update AutoUpdate On changing any input image field, the module automatically attempts to set new DICOM tag values.
Clear AutoClear On changing any input image field, the module clears (invalidates) its output image.

Hidden Fields

tagValue0

name: tagValue0, type: String

removeTag0

name: removeTag0, type: Bool, default: FALSE

tagVR0

name: tagVR0, type: String

stdTagVR0

name: stdTagVR0, type: Bool, default: FALSE

tagValue1

name: tagValue1, type: String

removeTag1

name: removeTag1, type: Bool, default: FALSE

tagVR1

name: tagVR1, type: String

stdTagVR1

name: stdTagVR1, type: Bool, default: FALSE

tagValue2

name: tagValue2, type: String

removeTag2

name: removeTag2, type: Bool, default: FALSE

tagVR2

name: tagVR2, type: String

stdTagVR2

name: stdTagVR2, type: Bool, default: FALSE

tagValue3

name: tagValue3, type: String

removeTag3

name: removeTag3, type: Bool, default: FALSE

tagVR3

name: tagVR3, type: String

stdTagVR3

name: stdTagVR3, type: Bool, default: FALSE

tagValue4

name: tagValue4, type: String

removeTag4

name: removeTag4, type: Bool, default: FALSE

tagVR4

name: tagVR4, type: String

stdTagVR4

name: stdTagVR4, type: Bool, default: FALSE

tagValue5

name: tagValue5, type: String

removeTag5

name: removeTag5, type: Bool, default: FALSE

tagVR5

name: tagVR5, type: String

stdTagVR5

name: stdTagVR5, type: Bool, default: FALSE