32 enum { NumInheritModeStrings = 4 };
35 static const char *
const InheritModeStrings[NumInheritModeStrings];
40 ,InheritValidOtherwiseDefault
54 const std::string &fieldName,
55 const char *
const *selectableValues,
56 size_t numSelectableValues,
57 size_t defaultValueIndex=0,
72 const std::string &inValue,
73 const std::string *fallBack=
nullptr);
101 const size_t numStrings,
102 const std::string &separator=
",");
Project global and OS specific declarations.
#define MLDICOMTAGINTERFACES_EXPORT
DLL export macro definition.
Field to encapsulate a boolean value.
The class DicomModifyFieldAddOnBase is dedicated to manage fields for ML modules and instances derive...
A complex field interface managing a value selector for combo boxes with a number of predefined value...
EnumField & getInheritModeFld() const
See _inheritModeFld.
FieldAddOnBase::FieldChangeState handleFieldChanges(Field *field) override
Handle field notifications according to Module::activateAttachments with a return of field change sta...
virtual void inheritValues(DCMTree::Const_TreePtr dcmTree, const std::string &inValue, const std::string *fallBack=nullptr)
Implements the call of DicomModifyFieldAddOnBase and passes the unmodified values form the source.
virtual std::string checkConsistency(const std::string *errorFieldName=nullptr) const
Checks for invalid parameters; return textual description on error, or empty string on success; if er...
BoolField & getCheckConsistencyFld() const
See _checkConsistencyFld.
const size_t _numSelectableValues
The number of values in selectableValuesStr.
void handleFieldActivationChanges() override
Handle class changes according to Module::activateAttachments.
static std::string getComposedString(const char *const *stringSet, const size_t numStrings, const std::string &separator=",")
Mainly internally used static helper function which returns a string composed from all entries of str...
StringField & getSelectableValuesFld() const
See _selectableValuesFld.
EnumField * _inheritModeFld
Enumerator field controls the way how values for the valueFld may be inherited or adapted.
StringField & getValueFld() const
See _valueFld.
BoolField * _checkConsistencyFld
Controls whether the content of _valueFld is checked in checkConsistency or not.
StringField * _selectableValuesFld
Allowed values for _valueField, composed for use in a MeVisLab ComoboBox field control.
DicomValueComboBoxSelectorTagInterface(Module &modRef, const std::string &fieldName, const char *const *selectableValues, size_t numSelectableValues, size_t defaultValueIndex=0, InheritMode inheritModeDefault=InheritValidOnly)
Constructor, setting the reference of the module for which the fields shall be managed.
std::string applyModifications(DCMTree::TreePtr dcmTree, const FieldContainer *treeInfos=nullptr) override
See DicomModifyFieldAddOnBase::applyModifications() for documentation; adds field values as tags to d...
StringField * _valueFld
The value to be managed.
InheritMode
Available inherit and modify modes.
void addFields() override
Add fields to field container of module.
const char *const * _selectableValues
The array of numSelectableValues string values which are allowed in _valueField.
const InheritMode _inheritModeDefault
The default index to the default value to be used in _valueField.
const std::string _fieldName
The name of the value field.
const size_t _defaultSelectableValueIndex
The index of the default value to be used in _valueField.
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.
Field to encapsulate a string value.
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.