|
MeVisLab Toolbox Reference
|
#include <mlDicomModifySequence.h>
Public Types | |
| enum | ModificationModes { DoNotModify = 0 , AddEmptyIfItDoesNotExist , RemoveTag , MakeEmptyIfItExists , MakeEmptyIfItExistsOtherwiseAddEmpty , ResizeToNumEntriesIfItExists , AppendNumEntriesIfItExists , InsertOneEntryAtIfItExists , RemoveAllButFirstEntryIfItExists } |
| Available modes for tag modifications. More... | |
| enum | { NumModificationModes = RemoveAllButFirstEntryIfItExists+1 } |
| Defines the number of available modification modes. More... | |
Public Member Functions | |
| DicomModifySequence (DCMTree::TagId tagId=DCMTree::TagId(), const std::string &modStrVal="", ModificationModes modMode=DoNotModify) | |
| Constructor setting TagId, ModificationStringValue, and ModificationMode. | |
| 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. | |
| void | setModificationParameters (DCMTree::TagId tagId, const std::string &modStrVal, ModificationModes modMode) |
| std::string | applyModifications (DCMTree::TreePtr dcmTree, const FieldContainer *treeInfos=nullptr) override |
| Public Member Functions inherited from ml::DicomModifyBase | |
| DicomModifyBase (DCMTree::TagId tagId=DCMTree::TagId(), const std::string &modStrVal="") | |
| Constructor setting the tag ID and the string value for modifications. | |
| DicomModifyBase (const DicomModifyBase &)=default | |
| Default copy constructor. | |
| DicomModifyBase & | operator= (const DicomModifyBase &)=default |
| Default assignment operator. | |
| virtual | ~DicomModifyBase () |
| Virtual destructor. | |
| void | setTagId (DCMTree::TagId tagId) |
| Set the id of the tag to be modified. | |
| void | setTagId (const std::string &tagIdStr) |
| DCMTree::TagId | getTagId () const |
| void | setModificationStringValue (const std::string &modStrVal) |
| const std::string & | getModificationStringValue () const |
| bool | getModificationStringValueAsMLInt (MLint &retVal) const |
| void | setTagIdAndModificationStringValue (DCMTree::TagId tagId, const std::string &modStrVal) |
| Calls setTagId(tagId) and setModificationStringValue(modStrVal). | |
| bool | tagExists (DCMTree::TreePtr dcmTree) const |
| DCMTree::TagPtr | getTagIfItExists (DCMTree::TreePtr dcmTree, std::string *errStr=nullptr) const |
| DCMTree::TagPtr | addTag (DCMTree::TreePtr dcmTree, std::string *errStr=nullptr, bool setValue=true, bool splitValue=false) const |
| void | removeTag (DCMTree::TreePtr dcmTree) const |
| void | setTagValue (DCMTree::TreePtr dcmTree, std::string *errStr=nullptr, const DICOMTagTools::ValueModifyModes modMode=DICOMTagTools::Replace, bool splitValue=false) const |
Static Public Attributes | |
| static const char *const | ModificationModesStrings [NumModificationModes] |
| String versions for ModificationModes. | |
A concrete class derived from DicomModifyBase which allows the modification of ordinary, non-private, non-sequence DICOM tags in a (cloned) DICOM tree.
Definition at line 25 of file mlDicomModifySequence.h.
| anonymous enum |
Defines the number of available modification modes.
| Enumerator | |
|---|---|
| NumModificationModes | |
Definition at line 43 of file mlDicomModifySequence.h.
Available modes for tag modifications.
Definition at line 29 of file mlDicomModifySequence.h.
| ml::DicomModifySequence::DicomModifySequence | ( | DCMTree::TagId | tagId = DCMTree::TagId(), |
| const std::string & | modStrVal = "", | ||
| ModificationModes | modMode = DoNotModify ) |
Constructor setting TagId, ModificationStringValue, and ModificationMode.
References DoNotModify.
|
overridevirtual |
Apply a change to dcmTree according to the currently selected _modificationMode.
| dcmTree | The DICOM tree to be modified. |
| treeInfos | A FieldContainer which - if not nullptr - can contain additional user defined information fields about dcmTree. |
Reimplemented from ml::DicomModifyBase.
| ModificationModes ml::DicomModifySequence::getModificationMode | ( | ) | const |
Returns the currently set modification mode.
| void ml::DicomModifySequence::setModificationMode | ( | ModificationModes | modMode | ) |
Sets how the tag with given id and modification value shall be modified.
| void ml::DicomModifySequence::setModificationParameters | ( | DCMTree::TagId | tagId, |
| const std::string & | modStrVal, | ||
| ModificationModes | modMode ) |
Calls setTagId(tagId), setModificationStringValue(modStrVal), and setModificationMode(modMode)
|
static |
String versions for ModificationModes.
Definition at line 46 of file mlDicomModifySequence.h.