MeVisLabToolboxReference
MeVis/Foundation/Sources/MLBackgroundTasks/mlProcessAllPagesBackgroundTask.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 //----------------------------------------------------------------------------------
00004 
00009 //----------------------------------------------------------------------------------
00010 #ifndef __mlProcessAllPagesBackgroundTask_H
00011 #define __mlProcessAllPagesBackgroundTask_H
00012 
00013 #include "MLBackgroundTasksSystem.h"
00014 
00015 #include "mlModuleBackgroundTask.h"
00016 
00017 ML_START_NAMESPACE
00018 
00019 //-----------------------------------------------------------------------------------
00021 
00026 //-----------------------------------------------------------------------------------
00027 class MLBACKGROUNDTASKS_EXPORT ProcessAllPagesBackgroundTask : public ModuleBackgroundTask
00028 {
00029 public:
00030   ProcessAllPagesBackgroundTask(Module* module, FloatField* progressField = NULL, StringField* statusField = NULL);
00031 
00032   ~ProcessAllPagesBackgroundTask();
00033 
00035   void                    setHandler(ProcessAllPagesHandler* handler) { _handler = handler; }
00037   ProcessAllPagesHandler* getHandler() const { return _handler; }
00038 
00040   void                    setRegion(const SubImageBox& box) { _box = box; }
00041 
00043   SubImageBox             getRegion() const { return _box; }
00044 
00046   void setInitialStatusMessage(const std::string& status) { _initialStatusMessage = status; }
00047 
00049   virtual void run();
00050 
00051 private:
00052   ProcessAllPagesHandler* _handler;
00053   SubImageBox _box;
00054   std::string _initialStatusMessage;
00055 
00056   bool _ownsHandler;
00057 };
00058 
00059 ML_END_NAMESPACE
00060 
00061 #endif //of __mlProcessAllPagesBackgroundTask_H
00062