HDK
|
#include <RAY_PixelFilter.h>
Public Types | |
typedef RAY_PixelFilter *(* | Constructor )(const char *name) |
Public Member Functions | |
RAY_PixelFilter () | |
virtual | ~RAY_PixelFilter () |
virtual void | setArgs (int argc, const char *const argv[])=0 |
virtual RAY_PixelFilter * | clone () const =0 |
virtual void | addNeededSpecialChannels (RAY_Imager &imager) |
Create any imager planes required by this pixel filter. More... | |
virtual void | prepFilter (int sxres, int syres)=0 |
virtual void | getFilterWidth (float &x, float &y) const =0 |
virtual void | filter (float *destination, int vectorsize, const RAY_SampleBuffer &source, int channel, int sourcewidth, int sourceheight, int destwidth, int destheight, int destxoffsetinsource, int destyoffsetinsource, const RAY_Imager &imager) const =0 |
Static Public Member Functions | |
static RAY_PixelFilter * | getPixelFilter (const char *name) |
static RAY_PixelFilter * | getSubPixelFilter () |
static void | registerPixelFilter (const char *name, Constructor constructor) |
static void | addSpecialChannel (RAY_Imager &imager, RAY_SpecialChannel channel) |
Indicate that the specified special channel must be added for this filter. More... | |
static int | getSpecialChannelIdx (const RAY_Imager &imager, RAY_SpecialChannel channel) |
Get the channel index of the specified special channel. More... | |
static int | getChannelIdxByName (const RAY_Imager &imager, const char *name) |
Returns -1 if no channel with the specified name exists. More... | |
static int | getChannelVectorSize (const RAY_Imager &imager, int channel) |
Returns -1 if no channel with the specified channel index exists. More... | |
static const float * | getSampleData (const RAY_SampleBuffer &source, int channel) |
Get the data for the channel with the specified index. More... | |
Definition at line 37 of file RAY_PixelFilter.h.
typedef RAY_PixelFilter*(* RAY_PixelFilter::Constructor)(const char *name) |
Definition at line 45 of file RAY_PixelFilter.h.
|
inline |
Definition at line 39 of file RAY_PixelFilter.h.
|
inlinevirtual |
Definition at line 40 of file RAY_PixelFilter.h.
|
inlinevirtual |
Create any imager planes required by this pixel filter.
Reimplemented in HDK_Sample::RAY_DemoEdgeDetectFilter.
Definition at line 54 of file RAY_PixelFilter.h.
|
static |
Indicate that the specified special channel must be added for this filter.
|
pure virtual |
Implemented in HDK_Sample::RAY_DemoEdgeDetectFilter.
|
pure virtual |
Perform the filtering
Read data from source.getSampleData(channel), which is sourcewidth by sourceheight, and has vectorsize floats per value, (1, 3, or 4).
Write data to destination, which is destwidth by destheight, has the same vectorsize, and whose unfiltered (ubox) source data would have started at (destxoffsetinsource, destyoffsetinsource). The number of pixel samples in each pixel's unfiltered data was already passed into prepFilter, and should have been saved, if needed. For each destination pixel, the all of the data that pixel depends upon should be present in source.
imager is provided in case any special channels are needed for this channel's filtering or if addition information about this channel is needed.
Implemented in HDK_Sample::RAY_DemoEdgeDetectFilter.
|
static |
Returns -1 if no channel with the specified name exists.
Returns -1 if no channel with the specified channel index exists.
Query the filter width. A filter width of 1 means that the samples filtered will map exactly to the corresponding pixels in the output image (i.e. no sampling outside the bounds)
Implemented in HDK_Sample::RAY_DemoEdgeDetectFilter.
|
static |
|
static |
Get the data for the channel with the specified index.
|
static |
Get the channel index of the specified special channel.
|
static |
Prepare for filtering a tile. sxres = samples per pixel in x direction syres = samples per pixel in y direction
Implemented in HDK_Sample::RAY_DemoEdgeDetectFilter.
|
static |
Implemented in HDK_Sample::RAY_DemoEdgeDetectFilter.