MeVisLabToolboxReference
ml::ProcessAllPagesHandler Class Reference

Base class for handlers that are used for the Module::processAllPages facility. More...

#include <mlProcessAllPagesHandler.h>

Inheritance diagram for ml::ProcessAllPagesHandler:
ml::CalculateOutputImageHandler ml::OrderedProcessAllPagesHandler ml::OrderedSingleInputProcessAllPagesHandler ml::internal::TypedHandlerBase< ProcessAllPagesHandler, Derived, NumberOfInputImages > ml::ClusterHandler< CLUSTERVOXELTYPE, DerivedAlgorithm > ml::TypedProcessAllPagesHandler< Derived, NumberOfInputImages, VariableType0, VariableType1, VariableType2, VariableType3 >

Public Member Functions

virtual void calculateOutputImageProperties (PagedImage *)
 Calculates the (temporary and virtual) output image's properties, which by default has the properties of input image 0. More...
 
virtual bool wantsProgressUpdates ()
 Returns if the handler want to receive progress updates via updateProgress() More...
 
virtual void updateProgress (double)
 Called in regular intervals when wantsProgressUpdates() == true. More...
 
void install (PagedImage *outImg)
 Installs the handler on the PagedImage (which is typically called by the ML Host, do not call it yourself!) More...
 
virtual const char * getName ()
 Returns the name of the handler. More...
 
- Public Member Functions inherited from ml::CalculateOutputImageHandler
virtual ~CalculateOutputImageHandler ()
 Destructor. More...
 
virtual SubImageBox calculateInputSubImageBox (int, const SubImageBox &outputSubImageBox)
 Called by the host to determine which input image region (tile) of input inputIndex is required to calculate a certain output image region (page) of output image. More...
 
virtual void calculateOutputSubImage (SubImage *outputSubImage, SubImage *inputSubImages, UserThreadData *userThreadData)=0
 Calculate page outputSubImage of output image given the input image tiles in array inputSubImages. More...
 
virtual UserThreadDatacreateUserThreadData ()
 Create the thread local user data for a thread. More...
 

Detailed Description

Base class for handlers that are used for the Module::processAllPages facility.

The main difference to the CalculateOutputImageHandler base class is that it adds the calculateOutputImageProperties() virtual method, which you can reimplement to setup the properties of the temporary output image that Module::processAllPages(yourHandler) generates. This allows to adjust the properties of the output image, e.g., its page extent.

Note
If you are looking for a way to implement this handler with typed sub images (TSubImage), please have a look at the TypedProcessAllPagesHandler template.

Definition at line 31 of file mlProcessAllPagesHandler.h.

Member Function Documentation

virtual void ml::ProcessAllPagesHandler::calculateOutputImageProperties ( PagedImage )
inlinevirtual

Calculates the (temporary and virtual) output image's properties, which by default has the properties of input image 0.

Note
Since this handler is called from Module::processAllPages(), the output image will NOT allocate any page data. It is merely used to define the properties of the input sub images and the page tiling that one sees in calculateOutputSubImage().

Reimplemented in ml::OrderedProcessAllPagesHandler, ml::ClusterHandler< CLUSTERVOXELTYPE, DerivedAlgorithm >, and ml::OrderedSingleInputProcessAllPagesHandler.

Definition at line 40 of file mlProcessAllPagesHandler.h.

virtual const char* ml::ProcessAllPagesHandler::getName ( )
inlinevirtual

Returns the name of the handler.

Re-implement this function to see the name of the handler in Profiling.

Definition at line 55 of file mlProcessAllPagesHandler.h.

void ml::ProcessAllPagesHandler::install ( PagedImage outImg)

Installs the handler on the PagedImage (which is typically called by the ML Host, do not call it yourself!)

virtual void ml::ProcessAllPagesHandler::updateProgress ( double  )
inlinevirtual

Called in regular intervals when wantsProgressUpdates() == true.

Is is guaranteed that this method is called with progress == 1. This method is only called by the new ML host.

Definition at line 48 of file mlProcessAllPagesHandler.h.

virtual bool ml::ProcessAllPagesHandler::wantsProgressUpdates ( )
inlinevirtual

Returns if the handler want to receive progress updates via updateProgress()

Definition at line 43 of file mlProcessAllPagesHandler.h.


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