MeVisLab Toolbox Reference
|
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. More...
#include <mlBackgroundTaskTileProcessor.h>
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 setup things before doProcessing() requests tiles. | |
Specifying the tile extent and box to process. | |
void | setRegion (const SubImageBox &box) |
Set the box that shall be processed tile-by-tile (default is the complete input image's box). | |
void | setTileExtent (const ImageVector &extent) |
Set the desired extent of the individual tiles (a component value of -1 means to use the region's extent for that component). | |
void | setClipTilesToRegion (bool clip) |
Set if the tiles are clipped to the requested region (default is true), which means that the tiles are smaller on borders if they do not fit the box to process. | |
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 ok. | |
virtual ManagedSubImage * | createExternalBuffer (const SubImageBox &box) |
Only needs to be reimplemented to allocate the memory for your tiles yourself, is only called if setAllocationPolicy() is called with TileRequest::ExternalBuffer. | |
void | setDataType (MLDataType dt) |
Set the datatype (if it is not set, it will use the input image datatype). | |
MLDataType | getDataType () const |
Get the datatype. | |
void | setInputImageIndex (int index) |
Set the input image from which data is requested (the default is 0). | |
int | getInputImageIndex () const |
Get the input image index. | |
void | setAllocationPolicy (TileRequest::AllocationPolicy policy) |
Set the allocation policy of the tiles that are passed to processTile() (The default is to use the MemoryManager). | |
void | setMaximumQueuedTiles (int size) |
Set the number of tiles that are allowed to be requested on the request queue. | |
virtual bool | doProcessing (ModuleBackgroundTask &task) |
Start the processing, 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 cleanup things after doProcessing() finished processing tiles. | |
void | setNumTiles (MLint tiles) |
Set the number of tiles that will be processed. | |
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 126 of file mlBackgroundTaskTileProcessor.h.
ml::BackgroundTaskTileProcessor::BackgroundTaskTileProcessor | ( | ) |
|
overridevirtual |
Reimplemented to return the next tile's box as given by the iterator.
Implements ml::BackgroundTaskTileProcessorBase.
Set if the tiles are clipped to the requested region (default is true), which means that the tiles are smaller on borders if they do not fit the box to process.
Definition at line 146 of file mlBackgroundTaskTileProcessor.h.
References mlrange_cast().
|
inline |
Set the box that shall be processed tile-by-tile (default is the complete input image's box).
Definition at line 139 of file mlBackgroundTaskTileProcessor.h.
|
inline |
Set 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 142 of file mlBackgroundTaskTileProcessor.h.
|
overridevirtual |
Reimplemented to setup things before doProcessing() requests tiles.
Reimplemented from ml::BackgroundTaskTileProcessorBase.