MeVisLab Toolbox Reference
mlProcessAllPagesJob.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_JOB_H
14 #define ML_PROCESS_ALL_PAGES_JOB_H
15 
17 
18 // ML-includes
19 #include "mlInitSystemML.h"
20 
21 
22 #include "mlPagedImage.h"
23 #include "mlTileRequest.h"
24 #include "mlPageRequestCursor.h"
25 #include "mlGetTileJob.h"
26 
27 ML_START_NAMESPACE
28 
29 class PageRequest;
30 class PageRequestProcessor;
31 class ProcessAllPagesHandler;
32 
33 //-------------------------------------------------------------------------------------------
35 //-------------------------------------------------------------------------------------------
37 {
38 public:
41  ProcessAllPagesJob(Module& module, ProcessAllPagesHandler* handler = nullptr, const SubImageBox& box = SubImageBox(), int outputIndex = -1);
42 
44  ~ProcessAllPagesJob() override;
45 
49  MLErrorCode init(PageRequestProcessor& processor) override;
50 
51  void delegateProgressUpdate(double progress) override;
52 
53 private:
55  ProcessAllPagesHandler* _handler;
57  PagedImage _tempImage;
59  SubImageBox _box;
60 
62  PagedImage* _image;
63 
64  bool _wantsProgressUpdates;
65 };
66 
67 ML_END_NAMESPACE
68 
69 #endif //of __mlProcessAllPagesJob_H
70 
Base class for TileRequest based jobs.
Definition: mlGetTileJob.h:32
Base class for an image processing module of the ML.
Definition: mlModule.h:156
Abstract base class for page request processors.
Class which represents an image, which manages properties of an image and image data which is located...
Definition: mlPagedImage.h:70
Base class for handlers that are used for the Module::processAllPages facility.
Public interface for processing all pages of a temporary output image.
MLErrorCode init(PageRequestProcessor &processor) override
Initializes the process all pages request and add it to the processor if no error occurs.
ProcessAllPagesJob(Module &module, ProcessAllPagesHandler *handler=nullptr, const SubImageBox &box=SubImageBox(), int outputIndex=-1)
Creates a ProcessAllPagesJob for the given Module module with the requested box.
void delegateProgressUpdate(double progress) override
Emits the progress when it changes, to be reimplemented in derived classes.
~ProcessAllPagesJob() override
Destructor.
MLint32 MLErrorCode
Type of an ML Error code.
Definition: mlTypeDefs.h:818
#define MLEXPORT
To export symbols from a dll/shared object, we need to mark them with the MLEXPORT symbol.
TSubImageBox< MLint > SubImageBox
Define the standard SubImageBox type used in the ML. Its size varies with the size of the MLint type.