MeVisLabToolboxReference
MeVisLab/Standard/Sources/ML/MLWEM/WEMBase/WEMModuleBase/WEMGenerator.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 //----------------------------------------------------------------------------------
00007 
00014 #ifndef __WEMGenerator_H
00015 #define __WEMGenerator_H
00016 
00017 #include "WEMBase/WEM.h"
00018 #include "WEMModule.h"
00019 
00020 
00021 ML_START_NAMESPACE
00022 
00024 
00029 class MLWEM_EXPORT WEMGenerator : public WEMModule
00030 {
00031 
00032 public:
00033 
00035   WEMGenerator(std::string type="WEMGenerator", int numInImages=0,int numOutImages=0);
00036 
00037 protected:
00038 
00040   virtual ~WEMGenerator();
00041 
00042 
00043   /* FIELDS */
00044 
00047   BoolField* _autoApplyFld;
00050   BoolField* _autoUpdateFld;
00053   BoolField* _autoClearFld;
00054 
00056   BoolField* _overwriteLabelDescriptionFld;
00058   StringField* _labelFld;
00060   StringField* _descriptionFld;
00061 
00062 
00063   /* STATE VARIABLES */
00064 
00066   bool _outputWEMOwner;
00068   WEMPtr _outWEM;
00069 
00070 
00071   /* METHODS */
00072 
00074   virtual void handleNotification(Field *field);
00076   virtual void activateAttachments();
00078   virtual void _process();
00080   virtual void _finish(WEMPatch *wemPatch);
00082   virtual void _addWEMPatch(WEMPatch *wemPatch);
00084   void _applyFields(WEMPatch *wemPatch);
00086   void _applyMetaFields(WEMPatch* wemPatch);
00088   virtual void _notifyObservers();
00089 
00091   void _cleanup();
00092 
00093 private:
00094 
00095   /* FIELDS */
00096 
00098   NotifyField* _applyFld;
00100   BaseField* _outputWEMFld;
00103   IntField*    _idFld;
00104 
00106   BoolField* _removePreviousWEMsFld;
00107 
00108   /* STATE VARIABLES */
00109 
00110 
00111 
00112   /* METHODS */
00113 
00115   static void _WEMOwnerCB(void* userData, int notificationFlag, int dataFlag = 0);
00116 
00118   ML_CLASS_HEADER(WEMGenerator)
00119 
00120 };
00121 
00123 
00124 
00125 ML_END_NAMESPACE
00126 
00127 #endif // __WEMGenerator_H
00128