MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
WEMGenerator.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2007, 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#pragma once
14
15#include "WEMBase/WEM.h"
16#include "WEMModule.h"
17
18
20
22
28{
29public:
31 WEMGenerator(std::string type = "WEMGenerator", int numInImages = 0, int numOutImages = 0,
32 bool shouldGenerateApplyField = true);
33
34protected:
36 ~WEMGenerator() override;
37
38
39 /* FIELDS */
40
46
53
56
59
60 /* STATE VARIABLES */
61
64
65
66 /* METHODS */
67
71 void activateAttachments() override;
74 virtual void _process();
76 virtual void _finish(WEMPatch* wemPatch);
84 virtual void _notifyObservers();
87 void _finishProcessing() override;
88
89 /* FIELDS */
90
95
96private:
99 IntField* _idFld;
100
101 /* STATE VARIABLES */
102
103 std::vector<WEMEventContainer> _delayedEvents;
104
105 /* METHODS */
106
109 void _setLabelDescriptionIfOverwrite(bool shouldUpdateImmediately);
110
112 static void _WEMOwnerCB(void* userData, int notificationFlag, int dataFlag = 0);
113
116};
117
119
#define MLWEM_EXPORT
Definition MLWEMSystem.h:18
Field to encapsulate a pointer to an ML base object.
Definition mlFields.h:813
Field to encapsulate a boolean value.
Definition mlFields.h:56
Base class for all fields used in the ML.
Definition mlField.h:73
Field to encapsulate an integer value.
Definition mlFields.h:123
Field without value for notifications.
Definition mlFields.h:687
Field to encapsulate a string value.
Definition mlFields.h:634
TypedEnumField is used to encapsulate a C++ enum value and work with a real enum value instead of int...
Definition mlFields.h:398
The WEMGenerator is the base class for all modules that generate WEMs, be it automatically or interac...
NotifyField * _applyFld
Apply field, click to start generation.
void _applyMetaFields(WEMPatch *wemPatch)
Applies meta information parameters to the given WEMPatch.
StringField * _labelFld
Field for changing the 'label' attribute of a WEM.
BaseField * _outputWEMFld
WEM output field.
void activateAttachments() override
Initialize module after loading.
WEMGenerator(std::string type="WEMGenerator", int numInImages=0, int numOutImages=0, bool shouldGenerateApplyField=true)
Standard constructor.
void handleNotification(Field *field) override
Called when input changes.
virtual void _finish(WEMPatch *wemPatch)
Finish generation of given WEMPatch.
WEMPtr _outWEM
A pointer to the output WEM.
virtual void _addWEMPatch(WEMPatch *wemPatch)
Adds a new WEMPatch to the output list and applies the default attributes.
virtual void _process()
Triggers the computation of the generation.
StringField * _descriptionFld
Field for changing the 'description' attribute of a WEM.
TypedEnumField< WEMUpdateMode > * _updateModeFld
Update mode: defines how the module reacts on any input change.
void _applyFields(WEMPatch *wemPatch)
Applies the default parameters to the given WEMPatch.
BoolField * _autoApplyFld
Auto apply field.
virtual void _notifyObservers()
Notify observers with FINISHED | SELECTION | REPAINT message.
BoolField * _overwriteLabelDescriptionFld
Shall the label and the description be overwritten?
void _finishProcessing() override
Finishing processing: measuring time and optionally apply meta field values.
NotifyField * _clearFld
Clear field, click to clear a module's WEM output (WEM is empty).
BoolField * _shouldComputeNormalsFld
Should the normals be computed anew on finishing a process?
~WEMGenerator() override
Standard destructor.
The WEMModule class provides some common fields and methods for WEMProcessors, WEMGenerators and WEMI...
Definition WEMModule.h:27
Base class for triangle and quad patches.
Definition WEMPatch.h:61
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
#define ML_CLASS_HEADER(className)
Same like ML_CLASS_HEADER_EXPORTED with a non-existing export symbol.