HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RAY_PixelFilter Class Referenceabstract

#include <RAY_PixelFilter.h>

+ Inheritance diagram for RAY_PixelFilter:

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_PixelFilterclone () 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_PixelFiltergetPixelFilter (const char *name)
 
static RAY_PixelFiltergetSubPixelFilter ()
 
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 floatgetSampleData (const RAY_SampleBuffer &source, int channel)
 Get the data for the channel with the specified index. More...
 

Detailed Description

Member Typedef Documentation

typedef RAY_PixelFilter*(* RAY_PixelFilter::Constructor)(const char *name)

Definition at line 45 of file RAY_PixelFilter.h.

Constructor & Destructor Documentation

RAY_PixelFilter::RAY_PixelFilter ( )
inline

Definition at line 39 of file RAY_PixelFilter.h.

virtual RAY_PixelFilter::~RAY_PixelFilter ( )
inlinevirtual

Definition at line 40 of file RAY_PixelFilter.h.

Member Function Documentation

virtual void RAY_PixelFilter::addNeededSpecialChannels ( RAY_Imager &  imager)
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 void RAY_PixelFilter::addSpecialChannel ( RAY_Imager &  imager,
RAY_SpecialChannel  channel 
)
static

Indicate that the specified special channel must be added for this filter.

Examples:
RAY/RAY_DemoEdgeDetectFilter.C.
virtual RAY_PixelFilter* RAY_PixelFilter::clone ( ) const
pure virtual
virtual void RAY_PixelFilter::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
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 int RAY_PixelFilter::getChannelIdxByName ( const RAY_Imager &  imager,
const char *  name 
)
static

Returns -1 if no channel with the specified name exists.

static int RAY_PixelFilter::getChannelVectorSize ( const RAY_Imager &  imager,
int  channel 
)
static

Returns -1 if no channel with the specified channel index exists.

virtual void RAY_PixelFilter::getFilterWidth ( float x,
float y 
) const
pure virtual

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 RAY_PixelFilter* RAY_PixelFilter::getPixelFilter ( const char *  name)
static
static const float* RAY_PixelFilter::getSampleData ( const RAY_SampleBuffer &  source,
int  channel 
)
static

Get the data for the channel with the specified index.

Examples:
RAY/RAY_DemoEdgeDetectFilter.C.
static int RAY_PixelFilter::getSpecialChannelIdx ( const RAY_Imager &  imager,
RAY_SpecialChannel  channel 
)
static

Get the channel index of the specified special channel.

Examples:
RAY/RAY_DemoEdgeDetectFilter.C.
static RAY_PixelFilter* RAY_PixelFilter::getSubPixelFilter ( )
static
virtual void RAY_PixelFilter::prepFilter ( int  sxres,
int  syres 
)
pure virtual

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 void RAY_PixelFilter::registerPixelFilter ( const char *  name,
Constructor  constructor 
)
static
virtual void RAY_PixelFilter::setArgs ( int  argc,
const char *const  argv[] 
)
pure virtual

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