MeVisLab Toolbox Reference
mlDicomModifyFieldAddOnBase.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code
3//----------------------------------------------------------------------------------
9
14//----------------------------------------------------------------------------------
15#pragma once
16
17#include "MLDicomModifySystem.h"
18#include <mlFieldAddOnBase.h>
19#include <mlDicomModifyList.h>
20
22
23//----------------------------------------------------------------------------------
28//----------------------------------------------------------------------------------
30 public FieldAddOnBase
31{
32public:
47 size_t numInstances=1,
50
53
55 size_t getNumInstances() const { return _numInstances; }
56
64 const FieldContainer *treeInfos=nullptr) override;
65
67 void addFields() override;
68
71
74
76 virtual void inheritValues(DCMTree::Const_TreePtr /*dcmTree*/) { };
77
79 virtual std::string checkConsistency() const { return ""; };
80
82 inline BaseField *getOutputModifierListFld() const { return _outputModifierListFld; };
83
85 inline BaseField *getInputModifierListFld() const { return _inputModifierListFld; };
86
88 static bool isIn(const std::string &str, const char * const * values, size_t numValues);
89
90private:
92 const size_t _numInstances;
93
95 BaseField *_inputModifierListFld;
96
98 BaseField *_outputModifierListFld;
99
101 const bool _createInputConnector;
102
104 const bool _createOutputConnector;
105
108};
109
Project global and OS specific declarations.
#define ML_DICOM_MODIFY_EXPORT
DLL export macro definition.
Field to encapsulate a pointer to an ML base object.
Definition mlFields.h:797
The class DicomModifyFieldAddOnBase is dedicated to manage fields for ML modules and instances derive...
virtual std::string checkConsistency() const
Checks for invalid parameters; return textual description on error, or empty string on success.
BaseField * getOutputModifierListFld() const
Provide access to output base field if it was created.
~DicomModifyFieldAddOnBase() override
Destructor resetting connector fields if they exist.
DicomModifyFieldAddOnBase(FieldContainer &fieldContainerRef, size_t numInstances=1, bool createInputModifyTagsPluginBaseConnectorField=false, bool createOutputModifyTagsPluginBaseConnectorField=false)
Constructor, setting the reference of the FieldContainer managing the fields, the number of field ins...
BaseField * getInputModifierListFld() const
Provide access to input base connector field if it was created.
size_t getNumInstances() const
Returns the number of instances to be created by derived fields.
static bool isIn(const std::string &str, const char *const *values, size_t numValues)
Static helper function which checks whether str is part of the given list of values which has numValu...
FieldAddOnBase::FieldChangeState handleFieldChanges(Field *field) override
Handle field notifications according to Module::handleNotification with a return of field change stat...
void handleFieldActivationChanges() override
Handle class changes according to Module::activateAttachments.
std::string applyModifications(DCMTree::TreePtr dcmTree, const FieldContainer *treeInfos=nullptr) override
Applies first the changes to the dcmTree as described in DicomModifyList::applyModifications() and th...
virtual void inheritValues(DCMTree::Const_TreePtr)
Can be used to implement the copy of tag values from the given dcmTree to the fields.
void addFields() override
Add fields to field container of the FieldAddOn.
Class which manages a list of DicomModifyBase or derived objects, with an input for concatenation to ...
Abstract base class for field interfaces to be added to other ML module classes.
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
#define ML_ABSTRACT_CLASS_HEADER(className)
Same like ML_ABSTRACT_CLASS_HEADER_EXPORTED with a non existing export symbol.
Header file of a class which manages a list of DicomModifyBase objects and an input which allows the ...
Header file of the abstract base class FieldAddOnBase managing fields independently of an ML Module.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
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:72