MeVisLab Toolbox Reference
mlDicomModifySequence.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code
3//----------------------------------------------------------------------------------
7
12//----------------------------------------------------------------------------------
13#pragma once
14
15#include "MLDicomModifySystem.h"
16#include "mlDicomModifyBase.h"
17
18ML_START_NAMESPACE
19
20//----------------------------------------------------------------------------------
24//----------------------------------------------------------------------------------
78
79ML_END_NAMESPACE
Project global and OS specific declarations.
#define ML_DICOM_MODIFY_EXPORT
DLL export macro definition.
Class to wrap a tag ID.
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.
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.
Definition DCMTree_Lib.h:66