17#include <FMEThirdPartyWarningsDisable.h>
19#include <FMEThirdPartyWarningsRestore.h>
106 std::string *
errStr=
nullptr)
const;
117 std::string *
errStr=
nullptr,
134 std::string *
errStr=
nullptr,
149 mutable std::string _currentModificationStringValue;
154 std::string _modificationStringValue;
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.
bool tagExists(DCMTree::TreePtr dcmTree) const
void removeTag(DCMTree::TreePtr dcmTree) const
Remove the tag with the ID getTagId() if it exists, otherwise do nothing; (if dcmTree member is nullp...
void setTagIdAndModificationStringValue(DCMTree::TagId tagId, const std::string &modStrVal)
Calls setTagId(tagId) and setModificationStringValue(modStrVal).
DCMTree::TagId getTagId() const
Returns the id of the tag to be modified (might be temporarily overridden be a "modificationTagIdRepl...
void setTagId(const std::string &tagIdStr)
Set the id (as std::string) of the tag to be modified; invalid ids will cause an ML_ERROR_PRINT,...
virtual ~DicomModifyBase()
Virtual destructor.
void setTagValue(DCMTree::TreePtr dcmTree, std::string *errStr=nullptr, const DICOMTagTools::ValueModifyModes modMode=DICOMTagTools::Replace, bool splitValue=false) const
Sets the value of tag with getTagId() in dcmTree with new value _modificationStringValue.
virtual std::string applyModifications(DCMTree::TreePtr dcmTree, const FieldContainer *treeInfos=nullptr)
Apply a change to the given dcmTree.
bool getModificationStringValueAsMLInt(MLint &retVal) const
If the modificationStringValue() can be interpreted as an integer value then true is returned and the...
void setModificationStringValue(const std::string &modStrVal)
Set the string value to be used for the tag modification if not overridden by a treeInfos-"modificati...
DCMTree::TagPtr getTagIfItExists(DCMTree::TreePtr dcmTree, std::string *errStr=nullptr) const
void setTagId(DCMTree::TagId tagId)
Set the id of the tag to be modified.
DCMTree::TagPtr addTag(DCMTree::TreePtr dcmTree, std::string *errStr=nullptr, bool setValue=true, bool splitValue=false) const
Add the tag with ID getTagId() to tree dcmTree and value _modificationStringValue; requires a valid n...
const std::string & getModificationStringValue() const
Returns the string which is used to manipulate tag value(s) (might be temporarily overridden by a "mo...
DicomModifyBase(DCMTree::TagId tagId=DCMTree::TagId(), const std::string &modStrVal="")
Constructor setting the tag ID and the string value for modifications.
Defines the class FieldContainer to encapsulate a vector of fields for (see class Field).
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
boost::shared_ptr< Tag > TagPtr
shared-pointer to tag
boost::shared_ptr< Tree > TreePtr
shared pointer to a DCMTree::Tree