|
MeVisLab Toolbox Reference
|
Class ProcessAllPagesBackgroundTask. More...
#include <mlProcessAllPagesBackgroundTask.h>
Public Member Functions | |
| ProcessAllPagesBackgroundTask (Module *module, FloatField *progressField=nullptr, StringField *statusField=nullptr) | |
| ~ProcessAllPagesBackgroundTask () override | |
| void | setHandler (ProcessAllPagesHandler *handler) |
| Sets the pointer to a ProcessAllPagesHandler. The ownership is passed to the ProcessAllPagesBackgroundTask. | |
| ProcessAllPagesHandler * | getHandler () const |
| Returns access to the handler. The ownership stays with ProcessAllPagesBackgroundTask. | |
| void | setRegion (const SubImageBox &box) |
| Sets the box to be processed. Default is the full image. | |
| SubImageBox | getRegion () const |
| Returns the box to be processed. | |
| void | setInitialStatusMessage (const std::string &statusArg) |
| Sets the initial status string that should be displayed. | |
| void | run () override |
| reimp | |
| Public Member Functions inherited from ml::ModuleBackgroundTask | |
| ModuleBackgroundTask (Module *module, FloatField *progressField=nullptr, StringField *statusField=nullptr) | |
| ~ModuleBackgroundTask () override | |
| void | setProgressField (FloatField *field) |
| void | setStatusField (StringField *field) |
| bool | hasProgressField () |
| bool | hasStatusField () |
| void | setStatusString (const std::string &status) override |
| void | setProgress (float progress) override |
| AsyncTileRequest | requestTile (int inputImageIndex, const SubImageBox &box, MLDataType type, const ScaleShiftData &shift=ScaleShiftData(), int getTileFlags=ImagingBackgroundTask::UseMemoryManager) |
| AsyncTileRequest | requestTileWithExternalBuffer (int inputImageIndex, const SubImageBox &box, MLDataType type, const ScaleShiftData &shift, ManagedSubImage *externalBuffer, int getTileFlags=ImagingBackgroundTask::ExternalBuffer) |
| ProcessAllPagesRequest | requestProcessAllPages (ProcessAllPagesHandler *handler, const SubImageBox &box=SubImageBox()) |
| ProcessAllPagesRequest | requestProcessAllPages (const SubImageBox &box=SubImageBox()) |
| virtual bool | shouldCancelOnInputImageChange (int) const |
| ImageVector | getInputImageExtent (int index=0) const |
Returns the extent of the input image at index. | |
| ImageVector | getInputImagePageExtent (int index=0) const |
Returns the page extent of the input image at index. | |
| MLDataType | getInputImageDataType (int index=0) const |
Returns the data type of the input image at index. | |
| double | getInputImageMinVoxelValue (int index=0) const |
Returns the minimum voxel value of the input image at index. | |
| double | getInputImageMaxVoxelValue (int index=0) const |
Returns the maximum voxel value of the input image at index. | |
| const MedicalImageProperties & | getInputImageProperties (int index=0) const |
Returns the image properties of the input image at index. | |
| bool | hasValidInputImage (int index=0) const |
Returns whether the input image at index is valid and thus its properties can be requested. | |
| int | getNumInputImages () const |
| Returns the number of input images. | |
| Public Member Functions inherited from ml::ImagingBackgroundTask | |
| ImagingBackgroundTask (void *owner) | |
| ~ImagingBackgroundTask () override | |
| Public Member Functions inherited from ml::MessagingBackgroundTask | |
| MessagingBackgroundTask (void *ownerArg) | |
| template<typename Object, typename Method> | |
| void | callMethodOnGUI (const DistantObject< Object > &target, Method method) |
| template<typename Object, typename Method, typename Arg1> | |
| void | callMethodOnGUI (const DistantObject< Object > &target, Method method, const Arg1 &arg1) |
| template<typename Object, typename Method, typename Arg1, typename Arg2> | |
| void | callMethodOnGUI (const DistantObject< Object > &target, Method method, const Arg1 &arg1, const Arg2 &arg2) |
| template<typename Object, typename Method, typename Arg1, typename Arg2, typename Arg3> | |
| void | callMethodOnGUI (const DistantObject< Object > &target, Method method, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) |
| template<typename Object, typename Method, typename Arg1, typename Arg2, typename Arg3, typename Arg4> | |
| void | callMethodOnGUI (const DistantObject< Object > &target, Method method, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4) |
| template<typename Object, typename Method, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5> | |
| void | callMethodOnGUI (const DistantObject< Object > &target, Method method, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5) |
| Public Member Functions inherited from ml::BackgroundTask | |
| BackgroundTask (void *owner) | |
| virtual | ~BackgroundTask () |
| bool | isSynchronous () const |
| Checks whether the task is synchronous, which means it is not executed in a different thread. | |
| void | setSynchronous (bool flag) |
| Sets whether the task is handled synchronously. Call this only in the setup of the task, not while it is already running. | |
| void | setSynchronousCancelField (NotifyField *field) |
| Sets a cancel field that is used in synchronous mode to check whether cancel was pressed. | |
| Status | status () const |
| void | cancel () |
| bool | isCanceled () const |
| bool | shouldStop () |
| void | resume () |
| void | suspend () |
| std::string | statusString () const |
| float | progress () const |
| void | setOwnerWasDeleted () |
| bool | hasOwner () const |
| void * | owner () const |
| void | waitAndExecuteNextMessage () |
| bool | executeNextMessage () |
| void | sendMessageToGUI (BackgroundTaskMessage *message) |
| void | logMessage (const std::string &message) |
| bool | isVerbose () const |
| Checks whether task uses verbose logging. | |
| void | setVerbose (bool flag) |
| double | runningTime () const |
| double | idleTime () const |
| void | getStatusInformation (BackgroundTaskStatusInformation &info) |
| MLuint32 | taskId () const |
| Returns the unique id of this task. The id of a task never changes. | |
| void | setTaskFinishedCB (BackgroundTaskFinishedCB *callback, void *userdata) |
| void | addObserver (Observer *observer) |
| void | removeObserver (Observer *observer) |
Additional Inherited Members | |
| Public Types inherited from ml::ImagingBackgroundTask | |
| enum | TileRequestFlags { UseMemoryManager = TileRequest::UseMemoryManager , UseMLAlloc = TileRequest::UseMLAlloc , NoAllocation = TileRequest::NoAllocation , ExternalBuffer = TileRequest::ExternalBuffer , AllocationPolicyMask = 0xf , RequestReadOnlyPage = 16 , ReceiveProgressMessages = 32 } |
| Public Types inherited from ml::BackgroundTask | |
| enum | Status { NotInTaskManager , Queued , Running , Finished , Canceled , Suspended } |
| Defines current status of the task. More... | |
| Protected Member Functions inherited from ml::ImagingBackgroundTask | |
| BackgroundRequestId | generateBackgroundRequestId () |
| Generates next generateBackgroundRequestId(). | |
| Protected Member Functions inherited from ml::BackgroundTask | |
| void | sendStatusChangedToObservers () |
| Sends the status change to all observers. | |
| void | sendStatusStringChangedToObservers () |
| Sends the status string change to all observers. | |
| void | sendLogMessageToObservers (const std::string &msg) |
| Sends the status string change to all observers. | |
| void | addIdleTime (double timeInSecs) |
Adds given timeInSecs as spent idle time. | |
Class ProcessAllPagesBackgroundTask.
A simple background task that takes a ProcessAllPagesHandler and a box, and runs the processing in the background using its run() method. If no ProcessAllPagesHandler is given or set to NULL, a processAllPages(-1) is started on the Module.
Definition at line 32 of file mlProcessAllPagesBackgroundTask.h.
| ml::ProcessAllPagesBackgroundTask::ProcessAllPagesBackgroundTask | ( | Module * | module, |
| FloatField * | progressField = nullptr, | ||
| StringField * | statusField = nullptr ) |
|
override |
|
inline |
Returns access to the handler. The ownership stays with ProcessAllPagesBackgroundTask.
Definition at line 42 of file mlProcessAllPagesBackgroundTask.h.
|
inline |
Returns the box to be processed.
Definition at line 48 of file mlProcessAllPagesBackgroundTask.h.
|
overridevirtual |
reimp
Implements ml::BackgroundTask.
|
inline |
Sets the pointer to a ProcessAllPagesHandler. The ownership is passed to the ProcessAllPagesBackgroundTask.
Definition at line 40 of file mlProcessAllPagesBackgroundTask.h.
|
inline |
Sets the initial status string that should be displayed.
Definition at line 51 of file mlProcessAllPagesBackgroundTask.h.
|
inline |
Sets the box to be processed. Default is the full image.
Definition at line 45 of file mlProcessAllPagesBackgroundTask.h.