MeVisLab Toolbox Reference
mlProcessAllPagesBackgroundTask.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2009, 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#ifndef ML_PROCESS_ALL_PAGES_BACKGROUND_TASK_H
14#define ML_PROCESS_ALL_PAGES_BACKGROUND_TASK_H
15
17
19
21
23
24//-----------------------------------------------------------------------------------
26
31//-----------------------------------------------------------------------------------
33{
34public:
35 ProcessAllPagesBackgroundTask(Module* module, FloatField* progressField = nullptr, StringField* statusField = nullptr);
36
38
40 void setHandler(ProcessAllPagesHandler* handler) { _handler = handler; }
42 ProcessAllPagesHandler* getHandler() const { return _handler; }
43
45 void setRegion(const SubImageBox& box) { _box = box; }
46
48 SubImageBox getRegion() const { return _box; }
49
51 void setInitialStatusMessage(const std::string& statusArg) { _initialStatusMessage = statusArg; }
52
54 void run() override;
55
56private:
57 ProcessAllPagesHandler* _handler;
58 SubImageBox _box;
59 std::string _initialStatusMessage;
60
61 bool _ownsHandler;
62};
63
65
66#endif //of __mlProcessAllPagesBackgroundTask_H
67
#define MLBACKGROUNDTASKS_EXPORT
Project global and OS specific declarations.
Field to encapsulate a float value.
Definition mlFields.h:415
ModuleBackgroundTask extends the ImagingBackgroundTask with a number of useful methods that allow asy...
Base class for an image processing module of the ML.
Definition mlModule.h:151
Class ProcessAllPagesBackgroundTask.
void setRegion(const SubImageBox &box)
Set the box to be processed (default is the full image).
ProcessAllPagesBackgroundTask(Module *module, FloatField *progressField=nullptr, StringField *statusField=nullptr)
SubImageBox getRegion() const
Get the box to be processed.
void setInitialStatusMessage(const std::string &statusArg)
Set the initial status string that should be displayed.
ProcessAllPagesHandler * getHandler() const
Get access to the handler (the ownership stays with ProcessAllPagesBackgroundTask)
void setHandler(ProcessAllPagesHandler *handler)
Set the pointer to a ProcessAllPagesHandler, ownership is passed to the ProcessAllPagesBackgroundTask...
Base class for handlers that are used for the Module::processAllPages facility.
Field to encapsulate a string value.
Definition mlFields.h:610
Target mlrange_cast(Source arg)
Generic version of checked ML casts.