MeVisLab Toolbox Reference
ml::BackgroundTaskTileProcessor Class Reference

#include <mlBackgroundTaskTileProcessor.h>

Inheritance diagram for ml::BackgroundTaskTileProcessor:
ml::BackgroundTaskTileProcessorBase

Public Member Functions

 BackgroundTaskTileProcessor ()
SubImageBox getNextTileBox () override
 Reimplemented to return the next tile's box as given by the iterator.
bool setupProcessing (ModuleBackgroundTask &task) override
 Reimplemented to set up necessary elements before doProcessing() is called to requests tiles.
Specifying the tile extent and box to process.
void setRegion (const SubImageBox &box)
 Sets the box that shall be processed tile-by-tile. Default is the complete input image's box.
void setTileExtent (const ImageVector &extent)
void setClipTilesToRegion (bool clip)
Public Member Functions inherited from ml::BackgroundTaskTileProcessorBase
 BackgroundTaskTileProcessorBase ()
virtual ~BackgroundTaskTileProcessorBase ()
 Destructor.
virtual bool processTile (ManagedSubImage &image)=0
 Reimplement to process the given tile. Return true if everything was okay.
virtual ManagedSubImagecreateExternalBuffer (const SubImageBox &box)
void setDataType (MLDataType dt)
 Sets the data type. If it is not set, it will use the input image data type.
MLDataType getDataType () const
 Returns the data type.
void setInputImageIndex (int index)
 Sets the input image from which data is requested. The default is 0.
int getInputImageIndex () const
 Returns the input image index.
void setAllocationPolicy (TileRequest::AllocationPolicy policy)
void setMaximumQueuedTiles (int size)
 Sets the number of tiles that are allowed to be requested on the request queue.
virtual bool doProcessing (ModuleBackgroundTask &task)
 Starts the processing and returns true if everything went fine.

Additional Inherited Members

Protected Member Functions inherited from ml::BackgroundTaskTileProcessorBase
virtual bool cleanupProcessing (ModuleBackgroundTask &)
 Needs to be reimplemented to clean up elements after doProcessing() is called to finished processing tiles.
void setNumTiles (MLint tiles)
 Sets the number of tiles that will be processed.

Detailed Description

A BackgroundTaskTileProcessor can be used as a base class for processing an input image tile-by-tile without handling the details of an asynchronous request queue yourself. Typically, you will just reimplement processTile().

Definition at line 127 of file mlBackgroundTaskTileProcessor.h.

Constructor & Destructor Documentation

◆ BackgroundTaskTileProcessor()

ml::BackgroundTaskTileProcessor::BackgroundTaskTileProcessor ( )

Member Function Documentation

◆ getNextTileBox()

SubImageBox ml::BackgroundTaskTileProcessor::getNextTileBox ( )
overridevirtual

Reimplemented to return the next tile's box as given by the iterator.

Implements ml::BackgroundTaskTileProcessorBase.

◆ setClipTilesToRegion()

void ml::BackgroundTaskTileProcessor::setClipTilesToRegion ( bool clip)
inline

Sets whether the tiles are clipped to the requested region, which means that the tiles are smaller on borders if they do not fit the box to process. Default is true.

Definition at line 149 of file mlBackgroundTaskTileProcessor.h.

◆ setRegion()

void ml::BackgroundTaskTileProcessor::setRegion ( const SubImageBox & box)
inline

Sets the box that shall be processed tile-by-tile. Default is the complete input image's box.

Definition at line 140 of file mlBackgroundTaskTileProcessor.h.

◆ setTileExtent()

void ml::BackgroundTaskTileProcessor::setTileExtent ( const ImageVector & extent)
inline

Sets the desired extent of the individual tiles A component value of -1 means to use the region's extent for that component.

Definition at line 144 of file mlBackgroundTaskTileProcessor.h.

◆ setupProcessing()

bool ml::BackgroundTaskTileProcessor::setupProcessing ( ModuleBackgroundTask & task)
overridevirtual

Reimplemented to set up necessary elements before doProcessing() is called to requests tiles.

Reimplemented from ml::BackgroundTaskTileProcessorBase.


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