MeVisLabToolboxReference
MeVisLab/Standard/Sources/ML/MLWEM/WEMBase/WEMModuleBase/WEMModule.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 //----------------------------------------------------------------------------------
00005 
00011 #ifndef __WEMModule_H
00012 #define __WEMModule_H
00013 
00014 #include "WEMBase/WEM.h"
00015 #include "WEMBase/WEMDefaults.h"
00016 
00017 class MLTimeProfileHandle;
00018 
00019 
00020 ML_START_NAMESPACE
00021 
00025 class MLWEM_EXPORT WEMModule : public Module
00026 {
00027 
00028   ML_MODULE_CLASS_HEADER(WEMModule);
00029 
00030 
00031 public:
00032 
00034   WEMModule(std::string type="WEMModule", int numInImages=0,int numOutImages=0);
00035 
00037   inline std::string getType() { return _type; }
00038 
00039 
00040 protected:
00041 
00043   virtual ~WEMModule();
00044 
00045 
00046   /* FIELDS */
00047 
00049   BoolField* _isProcessingFld;
00051   FloatField* _elapsedTimeFld;
00052 
00053 
00054   /* STATE VARIABLES */
00055 
00058   std::string _type;
00059 
00060 
00061   /* METHODS */
00062   
00064   virtual void handleNotification(Field *field);
00066   virtual void activateAttachments();
00067 
00069   void _startProcessing();
00071   void _finishProcessing();
00072 
00073 private:
00074 
00075   /* FIELDS */
00076 
00077 
00078   /* STATE VARIABLES */
00079 
00081   clock_t _startClock;    
00083   clock_t _finishClock;    
00085   double _time;
00086   
00088   MLTimeProfileHandle* _timeProfileHandle;
00089 
00090 
00091   /* METHODS */
00092 
00093 };
00094 
00096 
00097 ML_END_NAMESPACE
00098 
00099 #endif // __WEMModule_H