50 const std::string &modStrVal =
"",
62 const std::string &modStrVal,
Project global and OS specific declarations.
#define ML_DICOM_MODIFY_EXPORT
DLL export macro definition.
DicomModifyBase(DCMTree::TagId tagId=DCMTree::TagId(), const std::string &modStrVal="")
Constructor setting the tag ID and the string value for modifications.
std::string applyModifications(DCMTree::TreePtr dcmTree, const FieldContainer *treeInfos=nullptr) override
ModificationModes
Available modes for tag modifications.
@ MakeEmptyIfItExistsOtherwiseAddEmpty
If the tag exists the all sequence entries after the first one are removed.
@ AddEmptyIfItDoesNotExist
If the tag does not exist then an empty one with zero sequence entries is added.
@ DoNotModify
The tag is not modified at all.
@ RemoveAllButFirstEntryIfItExists
If the tag exists an entry is inserted at before position given by modStrVal.
@ RemoveTag
If the tag exist then it is removed.
@ ResizeToNumEntriesIfItExists
If the tag exists the number entries is set to the value given by modStrVal.
@ MakeEmptyIfItExists
If the tag exists then all sequence entries are removed, but the tag itself is left.
@ AppendNumEntriesIfItExists
If the tag exists then a number of entries given by modStrVal is appended to the end.
@ InsertOneEntryAtIfItExists
DicomModifySequence(DCMTree::TagId tagId=DCMTree::TagId(), const std::string &modStrVal="", ModificationModes modMode=DoNotModify)
Constructor setting TagId, ModificationStringValue, and ModificationMode.
void setModificationParameters(DCMTree::TagId tagId, const std::string &modStrVal, ModificationModes modMode)
void setModificationMode(ModificationModes modMode)
Sets how the tag with given id and modification value shall be modified.
static const char *const ModificationModesStrings[NumModificationModes]
String versions for ModificationModes.
ModificationModes getModificationMode() const
Returns the currently set modification mode.
boost::shared_ptr< Tree > TreePtr
Shared pointer to a DCMTree::Tree.