DicomModifyTagsPlugin¶
-
MLModule
¶ genre DICOM
author Wolf Spindler
package FMEstable/ReleaseMeVis
dll MLDicomModify
definition MLDicomModify.def see also DicomModifyCreateTree
,DirectDicomImport
,ModifyDicomTreeAndImage
,DicomModifyMultiFileVolumeExport
,DicomTreeCompare
,DicomTreeValidate
,ApplyDicomPixelModifiers
,DicomRescale
,DicomFrameSelect
,DicomTagModify
,DicomModifyImageTagsPlugin
,DicomModifySubTreeSelectorPlugin
keywords DICOM
,tag
,modify
,change
,replace
,manipulate
Purpose¶
The DicomModifyTagsPlugin
provides a number of DCMTree::Tag manipulators which can be applied to DCMTree::Trees. It is added typically via a base connector to modules which want to modify DCMTree::Trees.
Currently it has the following sections:
- Adding, removal, and modification of ordinary (standard) DICOM tags.
- Removal of private tags, creators and tags groups.
- Adding or replacement of private tags together with their private creators.
- Removal, reset (making empty), resize of sequence tags and inserting/appending entries.
- Removal or replacement of possible type 2 or 3 tags.
- Adding or replacement of tags with multiple values of value representation OB, OW, or OF.
Input Fields¶
inputModifierList¶
-
name:
inputModifierList
, type:
MLBase
¶ Here other
DicomModifyTagsPlugin
modules can be connected which to apply further tag manipulations. In this way an arbitrary number of tag manipulations can be appended. Appended plugin modules are applied first, which means that the last module in a sequence of modification plugins is applied first. This is important if changes of one plugin shall or shall not overwrite changes of another one.
Output Fields¶
outputModifierList¶
-
name:
outputModifierList
, type:
MLBase
¶ The
outputModifierList
fields provides a reference-counted Base object to be connected to modules which then can useDicomModifyTagsPlugin
to apply modifications to DICOM trees. Typically this are modules handling DCMTrees or otherDicomModifyTagsPlugin
(or derived) modules.
Parameter Fields¶
Field Index¶
Visible Fields¶
Id (tagId0)¶
-
name:
tagId0
, type:
String
¶ The DICOM tag id in the format (ABCDE,EFGH) where ABCD and EFGH must be 4 hexadecimal digits or the space-less name of the DICOM tag.
Value (value0)¶
-
name:
value0
, type:
String
¶ The string value used to modify the DICOM tag dependent on the used mode.
Modification Mode0¶
-
name:
modificationMode0
, type:
Enum
, default:
DoNotModify
¶ The way how the DICOM tag with the given id is modified with value.
Values:
Title | Name | Description |
---|---|---|
Do Not Modify | DoNotModify | The tag is not modified at all. |
Add If It Does Not Exist | AddIfItDoesNotExist | The tag is added if it is not found in the source tree, otherwise it is left unchanged. |
Remove Tag | RemoveTag | The is removed if found in the source tree, otherwise nothing is done. |
Replace Only If It Exists | ReplaceOnlyIfItExists | If the tag is found then its value is replaced with the new value. |
Prepend Only If It Exists | PrependOnlyIfItExists | If the tag is found then the string is appended after the existing tag value. |
Append Only If It Exists | AppendOnlyIfItExists | If the tag is found then the string is appended after the existing tag value. |
Replace If It Exists Otherwise Add | ReplaceIfItExistsOtherwiseAdd | The tag value is replaced if the tag is found, otherwise a new tag with the value is added. |
Prepend If It Exists Otherwise Add | PrependIfItExistsOtherwiseAdd | The value is inserted at the begin of the tag value if the tag is found, otherwise a new tag with the value is added. |
Append If It Exists Otherwise Add | AppendIfItExistsOtherwiseAdd | The value is inserted at the end of the tag value if the tag is found, otherwise a new tag with the value is added. |
Set New UIDOnly If It Exists | SetNewUIDOnlyIfItExists | If the tag exists then its tag value is replaced a newly created DICOM UID. |
Set New UIDIf It Exists Otherwise Add | SetNewUIDIfItExistsOtherwiseAdd | If the tag exists then its tag value is replaced a newly created DICOM UID. If the tag does not exist then a new one is created and its value is set to a newly created DICOM UID. |
Set Other Values If It Exists Otherwise Add | SetOtherValuesIfItExistsOtherwiseAdd | The tag is set/recreated with the given Other VR0 and the values from the Value are cast and set as values; this modes also sets the value representation. |
Replace Other Values Only If It Exists | ReplaceOtherValuesOnlyIfItExists | If the tag is found and has the value representation OB (Other Byte), OW (Other Word), or OF (Other Float), then all numeric values from the string are cast to that value representation. In contrast to the mode SetOtherValuesIfItExistsOtherwiseAdd it does not change the value representation. If the tag is not found then nothing is done. |
Split0¶
-
name:
split0
, type:
Bool
, default:
FALSE
¶ If this checkbox is active then the tag value is split at backslashes to multiple values, otherwise it is set as one value.
Other VR0¶
-
name:
otherVR0
, type:
Enum
, default:
OB
¶ This field determines the value representation for created DICOM tags which are not string (de)codable; this is currently only needed for the
Modification Mode0
SetOtherValuesIfItExistsOtherwiseAdd.
Values:
Title | Name | Description |
---|---|---|
Ob | OB | The (re)created tag value will have the value representation OB (Other Byte), an 8 bit unsigned integer. |
Ow | OW | The (re)created tag value will have the value representation OW (Other Word), an 16 bit unsigned integer. |
Of | OF | The (re)created tag value will have the value representation OF (Other Float), a 32 bit floating point value. |
Od | OD | The (re)created tag value will have the value representation OD (Other Double), a 64 bit floating point value. |
Is Valid Id0¶
-
name:
isValidId0
, type:
Bool
, default:
FALSE
¶ Shows whether the tag id string could be parsed successfully.
Modification Mode1¶
-
name:
modificationMode1
, type:
Enum
, default:
DoNotModify
¶ See
Modification Mode0
.
Split1¶
-
name:
split1
, type:
Bool
, default:
FALSE
¶ If this checkbox is active then the tag value is split at backslashes to multiple values, otherwise it is set as one value.
Is Valid Id1¶
-
name:
isValidId1
, type:
Bool
, default:
FALSE
¶ See
Is Valid Id0
.
Modification Mode2¶
-
name:
modificationMode2
, type:
Enum
, default:
DoNotModify
¶ See
Modification Mode0
.
Split2¶
-
name:
split2
, type:
Bool
, default:
FALSE
¶ If this checkbox is active then the tag value is split at backslashes to multiple values, otherwise it is set as one value.
Is Valid Id2¶
-
name:
isValidId2
, type:
Bool
, default:
FALSE
¶ See
Is Valid Id0
.
Modification Mode3¶
-
name:
modificationMode3
, type:
Enum
, default:
DoNotModify
¶ See
Modification Mode0
.
Split3¶
-
name:
split3
, type:
Bool
, default:
FALSE
¶ If this checkbox is active then the tag value is split at backslashes to multiple values, otherwise it is set as one value.
Is Valid Id3¶
-
name:
isValidId3
, type:
Bool
, default:
FALSE
¶ See
Is Valid Id0
.
Modification Mode4¶
-
name:
modificationMode4
, type:
Enum
, default:
DoNotModify
¶ See
Modification Mode0
.
Split4¶
-
name:
split4
, type:
Bool
, default:
FALSE
¶ If this checkbox is active then the tag value is split at backslashes to multiple values, otherwise it is set as one value.
Is Valid Id4¶
-
name:
isValidId4
, type:
Bool
, default:
FALSE
¶ See
Is Valid Id0
.
Value (otherTagOperationsValue0)¶
-
name:
otherTagOperationsValue0
, type:
String
¶ The string value used to modify the DICOM tag dependent on the used mode.
Other Tag Operations Modification Mode0¶
-
name:
otherTagOperationsModificationMode0
, type:
Enum
, default:
DoNotModify
¶ The way how the DICOM tag with the given id is modified with value.
Values:
Title | Name | Description |
---|---|---|
Do Not Modify | DoNotModify | No tag is modified. |
Replace Type2Tags | ReplaceType2Tags | Values of non-sequence top-level tags which are possibly only of type 2 are replaced by the given string value if possible. If the value contains backslashes (”") the value is split and added as multiple values, otherwise set as only one value. Tags of value representation LT, ST, and UT will always store only one value and will store the backslashes. Values not convertible (for example text strings to numbers) will result to 0 values. WARNING: Incomplete tables are used which identify tags which *might* be of Type 2, however, in some contexts these tags may still be required and their manipulation may damage the standard compliance. A reliable context check is not possible here and therefore this operation is on your own risk. |
Replace Type3Tags | ReplaceType3Tags | Values of non-sequence top-level tags which are possibly only of type 3 are replaced by the given string value if possible. If the value contains backslashes (”") the value is split and added as multiple values, otherwise set as only one value. Tags of value representation LT, ST, and UT will always store only one value and will store the backslashes. Values not convertible (for example text strings to numbers) will result to 0 values. WARNING: Incomplete tables are used which identify tags which *might* be of Type 3, however, in some contexts these tags may still be required and their manipulation may damage the standard compliance. A reliable context check is not possible here and therefore this operation is on your own risk. |
Remove Type3Tags | RemoveType3Tags | Sequence and non-sequence top-level tags which are possibly only of type 3 are removed. WARNING: Incomplete tables are used which identify tags which *might* be of Type 3, however, in some contexts these tags may still be required and their manipulation may damage the standard compliance. A reliable context check is not possible here and therefore this operation is on your own risk. |
Drop Type2SQTag Values | DropType2SQTagValues | The items of all top-level sequence tags which are only of type 2 are removed; the sequence tag itself is left. WARNING: Incomplete tables are used which identify tags which *might* be of Type 2, however, in some contexts these tags may still be required and their manipulation may damage the standard compliance. A reliable context check is not possible here and therefore this operation is on your own risk. |
Drop Type3SQTag Values | DropType3SQTagValues | The items of all top-level sequence tags which are only of type 3 are removed; the sequence tag itself is left. WARNING: Incomplete tables are used which identify tags which *might* be of Type 3, however, in some contexts these tags may still be required and their manipulation may damage the standard compliance. A reliable context check is not possible here and therefore this operation is on your own risk. |
Other Tag Operations Modification Mode1¶
-
name:
otherTagOperationsModificationMode1
, type:
Enum
, default:
DoNotModify
¶
Other Tag Operations Modification Mode2¶
-
name:
otherTagOperationsModificationMode2
, type:
Enum
, default:
DoNotModify
¶
Other Tag Operations Modification Mode3¶
-
name:
otherTagOperationsModificationMode3
, type:
Enum
, default:
DoNotModify
¶
Other Tag Operations Modification Mode4¶
-
name:
otherTagOperationsModificationMode4
, type:
Enum
, default:
DoNotModify
¶
Private Creator (privateCreator0)¶
-
name:
privateCreator0
, type:
String
¶ The string name of the private creator defining the upper 24 bits of the private tag belonging to it.
Id (privateTagId0)¶
-
name:
privateTagId0
, type:
String
¶ The lower eight bit of the element id of the private tag in the format (0000,00XY) with XY from [00..FF].
Value (privateValue0)¶
-
name:
privateValue0
, type:
String
¶ The string value used to modify the DICOM tag dependent on the used mode.
Private Modification Mode0¶
-
name:
privateModificationMode0
, type:
Enum
, default:
DoNotModify
¶ The way how the DICOM tag with the given id is modified with value.
Values:
Title | Name | Description |
---|---|---|
Do Not Modify | DoNotModify | The tag is not modified at all. |
Remove Tag | RemoveTag | The tag with lower eight bit given by Id and the Private Creator is removed. |
Remove Entire Private Creator Group | RemoveEntirePrivateCreatorGroup | All tags belonging to the given private creator are removed. |
Remove All Private Tags | RemoveAllPrivateTags | All private tags are removed. |
Private Is Valid Id0¶
-
name:
privateIsValidId0
, type:
Bool
, default:
FALSE
¶ Shows whether the tag id could be parsed successfully.
Private Creator (privateCreator1)¶
-
name:
privateCreator1
, type:
String
¶ See
Private Creator
.
Private Is Valid Id1¶
-
name:
privateIsValidId1
, type:
Bool
, default:
FALSE
¶ See
Private Is Valid Id0
.
Private Creator (privateCreator2)¶
-
name:
privateCreator2
, type:
String
¶ See
Private Creator
.
Private Is Valid Id2¶
-
name:
privateIsValidId2
, type:
Bool
, default:
FALSE
¶ See
Private Is Valid Id0
.
Private Creator (privateCreator3)¶
-
name:
privateCreator3
, type:
String
¶ See
Private Creator
.
Private Is Valid Id3¶
-
name:
privateIsValidId3
, type:
Bool
, default:
FALSE
¶ See
Private Is Valid Id0
.
Private Creator (privateCreator4)¶
-
name:
privateCreator4
, type:
String
¶ See
Private Creator
.
Private Is Valid Id4¶
-
name:
privateIsValidId4
, type:
Bool
, default:
FALSE
¶ See
Private Is Valid Id0
.
Private Creator (addPrivateCreator0)¶
-
name:
addPrivateCreator0
, type:
String
, default:
PRIVATE_CREATOR_STRING_0
¶ The string name of the private creator defining the upper 24 bits of the private tags belonging to it.
Group Id¶
-
name:
addPrivateGroupId0
, type:
Integer
, default:
9
, minimum:
9
, maximum:
65535
¶ The id of the private group defined by the private creator and which is used by the all private tags; must be a hexadecimal number WXYZ with WXYZ from [0009..FFFF] and where Z must be odd.
Element Group Id¶
-
name:
addPrivateElementGroupId0
, type:
Integer
, default:
16
, minimum:
16
, maximum:
255
¶ The element group id to be used by the private creator as lower byte in element id and by private tags as upper byte of element id in hexadecimal format XY with XY from [10..FF].
Lower 8 Bits of Tag Id (addPrivateLowerByteOfElementId0_0)¶
-
name:
addPrivateLowerByteOfElementId0_0
, type:
Integer
, default:
16
, minimum:
0
, maximum:
255
¶ The lower byte of the added private tag as hexadecimal value XY with XY from [00..FF].
Add Private Split0 0¶
-
name:
addPrivateSplit0_0
, type:
Bool
, default:
FALSE
¶ If enabled then tag values are split at backslashes such that multiple values can be set at once.
Add Private Tag VR0 0¶
-
name:
addPrivateTagVR0_0
, type:
Enum
, default:
LO
¶ The value representation of the private tag.
Value (addPrivateModificationValue0_0)¶
-
name:
addPrivateModificationValue0_0
, type:
String
¶ The string value used to modify the private tag dependent on the used mode.
Add Private Modification Mode0 0¶
-
name:
addPrivateModificationMode0_0
, type:
Enum
, default:
DoNotModify
¶ The way how the DICOM tag with the given id is modified with value.
Values:
Title | Name | Description |
---|---|---|
Do Not Modify | DoNotModify | The tag is not modified at all. |
Add Or Replace | AddOrReplace | If the tag exists then it will be removed and then it will be (re)added with the settings defined in the other fields. |
Add Private Is Valid Id0 0¶
-
name:
addPrivateIsValidId0_0
, type:
Bool
, default:
TRUE
¶ Shows whether the group id, the element id, and the lower byte of the private tag id could be parsed successfully and whether they obey the limitations defined in DICOM standard.
Lower 8 Bits of Tag Id (addPrivateLowerByteOfElementId0_1)¶
-
name:
addPrivateLowerByteOfElementId0_1
, type:
Integer
, default:
17
, minimum:
0
, maximum:
255
¶
Add Private Split0 1¶
-
name:
addPrivateSplit0_1
, type:
Bool
, default:
FALSE
¶ If enabled then tag values are split at backslashes such that multiple values can be set at once.
Value (addPrivateModificationValue0_1)¶
Add Private Modification Mode0 1¶
-
name:
addPrivateModificationMode0_1
, type:
Enum
, default:
DoNotModify
¶
Lower 8 Bits of Tag Id (addPrivateLowerByteOfElementId0_2)¶
-
name:
addPrivateLowerByteOfElementId0_2
, type:
Integer
, default:
18
, minimum:
0
, maximum:
255
¶
Add Private Split0 2¶
-
name:
addPrivateSplit0_2
, type:
Bool
, default:
FALSE
¶ If enabled then tag values are split at backslashes such that multiple values can be set at once.
Value (addPrivateModificationValue0_2)¶
Add Private Modification Mode0 2¶
-
name:
addPrivateModificationMode0_2
, type:
Enum
, default:
DoNotModify
¶
Lower 8 Bits of Tag Id (addPrivateLowerByteOfElementId0_3)¶
-
name:
addPrivateLowerByteOfElementId0_3
, type:
Integer
, default:
19
, minimum:
0
, maximum:
255
¶
Add Private Split0 3¶
-
name:
addPrivateSplit0_3
, type:
Bool
, default:
FALSE
¶ If enabled then tag values are split at backslashes such that multiple values can be set at once.
Value (addPrivateModificationValue0_3)¶
Add Private Modification Mode0 3¶
-
name:
addPrivateModificationMode0_3
, type:
Enum
, default:
DoNotModify
¶
Value (sequenceValue0)¶
-
name:
sequenceValue0
, type:
String
¶ The string value used to modify the DICOM tag dependent on the used mode.
Sequence Modification Mode0¶
-
name:
sequenceModificationMode0
, type:
Enum
, default:
DoNotModify
¶ Determines the way how the DICOM tag with the given id is modified.
Values:
Title | Name | Description |
---|---|---|
Do Not Modify | DoNotModify | The tag is not modified at all. |
Add Empty If It Does Not Exist | AddEmptyIfItDoesNotExist | If the tag does not exist then an empty one with zero sequence entries is added. |
Remove Tag | RemoveTag | If the tag exist then it is removed. |
Make Empty If It Exists | MakeEmptyIfItExists | If the tag exists then all sequence entries are removed, but the tag itself is left. |
Make Empty If It Exists Otherwise Add Empty | MakeEmptyIfItExistsOtherwiseAddEmpty | If the tag exists then all sequence entries are removed, otherwise a sequence tag with no sequence entries is added. |
Remove All But First Entry If It Exists | RemoveAllButFirstEntryIfItExists | If the tag exists the all sequence entries after the first one are removed. |
Resize To Num Entries If It Exists | ResizeToNumEntriesIfItExists | If the tag exists then the sequence is resized to the number of entries determined in Value . Entries with indexes larger than or equal to Value will be removed. If new entries are created then empty DICOM trees are appended. If Value is no numeric value or out of range then the operation will not be performed and an error is posted. |
Append Num Entries If It Exists | AppendNumEntriesIfItExists | If the tag exists then Value new and empty DICOM tree entries are appended to the sequence. If Value is no numeric value or out of range then the operation will not be performed and an error is posted. |
Insert One Entry At If It Exists | InsertOneEntryAtIfItExists | If the tag exists then before the position Value a new and empty DICOM tree entry is inserted into the sequence. If Value is no numeric value or out of range then the operation will not be performed and an error is posted. |
Sequence Is Valid Id0¶
-
name:
sequenceIsValidId0
, type:
Bool
, default:
FALSE
¶ Shows whether the tag id could be parsed successfully.