30 enum { NumInheritModes = 3 };
42 static const char *
const InheritModeStrings[NumInheritModes];
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.
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 const BoolField & getUpdateWriteOnInheritFld() const
Constant read-only access, see _updateWriteOnInheritFld.
void addFields() override
Add fields to field container of module.
virtual EnumField & getInheritModeFld()
See _inheritModeFld.
virtual const BoolField & getValueFld() const
Constant read-only access, see _valueFld.
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.
virtual const BoolField & getWriteFld() const
Constant read-only access, see _writeFld.
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.
virtual BoolField & getValueFld()
See _valueFld.
virtual BoolField & getWriteFld()
See _writeFld.
const bool _defaultValueFldDefault
Corresponding default passed to constructor.
virtual BoolField & getUpdateWriteOnInheritFld()
See _updateWriteOnInheritFld.
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 const EnumField & getInheritModeFld() const
Constant read-only access, see _inheritModeFld.
virtual BoolField & getDefaultValueFld()
See _defaultValueFld.
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 const BoolField & getDefaultValueFld() const
Constant read-only access, see _defaultValueFld.
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.
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 (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...
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
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.