MeVisLab Toolbox Reference
CSOBaseModule.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2009, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 
15 
16 #pragma once
17 
18 #include "MLCSOIncludes.h"
19 
20 #include "../CSOList.h"
21 #include "../CSOScopeEvents.h"
22 
23 ML_START_NAMESPACE
24 
26 
29 {
30 public:
31 
33  CSOBaseModule(const std::string& type="CSOBaseModule", int numInImages=0,int numOutImages=0);
34 
35 protected:
36 
38  ~CSOBaseModule() override;
39 
41  void activateAttachments() override;
42 
44  void handleNotification(Field* field) override;
45 
48  virtual bool _useLegacyAutoApplyMode() const;
49 
50 protected:
51 
52  /* FIELDS */
53 
61 
66 
67 
68  /* MEMBER VARIABLES */
69 
72  std::string _type;
73 
74  /* METHODS */
75 
77  void _setIsProcessingFlag(bool newProcessingState);
78 
80 };
81 
82 ML_END_NAMESPACE
#define MLCSO_EXPORT
Defines export symbols for classes, so they can be used in other DLLs.
Definition: MLCSOSystem.h:23
Field to encapsulate a boolean value.
Definition: mlFields.h:62
Base class for CSOModules.
Definition: CSOBaseModule.h:29
virtual bool _useLegacyAutoApplyMode() const
Controls whether update behaviour on parameter field changes should depend on the autoApply field (le...
void activateAttachments() override
Initialize module after loading.
NotifyField * _applyFld
Applies changes.
Definition: CSOBaseModule.h:60
void _setIsProcessingFlag(bool newProcessingState)
Sets the isProcessing field if the processing state has changed.
std::string _type
The processor type as a string.
Definition: CSOBaseModule.h:72
BoolField * _isProcessingFld
Field reflects whether the module is currently processing.
Definition: CSOBaseModule.h:63
CSOBaseModule(const std::string &type="CSOBaseModule", int numInImages=0, int numOutImages=0)
Standard constructor.
void handleNotification(Field *field) override
Called when input changes.
BoolField * _autoApplyFld
Shall changes lead to an apply? Field value is only considered when useLegacyAutoApplyMode is enabled...
Definition: CSOBaseModule.h:58
ML_MODULE_CLASS_HEADER(CSOBaseModule)
~CSOBaseModule() override
Standard destructor.
NotifyField * _doneFld
Notifies the application or other modules that the processing has ended.
Definition: CSOBaseModule.h:65
TypedEnumField< CSOUpdateModes > * _updateModeFld
Enumeration field for update modes.
Definition: CSOBaseModule.h:55
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
Field without value for notifications.
Definition: mlFields.h:1049