MeVisLab Toolbox Reference
mlDicomModifyPrivateRemove.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
19
20//----------------------------------------------------------------------------------
24//----------------------------------------------------------------------------------
26public:
27
30 DoNotModify = 0,
33 RemoveAllPrivateTags
34 };
35
37 enum { NumModificationModes = RemoveAllPrivateTags+1 };
38
40 static const char * const ModificationModesStrings[NumModificationModes];
41
44 const std::string &modStrVal = "",
45 ModificationModes modMode = DoNotModify,
46 const std::string &privateCreator = "");
47
50
53
55 void setPrivateCreator(const std::string &privateCreator);
56
58 const std::string &getPrivateCreator() const;
59
63 const std::string &modStrVal,
65 const std::string &privateCreator);
66
69 unsigned char tagIdLowerEightBits,
70 const std::string &privateCreatorString) const;
71
78 const FieldContainer *treeInfos=nullptr) override;
79
80private:
82 ModificationModes _modificationMode;
83
85 std::string _privateCreator;
86};
87
Project global and OS specific declarations.
#define ML_DICOM_MODIFY_EXPORT
DLL export macro definition.
Class to wrap a tag-id.
A base class which allows the modification of DICOM tags in a (cloned) DICOM tree.
A concrete class derived from DicomModifyBase which allows the removal of non-ordinary,...
const std::string & getPrivateCreator() const
Returns the currently set private creator string.
void setPrivateCreator(const std::string &privateCreator)
Sets the private creator string.
void setModificationMode(ModificationModes modMode)
Sets how the tag with given id and modification value shall be modified.
ModificationModes
Available modes for tag/tree modifications.
@ RemoveEntirePrivateCreatorGroup
All tags belonging to the given private creator are removed.
@ RemoveTag
The tag with id and the given private creator is removed.
std::string applyModifications(DCMTree::TreePtr dcmTree, const FieldContainer *treeInfos=nullptr) override
Apply a change to dcmTree according to the currently selected _modificationMode.
void setModificationParameters(DCMTree::TagId tagId, const std::string &modStrVal, ModificationModes modMode, const std::string &privateCreator)
Calls setTagId(tagId), setModificationStringValue(modStrVal), setModificationMode(modMode),...
ModificationModes getModificationMode() const
Returns the currently set modification mode.
void removePrivateTag(DCMTree::TreePtr dcmTree, unsigned char tagIdLowerEightBits, const std::string &privateCreatorString) const
See DICOMTagTools::removePrivateTag().
DicomModifyPrivateRemove(DCMTree::TagId tagId=DCMTree::TagId(), const std::string &modStrVal="", ModificationModes modMode=DoNotModify, const std::string &privateCreator="")
Constructor setting setting TagId, ModificationStringValue, and ModificationMode.
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
Definition DCMTree_Lib.h:72