MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
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,
36 StringField* statusField = nullptr);
37
39
42 {
43 _handler = handler;
44 }
47 {
48 return _handler;
49 }
50
52 void setRegion(const SubImageBox& box)
53 {
54 _box = box;
55 }
56
59 {
60 return _box;
61 }
62
64 void setInitialStatusMessage(const std::string& statusArg)
65 {
66 _initialStatusMessage = statusArg;
67 }
68
70 void run() override;
71
72private:
73 ProcessAllPagesHandler* _handler;
74 SubImageBox _box;
75 std::string _initialStatusMessage;
76
77 bool _ownsHandler;
78};
79
81
82#endif // of __mlProcessAllPagesBackgroundTask_H
#define MLBACKGROUNDTASKS_EXPORT
Field to encapsulate a float value.
Definition mlFields.h:449
ModuleBackgroundTask extends the ImagingBackgroundTask with several useful methods that allow asynchr...
Base class for an image processing module of the ML.
Definition mlModule.h:150
Class ProcessAllPagesBackgroundTask.
void setRegion(const SubImageBox &box)
Sets the box to be processed. Default is the full image.
ProcessAllPagesBackgroundTask(Module *module, FloatField *progressField=nullptr, StringField *statusField=nullptr)
SubImageBox getRegion() const
Returns the box to be processed.
void setInitialStatusMessage(const std::string &statusArg)
Sets the initial status string that should be displayed.
ProcessAllPagesHandler * getHandler() const
Returns access to the handler. The ownership stays with ProcessAllPagesBackgroundTask.
void setHandler(ProcessAllPagesHandler *handler)
Sets the pointer to a ProcessAllPagesHandler. The ownership is passed to the ProcessAllPagesBackgroun...
Base class for handlers that are used for the Module::processAllPages facility.
Field to encapsulate a string value.
Definition mlFields.h:634
Target mlrange_cast(Source arg)
Generic version of checked ML casts.