MeVisLab Toolbox Reference
mlDicomCopyTagSetInterface.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 
17 
18 ML_START_NAMESPACE
19 
20 //----------------------------------------------------------------------------------
23 //----------------------------------------------------------------------------------
25 {
26 public:
29  DicomCopyTagSetInterface(Module &modRef, const std::string &fieldSuffix);
30 
32  void addFields() override;
33 
35  void inheritValues(DCMTree::Const_TreePtr dcmTree) override;
36 
38  std::string applyModifications(DCMTree::TreePtr dcmTree,
39  const FieldContainer *treeInfos=nullptr) override;
40 
43 
45  virtual BoolField &getInheritAndCopyTagsFld() { return *_inheritAndCopyTagsFld; }
47  virtual const BoolField &getInheritAndCopyTagsFld() const { return *_inheritAndCopyTagsFld; }
48 
50  virtual const std::string &getFieldSuffix() const { return _fieldSuffix; }
51 
53  virtual std::set<DCMTree::RawTagId> &getTagIdSet() { return _tagIdSet; }
55  virtual const std::set<DCMTree::RawTagId> &getTagIdSet() const { return _tagIdSet; }
56 
58  virtual std::map<DCMTree::RawTagId, DCMTree::Const_TagPtr> &getTagMap() { return _tagMap; }
60  virtual const std::map<DCMTree::RawTagId, DCMTree::Const_TagPtr> &getTagMap() const { return _tagMap; }
61 
62 protected:
64  std::string _fieldSuffix;
65 
69 
71  std::set<DCMTree::RawTagId> _tagIdSet;
72 
74  std::map<DCMTree::RawTagId, DCMTree::Const_TagPtr> _tagMap;
75 };
76 
77 ML_END_NAMESPACE
Project global and OS specific declarations.
#define MLDICOMTAGINTERFACES_EXPORT
DLL export macro definition.
Field to encapsulate a boolean value.
Definition: mlFields.h:62
Provides control to copy/inherit a set of tag (values) from an input DCMTree, buffer it,...
virtual const std::set< DCMTree::RawTagId > & getTagIdSet() const
Provides constant read-only access to _tagIdSet.
virtual std::map< DCMTree::RawTagId, DCMTree::Const_TagPtr > & getTagMap()
Provides modification access to _tagMap.
std::set< DCMTree::RawTagId > _tagIdSet
Set of tags to be copied, buffered, and/or added to the output.
void addFields() override
Add fields to field container of module.
std::string applyModifications(DCMTree::TreePtr dcmTree, const FieldContainer *treeInfos=nullptr) override
See DicomModifyFieldAddOnBase::applyModifications() for details.
BoolField * _inheritAndCopyTagsFld
If enabled then the tags specified in getTagIdSet() are inherited from the input DCMTree in inheritVa...
std::string _fieldSuffix
The suffix to be appended to names of all fields to be added.
virtual const std::map< DCMTree::RawTagId, DCMTree::Const_TagPtr > & getTagMap() const
Provides constant read-only access to _tagMap.
virtual const std::string & getFieldSuffix() const
Provides constant read-only access to _fieldSuffix.
std::map< DCMTree::RawTagId, DCMTree::Const_TagPtr > _tagMap
Set of tags to be copied, buffered, and/or added to the output.
virtual std::set< DCMTree::RawTagId > & getTagIdSet()
Provides modification access to _tagIdSet.
void inheritValues(DCMTree::Const_TreePtr dcmTree) override
Implements the copy of tag values from the given dcmTree to the fields.
FieldAddOnBase::FieldChangeState handleFieldChanges(Field *field) override
Handle field notifications.
virtual const BoolField & getInheritAndCopyTagsFld() const
Provides constant read-only access to _inheritAndCopyTagsFld; only allowed after addFields().
DicomCopyTagSetInterface(Module &modRef, const std::string &fieldSuffix)
Constructor, setting the reference of the module for which the fields shall be managed and the suffix...
virtual BoolField & getInheritAndCopyTagsFld()
Provides modification access to _inheritAndCopyTagsFld; only allowed after addFields().
The class DicomModifyFieldAddOnBase is dedicated to manage fields for ML modules and instances derive...
FieldChangeState
Describes the type of a field changes detected in handleFieldChanges(Field *field).
Defines the class FieldContainer to encapsulate a vector of fields for (see class Field).
Base class for all fields used in the ML.
Definition: mlField.h:73
Base class for an image processing module of the ML.
Definition: mlModule.h:156
Header file of the DicomModifyFieldAddOnBase class dedicated to manage fields for ML modules and inst...
boost::shared_ptr< const Tree > Const_TreePtr
Definition: DCMTree_Lib.h:73
boost::shared_ptr< Tree > TreePtr
shared pointer to a DCMTree::Tree
Definition: DCMTree_Lib.h:70