MeVisLab Toolbox Reference
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:
30
32 WEMGenerator(std::string type="WEMGenerator", int numInImages=0,int numOutImages=0, bool shouldGenerateApplyField=true);
33
34protected:
35
37 ~WEMGenerator() override;
38
39
40 /* FIELDS */
41
47
54
57
60
61 /* STATE VARIABLES */
62
65
66
67 /* METHODS */
68
72 void activateAttachments() override;
75 virtual void _process();
77 virtual void _finish(WEMPatch *wemPatch);
85 virtual void _notifyObservers();
88 void _finishProcessing() override;
89
90 /* FIELDS */
91
96
97private:
100 IntField* _idFld;
101
102 /* STATE VARIABLES */
103
104 std::vector <WEMEventContainer> _delayedEvents;
105
106 /* METHODS */
107
110 void _setLabelDescriptionIfOverwrite(bool shouldUpdateImmediately);
111
113 static void _WEMOwnerCB(void* userData, int notificationFlag, int dataFlag = 0);
114
117};
118
120
#define MLWEM_EXPORT
Definition MLWEMSystem.h:18
Field to encapsulate a pointer to an ML base object.
Definition mlFields.h:797
Field to encapsulate a boolean value.
Definition mlFields.h:58
Base class for all fields used in the ML.
Definition mlField.h:73
Field to encapsulate an integer value.
Definition mlFields.h:126
Field without value for notifications.
Definition mlFields.h:659
Field to encapsulate a string value.
Definition mlFields.h:610
TypedEnumField is used to encapsulate a C++ enum value and work with a real enum value instead of int...
Definition mlFields.h:384
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:48
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.