29 enum { NumberOfPrivateTags = 4 };
38 enum { NumModificationModes = AddOrReplace+1 };
41 static const char *
const ModificationModesStrings[NumModificationModes];
118 std::string _privateCreator;
124 MLuint8 _privateElementGroupId;
127 MLuint8 _privateTagLowerByteOfElementId[NumberOfPrivateTags];
130 bool _privateSplitMode[NumberOfPrivateTags];
136 std::string _privateTagModificationStringValue[NumberOfPrivateTags];
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 addition or replacement of private DIC...
void setPrivateTagModificationMode(ModificationModes modMode, size_t pIdx)
Sets how the tag with given id and modification value shall be modified.
MLuint8 getPrivateElementGroupId() const
Returns the currently set private element group id.
void setPrivateTagVR(DCMTree::Vr vr, size_t pIdx)
Sets the value representation to be used by the private tags.
void setPrivateCreator(const std::string &privateCreator)
Sets the private creator string, shall be non empty.
void setPrivateGroupId(MLuint16 groupId)
Sets preferred group id of the private creator and by the private tags; shall be odd and from [0x09,...
void setPrivateTagModificationStringValue(const std::string &modStrVal, size_t pIdx)
Sets the value to be used to modify the private tag.
void setPrivateTagLowerByteOfElementId(MLuint8 lowerByte, size_t pIdx)
Sets the lower byte of the element id of the manipulated private tag with index pIdx.
MLuint8 getPrivateTagLowerByteOfElementId(size_t pIdx) const
Returns the lower byte of the element id of the manipulated private tag.
DCMTree::Vr getPrivateTagVR(size_t pIdx) const
Returns the currently set value representation for the private tag.
DicomModifyPrivateAdd(const std::string &privateCreator="PRIVATE_CREATOR", MLuint16 groupId=0x009, MLuint8 elementGroupId=0x10, DCMTree::Vr vr=DCMTree::LO, MLuint8 lowerByteOfElementIdsBase=0x10, const std::string &modStrVal="", ModificationModes modModes=DoNotModify, bool splitMode=false)
Constructor creating a no operation default object.
ModificationModes getPrivateTagModificationMode(size_t pIdx) const
Returns the currently set modification mode.
const std::string & getPrivateCreator() const
Returns the currently set private creator string.
void setPrivateElementGroupId(MLuint8 elementGroupId)
Sets the preferred element group id to be defined by the private creator and to be used by the privat...
ModificationModes
Available modes for tag/tree modifications.
bool getSplitMode(size_t pIdx) const
Returns whether split mode is on.
std::string getPrivateTagModificationStringValue(size_t pIdx) const
Returns the value used to modify the private tag.
std::string applyModifications(DCMTree::TreePtr dcmTree, const FieldContainer *treeInfos=nullptr) override
Apply a change to dcmTree according to the currently selected _modificationMode.
MLuint16 getPrivateGroupId() const
Returns the currently set private group id.
void setSplitMode(bool split, size_t pIdx)
If true then set or changed values are split at backslashes into different values.
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