Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

mitkProcessObject.h

00001 /*=========================================================================
00002 
00003   Program:   3DMed
00004   Date:      $Date: 2014-02-25 18:30:00 +0800 $
00005   Version:   $Version: 4.6.0 $
00006   Copyright: MIPG, Institute of Automation, Chinese Academy of Sciences
00007 
00008 =========================================================================*/
00009 
00010 
00011 #ifndef __mitkProcessObject_h
00012 #define __mitkProcessObject_h
00013 
00014 #include "mitkObject.h"
00015 
00020 class MITK_COMMON_API mitkProcessObject : public mitkObject
00021 {
00022 public:
00023     MITK_TYPE(mitkProcessObject,mitkObject)
00024 
00025     virtual void PrintSelf(ostream& os);
00026 
00027     bool Run();
00028 
00029     void SetStartMethod(void (* f) (void *)) {m_StartMethod = f;}
00030     void SetEndMethod(void (* f) (void *)){m_EndMethod = f;}
00031     void SetProgressMethod(void (* f) (void *)){m_ProgressMethod = f;}
00032 
00037     unsigned long GetProgressRate() { return m_ProgressRate; }
00038     
00043     void SetProgressRateMax(unsigned long m) { m_ProgressRateMax = m; }
00044 
00045     // For local usage. Do not use these functions out of MITK.
00046     void SetProgressRate(unsigned int rate) { m_ProgressRate = rate; }
00047     unsigned int GetProgressRateMax() { return m_ProgressRateMax; }
00048     void UpdateObservers() { this->_updateObservers(); }
00049 
00050 protected:
00051     virtual ~mitkProcessObject();
00052     mitkProcessObject();    
00053 
00054     virtual bool Execute() { return true; }
00055 
00056     unsigned long m_ProgressRate;
00057     unsigned long m_ProgressRateMax;
00058 
00059 private:
00060     void (* m_StartMethod) (void *);
00061     void (* m_EndMethod) (void *);
00062     void (* m_ProgressMethod) (void *);
00063 
00064     mitkProcessObject(const mitkProcessObject&);
00065     void operator=(const mitkProcessObject&);
00066 };
00067 
00068 
00069 //#define DEFINED_mitkProcessObject
00070 
00071 
00072 
00073 #endif
00074 
00075 

Generated on Tue Feb 25 15:00:37 2014 for MITK (Medical Imaging ToolKit) by  doxygen 1.4.3