HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HDK_Sample::RAY_DemoEdgeDetectFilter Class Reference

#include <RAY_DemoEdgeDetectFilter.h>

+ Inheritance diagram for HDK_Sample::RAY_DemoEdgeDetectFilter:

Public Member Functions

 RAY_DemoEdgeDetectFilter ()
 
virtual ~RAY_DemoEdgeDetectFilter ()
 
virtual RAY_PixelFilterclone () const
 
virtual void setArgs (int argc, const char *const argv[])
 
virtual void getFilterWidth (float &x, float &y) const
 
virtual void addNeededSpecialChannels (RAY_Imager &imager)
 
virtual void prepFilter (int samplesperpixelx, int samplesperpixely)
 
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
 
- Public Member Functions inherited from RAY_PixelFilter
 RAY_PixelFilter ()
 
virtual ~RAY_PixelFilter ()
 

Additional Inherited Members

- Public Types inherited from RAY_PixelFilter
typedef RAY_PixelFilter *(* Constructor )(const char *name)
 
- Static Public Member Functions inherited from RAY_PixelFilter
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 float * getSampleData (const RAY_SampleBuffer &source, int channel)
 Get the data for the channel with the specified index. More...
 

Detailed Description

Examples:
RAY/RAY_DemoEdgeDetectFilter.C.

Definition at line 38 of file RAY_DemoEdgeDetectFilter.h.

Constructor & Destructor Documentation

RAY_DemoEdgeDetectFilter::RAY_DemoEdgeDetectFilter ( )
RAY_DemoEdgeDetectFilter::~RAY_DemoEdgeDetectFilter ( )
virtual
Examples:
RAY/RAY_DemoEdgeDetectFilter.h.

Definition at line 62 of file RAY_DemoEdgeDetectFilter.C.

Member Function Documentation

void RAY_DemoEdgeDetectFilter::addNeededSpecialChannels ( RAY_Imager &  imager)
virtual

addNeededSpecialChannels is called after setArgs so that this filter can indicate that it depends on having special channels like z-depths or Op IDs.

Reimplemented from RAY_PixelFilter.

Examples:
RAY/RAY_DemoEdgeDetectFilter.C, and RAY/RAY_DemoEdgeDetectFilter.h.

Definition at line 138 of file RAY_DemoEdgeDetectFilter.C.

RAY_PixelFilter * RAY_DemoEdgeDetectFilter::clone ( ) const
virtual
void RAY_DemoEdgeDetectFilter::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
virtual

filter is called for each destination tile region with a source that is at least as large as is needed by this filter, based on the filter widths returned by getFilterWidth.

Implements RAY_PixelFilter.

Examples:
RAY/RAY_DemoEdgeDetectFilter.C, and RAY/RAY_DemoEdgeDetectFilter.h.

Definition at line 195 of file RAY_DemoEdgeDetectFilter.C.

void RAY_DemoEdgeDetectFilter::getFilterWidth ( float &  x,
float &  y 
) const
virtual

getFilterWidth is called after setArgs when Mantra needs to know how far to expand the render region.

Implements RAY_PixelFilter.

Examples:
RAY/RAY_DemoEdgeDetectFilter.C, and RAY/RAY_DemoEdgeDetectFilter.h.

Definition at line 126 of file RAY_DemoEdgeDetectFilter.C.

void RAY_DemoEdgeDetectFilter::prepFilter ( int  samplesperpixelx,
int  samplesperpixely 
)
virtual

prepFilter is called after setArgs so that this filter can precompute data structures or values for use in filtering that depend on the number of samples per pixel in the x or y directions.

Implements RAY_PixelFilter.

Examples:
RAY/RAY_DemoEdgeDetectFilter.C, and RAY/RAY_DemoEdgeDetectFilter.h.

Definition at line 180 of file RAY_DemoEdgeDetectFilter.C.

void RAY_DemoEdgeDetectFilter::setArgs ( int  argc,
const char *const  argv[] 
)
virtual

setArgs is called with the options specified after the pixel filter name in the Pixel Filter parameter on the Mantra ROP. This filter accepts 5 options: -c 0.1 Consider a colour gradient of 0.1 colour units / pixel to be an edge. Make -1 to disable colour gradient check. -w 3.0 Make the width of the region to fit lines to for the colour gradient 3.0 pixels, i.e. each pixel may depend on samples 1.5 pixels from its centre. It gets clamped to a minimum width of 1.0. -z 0.005 Consider a z-depth gradient of a factor of 0.005 change in the z-depth per pixel to be an edge. For example, a gradient of 0.51 distance units per pixel at a depth of 100 units would be considered an edge. Make -1 to disable z-depth gradient check. -s 3.0 Make the width of the region to fit lines to for the z-depth gradient 3.0 pixels, i.e. each pixel may depend on samples 1.5 pixels from its centre. It gets clamped to a minimum width of 1.0. -o 3.0 Make the width of the region to search for varying Op IDs 3.0 pixels, i.e. each pixel may depend on samples 1.5 pixels from its centre. It gets clamped to a minimum width of 1.0. Make -1 to disable Op ID check.

Implements RAY_PixelFilter.

Examples:
RAY/RAY_DemoEdgeDetectFilter.C, and RAY/RAY_DemoEdgeDetectFilter.h.

Definition at line 76 of file RAY_DemoEdgeDetectFilter.C.


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