30 enum { NumInheritModes = 3 };
42 static const char *
const InheritModeStrings[NumInheritModes];
60 const std::string &valueFieldName,
61 const std::string &fieldSuffix,
62 const std::string &dicomModuleInfoString=
"",
63 const bool valueFldDefault=
false,
64 const bool writeFldDefault=
false,
65 const InheritMode inheritModeFldDefault=InheritFromTopLevel,
66 const bool defaultFldDefault=
false,
67 const bool updateWriteOnInheritFldDefault=
true,
68 const bool alwaysWrite=
false
Project global and OS specific declarations.
#define MLDICOMTAGINTERFACES_EXPORT
DLL export macro definition.
Field to encapsulate a boolean value.
FieldAddOn class supporting inheritance and optional writing of a boolean tag value.
virtual const BoolField & getValueFld() const
Constant read-only access, see _valueFld.
virtual const BoolField & getDefaultValueFld() const
Constant read-only access, see _defaultValueFld.
const std::string _dicomModuleInfoString
Stores the description of the DICOM module for error message generation.
InheritMode
Enumerator for the _inheritValueFld.
const std::string _fieldSuffix
Field suffix.
EnumField * _inheritModeFld
Controls whether or how the value is inherited.
virtual BoolField & getValueFld()
See _valueFld.
void addFields() override
Add fields to field container of module.
virtual const BoolField & getWriteFld() const
Constant read-only access, see _writeFld.
BoolField * _writeFld
Controls whether the value is written or not as tag in applyModification().
BoolField * _defaultValueFld
The value to be inherited if no or only a bad value can be inherited.
DicomBoolInheritAndWriteTagInterface(Module &modRef, const DCMTree::RawTagId tagId, const std::string &valueFieldName, const std::string &fieldSuffix, const std::string &dicomModuleInfoString="", const bool valueFldDefault=false, const bool writeFldDefault=false, const InheritMode inheritModeFldDefault=InheritFromTopLevel, const bool defaultFldDefault=false, const bool updateWriteOnInheritFldDefault=true, const bool alwaysWrite=false)
Constructor, setting the reference of the module for which the fields shall be managed.
FieldAddOnBase::FieldChangeState handleFieldChanges(Field *field) override
Handle field notifications.
const bool _defaultValueFldDefault
Corresponding default passed to constructor.
std::string checkConsistency() const override
Checks for invalid parameters; return textual description on error, or empty string on success.
const bool _updateWriteOnInheritFldDefault
Corresponding default passed to constructor.
const bool _alwaysWrite
If true then the tag is always written, independent of the state of the write field.
BoolField * _updateWriteOnInheritFld
The value to be inherited if no or only a bad value can be inherited.
virtual BoolField & getUpdateWriteOnInheritFld()
See _updateWriteOnInheritFld.
virtual const EnumField & getInheritModeFld() const
Constant read-only access, see _inheritModeFld.
virtual BoolField & getDefaultValueFld()
See _defaultValueFld.
virtual const BoolField & getUpdateWriteOnInheritFld() const
Constant read-only access, see _updateWriteOnInheritFld.
void inheritValues(DCMTree::Const_TreePtr dcmTree) override
Implements the copy of tag values from the given dcmTree to the fields.
const InheritMode _inheritModeFldDefault
Corresponding default passed to constructor.
const bool _valueFldDefault
Corresponding default passed to constructor.
virtual BoolField & getWriteFld()
See _writeFld.
const bool _writeFldDefault
Corresponding default passed to constructor.
const DCMTree::RawTagId _tagId
Stores the ID of the DICOM tag to be managed.
std::string applyModifications(DCMTree::TreePtr dcmTree, const FieldContainer *treeInfos=nullptr) override
See DicomModifyFieldAddOnBase::applyModifications() for documentation.
BoolField * _valueFld
The (tag) value to be managed.
const std::string _valueFieldName
Name of the value field.
virtual EnumField & getInheritModeFld()
See _inheritModeFld.
The class DicomModifyFieldAddOnBase is dedicated to manage fields for ML modules and instances derive...
Field to encapsulate an enumerated value.
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.
Base class for an image processing module of the ML.
Header file of the DicomModifyFieldAddOnBase class dedicated to manage fields for ML modules and inst...
boost::shared_ptr< const Tree > Const_TreePtr
boost::shared_ptr< Tree > TreePtr
shared pointer to a DCMTree::Tree
Base class for classes creating default values.