dng_filter_task Class Reference
Represents a task which filters an area of a source
dng_image to an area of a destination
dng_image.
More...
#include <dng_filter_task.h>
List of all members.
Detailed Description
Represents a task which filters an area of a source
dng_image to an area of a destination
dng_image.
Constructor & Destructor Documentation
Construct a filter task given a source and destination images.
- Parameters:
-
| srcImage | Image from which source pixels are read. |
| dstImage | Image to which result pixels are written. |
Member Function Documentation
void dng_filter_task::Process |
( |
uint32 |
threadIndex, |
|
|
const dng_rect & |
area, |
|
|
dng_abort_sniffer * |
sniffer | |
|
) |
| | [virtual] |
Process one tile or partitioned area. Should not be overridden. Instead, override ProcessArea, which is where to implement filter processing for a specific type of dng_filter_task. There is no allocator parameter as all allocation should be done in Start.
- Parameters:
-
| threadIndex | 0 to threadCount - 1 index indicating which thread this is. (Can be used to get a thread-specific buffer allocated in the Start method.) |
| area | Size of tiles to be used for sizing buffers, etc. (Edges of processing can be smaller.) |
| sniffer | dng_abort_sniffer to use to check for user cancellation and progress updates. |
Implements dng_area_task.
References dng_image::edge_repeat, dng_image::Get(), ProcessArea(), dng_image::Put(), and SrcArea().
Implements filtering operation from one buffer to another. Source and destination pixels are set up in member fields of this class. Ideally, no allocation should be done in this routine.
- Parameters:
-
| threadIndex | The thread on which this routine is being called, between 0 and threadCount - 1 for the threadCount passed to Start method. |
| srcBuffer | Input area and source pixels. |
| dstBuffer | Output area and destination pixels. |
Referenced by Process().
virtual dng_rect dng_filter_task::SrcArea |
( |
const dng_rect & |
dstArea |
) |
[inline, virtual] |
Compute the source area needed for a given destination area. Default implementation assumes destination area is equal to source area for all cases.
- Parameters:
-
| dstArea | Area to for which pixels will be computed. |
- Return values:
-
| The | source area needed as input to calculate the requested destination area. |
Referenced by Process(), and SrcTileSize().
virtual dng_point dng_filter_task::SrcTileSize |
( |
const dng_point & |
dstTileSize |
) |
[inline, virtual] |
Given a destination tile size, calculate input tile size. Simlar to SrcArea, and should seldom be overridden.
- Parameters:
-
| dstTileSize | The destination tile size that is targeted for output. |
- Return values:
-
| The | source tile size needed to compute a tile of the destination size. |
References SrcArea().
Referenced by Start().
Called prior to processing on specific threads. Can be used to allocate per-thread memory buffers, etc.
- Parameters:
-
| threadCount | Total number of threads that will be used for processing. Less than or equal to MaxThreads of dng_area_task. |
| tileSize | Size of source tiles which will be processed. (Not all tiles will be this size due to edge conditions.) |
| allocator | dng_memory_allocator to use for allocating temporary buffers, etc. |
| sniffer | Sniffer to test for user cancellation and to set up progress. |
Reimplemented from dng_area_task.
References dng_memory_allocator::Allocate(), and SrcTileSize().
The documentation for this class was generated from the following files: