MeVisLab Toolbox Reference
ml::ProcessAllPagesJob Class Reference

Public interface for processing all pages of a temporary output image. More...

#include <mlProcessAllPagesJob.h>

Inheritance diagram for ml::ProcessAllPagesJob:
ml::GetTileJobBase

Public Member Functions

 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.
 
 ~ProcessAllPagesJob () override
 Destructor.
 
MLErrorCode init (PageRequestProcessor &processor) override
 Initializes the process all pages request and add it to the processor if no error occurs.
 
void delegateProgressUpdate (double progress) override
 Emits the progress when it changes, to be reimplemented in derived classes.
 
- Public Member Functions inherited from ml::GetTileJobBase
 GetTileJobBase ()
 
virtual ~GetTileJobBase ()
 
double getProgress () const
 Returns the current progress of the tile request ([0..1] range).
 
bool hasFinished ()
 Returns if the request has finished (If an error happened, true will be returned as well).
 
bool hasError () const
 Returns if the request has an error (and the data is thus unusable/invalid).
 
MLErrorCode getError () const
 Returns the error that happened (return ML_RESULT_OK if everything is ok).
 
void setTileRequestFinishedCB (TileRequestFinishedCB *cb, void *data)
 Sets the tile request finished cb, which is called when the tile is ready.
 
void cancel ()
 Cancels the GetTileJob, this only sets the flag, the real cancellation needs to be done on the PageRequestProcessor.
 
void updateProgress ()
 Called by host to allow custom progress updates.
 
void setProgressCB (MLRequestProgressCB *progressCallback, void *progressCallbackUserData)
 Set the progress callback. It will be called when updateProgress() is called.
 

Additional Inherited Members

- Protected Attributes inherited from ml::GetTileJobBase
TileRequest_request
 The root TileRequest that is used internally.
 
MLRequestProgressCB_progressCB
 
void_progressCBUserData
 
double _lastProgress
 

Detailed Description

Public interface for processing all pages of a temporary output image.

Definition at line 36 of file mlProcessAllPagesJob.h.

Constructor & Destructor Documentation

◆ ProcessAllPagesJob()

ml::ProcessAllPagesJob::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.

After creation, the job needs to be initialized using init(), see below.

◆ ~ProcessAllPagesJob()

ml::ProcessAllPagesJob::~ProcessAllPagesJob ( )
override

Destructor.

Member Function Documentation

◆ delegateProgressUpdate()

void ml::ProcessAllPagesJob::delegateProgressUpdate ( double )
overridevirtual

Emits the progress when it changes, to be reimplemented in derived classes.

Reimplemented from ml::GetTileJobBase.

◆ init()

MLErrorCode ml::ProcessAllPagesJob::init ( PageRequestProcessor & processor)
overridevirtual

Initializes the process all pages request and add it to the processor if no error occurs.

It returns ML_REQUEST_OUTSIDE_OF_IMAGE if the request lies completely outside and nothing needs to be done.

Implements ml::GetTileJobBase.


The documentation for this class was generated from the following file: