37 InsertOneEntryAtIfItExists,
39 RemoveAllButFirstEntryIfItExists
43 enum { NumModificationModes = RemoveAllButFirstEntryIfItExists+1 };
46 static const char *
const ModificationModesStrings[NumModificationModes];
Project global and OS specific declarations.
#define ML_DICOM_MODIFY_EXPORT
DLL export macro definition.
A base class which allows the modification of DICOM tags in a (cloned) DICOM tree.
A concrete class derived from DicomModifyBase which allows the modification of ordinary,...
std::string applyModifications(DCMTree::TreePtr dcmTree, const FieldContainer *treeInfos=nullptr) override
Apply a change to dcmTree according to the currently selected _modificationMode.
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.
@ 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.
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)
Calls setTagId(tagId), setModificationStringValue(modStrVal), and setModificationMode(modMode)
void setModificationMode(ModificationModes modMode)
Sets how the tag with given id and modification value shall be modified.
ModificationModes getModificationMode() const
Returns the currently set modification mode.
Defines the class FieldContainer to encapsulate a vector of fields for (see class Field).
Header file of a base class which allows the modification of DICOM tags in a (cloned) DICOM tree.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
boost::shared_ptr< Tree > TreePtr
shared pointer to a DCMTree::Tree