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
19ML_START_NAMESPACE
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
64 WEMPtr _outWEM;
65
66
67 /* METHODS */
68
70 void handleNotification(Field *field) override;
72 void activateAttachments() override;
75 virtual void _process();
77 virtual void _finish(WEMPatch *wemPatch);
79 virtual void _addWEMPatch(WEMPatch *wemPatch);
81 void _applyFields(WEMPatch *wemPatch);
83 void _applyMetaFields(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
121ML_END_NAMESPACE
#define MLWEM_EXPORT
Definition MLWEMSystem.h:18
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()
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
virtual void _notifyObservers()
Notify observers with FINISHED | SELECTION | REPAINT message.
BoolField * _overwriteLabelDescriptionFld
Shall the label and the description be overwritten?
void _finishProcessing() override
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.
WEMModule(std::string type="WEMModule", int numInImages=0, int numOutImages=0)
Standard constructor.
Base class for triangle and quad patches.
Definition WEMPatch.h:61
#define ML_CLASS_HEADER(className)