HDK_Sample::COP2_SampleFilter Class Reference

Simple example of a kernel filter. More...

#include <COP2_SampleFilter.h>

Inheritance diagram for HDK_Sample::COP2_SampleFilter:

COP2_MaskOp COP2_PixelBase COP2_Node OP_Network OP_Node OP_Parameters OP_NetworkBoxItem PRM_ParmOwner

List of all members.

Public Member Functions

virtual void getInputDependenciesForOutputArea (COP2_CookAreaInfo &output_area, const COP2_CookAreaList &input_areas, COP2_CookAreaList &needed_areas)

Static Public Member Functions

static OP_NodemyConstructor (OP_Network *, const char *, OP_Operator *)
 All nodes are instantiated via a myConstructor method.

Static Public Attributes

static OP_TemplatePair myTemplatePair
static OP_VariablePair myVariablePair
static PRM_Template myTemplateList []
static CH_LocalVariable myVariableList []
static const char * myInputLabels []

Protected Member Functions

virtual void computeImageBounds (COP2_Context &context)
virtual COP2_ContextDatanewContextData (const TIL_Plane *p, int array_index, float t, int xres, int yres, int thread, int max_threads)
virtual OP_ERROR doCookMyTile (COP2_Context &context, TIL_TileList *tilelist)
virtual const char * getOperationInfo ()
 Returns a description of the operation for the node info popup.
virtual ~COP2_SampleFilter ()


Detailed Description

Simple example of a kernel filter.

This is an HDK example of a 3x3 kernel filter which uses template classes to abstract the operation for various data formats. It also demonstrates how to deal with fetching input areas larger than a tile, and how to enlarging the canvas for the COP.

Examples:

COP2/COP2_SampleFilter.C.

Definition at line 42 of file COP2_SampleFilter.h.


Constructor & Destructor Documentation

COP2_SampleFilter::~COP2_SampleFilter (  )  [protected, virtual]

Examples:
COP2/COP2_SampleFilter.h.

Definition at line 98 of file COP2_SampleFilter.C.


Member Function Documentation

void COP2_SampleFilter::computeImageBounds ( COP2_Context context  )  [protected, virtual]

This operation expands the canvas bounds by 1 pixel in all directions. computeImageBounds() announces this to the COP engine.

Reimplemented from COP2_MaskOp.

Examples:
COP2/COP2_SampleFilter.C, and COP2/COP2_SampleFilter.h.

Definition at line 158 of file COP2_SampleFilter.C.

OP_ERROR COP2_SampleFilter::doCookMyTile ( COP2_Context context,
TIL_TileList tilelist 
) [protected, virtual]

COP2_MaskOp defines lots of nice mask blending operations in cookMyTile(), and defines doCookMyTile for us to override instead. This is where the actual image operation is performed.

Implements COP2_MaskOp.

Examples:
COP2/COP2_SampleFilter.h.

Definition at line 323 of file COP2_SampleFilter.C.

void COP2_SampleFilter::getInputDependenciesForOutputArea ( COP2_CookAreaInfo output_area,
const COP2_CookAreaList input_areas,
COP2_CookAreaList needed_areas 
) [virtual]

Given an area of the image to cook, indicate which parts of the input's image are required

Reimplemented from COP2_MaskOp.

Examples:
COP2/COP2_SampleFilter.C, and COP2/COP2_SampleFilter.h.

Definition at line 174 of file COP2_SampleFilter.C.

const char * COP2_SampleFilter::getOperationInfo (  )  [protected, virtual]

Returns a description of the operation for the node info popup.

Reimplemented from COP2_Node.

Examples:
COP2/COP2_SampleFilter.C, and COP2/COP2_SampleFilter.h.

Definition at line 201 of file COP2_SampleFilter.C.

OP_Node * COP2_SampleFilter::myConstructor ( OP_Network net,
const char *  name,
OP_Operator op 
) [static]

All nodes are instantiated via a myConstructor method.

Examples:
COP2/COP2_SampleFilter.C, and COP2/COP2_SampleFilter.h.

Definition at line 85 of file COP2_SampleFilter.C.

COP2_ContextData * COP2_SampleFilter::newContextData ( const TIL_Plane p,
int  array_index,
float  t,
int  xres,
int  yres,
int  thread,
int  max_threads 
) [protected, virtual]

Returns a new context instance with the parameters for the filter in it, to be used by the many threads on the tiles.

Reimplemented from COP2_Node.

Examples:
COP2/COP2_SampleFilter.C, and COP2/COP2_SampleFilter.h.

Definition at line 110 of file COP2_SampleFilter.C.


Member Data Documentation

const char * COP2_SampleFilter::myInputLabels [static]

Initial value:

{
    "Image to Enhance",
    "Mask Input",
    0
}
Parameters, local variables and input labals.
Examples:
COP2/COP2_SampleFilter.C, and COP2/COP2_SampleFilter.h.

Definition at line 55 of file COP2_SampleFilter.h.

Initial value:

{
    PRM_Template(PRM_SWITCHER,  3, &PRMswitcherName, switcher),

    PRM_Template(PRM_FLT_J,     TOOL_PARM, 1, &names[0],PRMzeroDefaults),
    PRM_Template(PRM_FLT_J,     TOOL_PARM, 1, &names[1],PRMzeroDefaults),
    PRM_Template(PRM_FLT_J,     TOOL_PARM, 1, &names[2],PRMzeroDefaults),
    PRM_Template(PRM_FLT_J,     TOOL_PARM, 1, &names[3],PRMzeroDefaults),
    
    PRM_Template(),
}
Parameters, local variables and input labals.

Reimplemented from COP2_MaskOp.

Examples:
COP2/COP2_SampleFilter.h.

Definition at line 53 of file COP2_SampleFilter.h.

Parameters, local variables and input labals.

Reimplemented from COP2_MaskOp.

Examples:
COP2/COP2_SampleFilter.C, and COP2/COP2_SampleFilter.h.

Definition at line 51 of file COP2_SampleFilter.h.

Parameters, local variables and input labals.

Reimplemented from COP2_Node.

Examples:
COP2/COP2_SampleFilter.h.

Definition at line 54 of file COP2_SampleFilter.h.

Parameters, local variables and input labals.

Reimplemented from COP2_Node.

Examples:
COP2/COP2_SampleFilter.C, and COP2/COP2_SampleFilter.h.

Definition at line 52 of file COP2_SampleFilter.h.


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

Generated on Mon Jan 28 00:49:27 2013 for HDK by  doxygen 1.5.9