InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TranFxConvolutionFilter::Kernel Class Reference

#include <TranFxConvolutionFilter.h>

Public Member Functions

 Kernel (int32 width, int32 height, const float *coefficients)
 
virtual ~Kernel ()
 
uint32 GetWidth () const
 
uint32 GetHeight () const
 
int32 GetXOrigin () const
 
int32 GetYOrigin () const
 
const float * GetCoefficients () const
 
virtual void ApplySum (TranFxConvolutionFilter::Pixel &sum)
 

Detailed Description

Convolution kernel that contains a matrix of coefficients used to compute a value for a pixel based on the value of surrounding pixels.

Constructor & Destructor Documentation

TranFxConvolutionFilter::Kernel::Kernel (int32 width,
int32 height,
const float * coefficients 
)

Constructs kernel from an array containing a a matrix of co-efficients of the given width and height.

Parameters
widthof matrix
heightof matrix
coefficientsmatrix of coefficients as an array in row major order.
virtual TranFxConvolutionFilter::Kernel::~Kernel ()
inlinevirtual

Destructor.

Member Function Documentation

virtual void TranFxConvolutionFilter::Kernel::ApplySum (TranFxConvolutionFilter::Pixelsum)
inlinevirtual

Sub-classes can specialise this to change the computed output value in some way. Values might require to be normalised for example.

Parameters
sumcomputed output value for the current pixel.
const float* TranFxConvolutionFilter::Kernel::GetCoefficients () const
inline

Return the filter matrix in row major order.

Returns
the filter matrix in row major order.
uint32 TranFxConvolutionFilter::Kernel::GetHeight (void ) const
inline

Return the height of this filter.

Returns
the height of this filter.
uint32 TranFxConvolutionFilter::Kernel::GetWidth (void ) const
inline

Return the width of this filter.

Returns
the width of this filter.
int32 TranFxConvolutionFilter::Kernel::GetXOrigin () const
inline

Return the x origin of this filter. This identifies the x component of the pixel position whose output value is being computed by this filter.

Returns
the x origin of this filter.
int32 TranFxConvolutionFilter::Kernel::GetYOrigin () const
inline

Return the y origin of this filter. This identifies the x component of the pixel position whose output value is being computed by this filter.

Returns
the y origin of this filter.