kn::ConvolutionKernel Class Reference

Kernel used for convolution filter. More...

#include <ConvolutionKernel.hpp>

Collaboration diagram for kn::ConvolutionKernel:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ConvolutionKernel ()
 Constructor by default Compute a defaut kernel size 3*3 with origin in (1,1) (at the center of kernel) Values are all equals to 1 (average).
 ConvolutionKernel (unsigned int width, unsigned int height, unsigned int xOrigin, unsigned int yOrigin, double *values=NULL)
 Constructor to build a rectangular kernel.
 ConvolutionKernel (const ConvolutionKernel &e)
 Copy Constructor.
 ~ConvolutionKernel ()
 dealoccates image convolution data
unsigned int width () const
 getting the width of the kernel
unsigned int height () const
 getting the height of the kernel
unsigned int xOrigin () const
 getting the x-coordinate of the origin of the kernel
unsigned int yOrigin () const
 getting the y-coordinate of the origin of the kernel
const double * values () const
 getting the buffer of the values of the kernel
int xLowerBound () const
 getting the lower bound of the kernel x-coordinates x must be in the range [xLowerBound, xUpperBound[
int yLowerBound () const
 getting the lower bound of the kernel y-coordinates y must be in the range [yLowerBound, yUpperBound[
int xUpperBound () const
 getting the upper bound of the kernel x-coordinates x must be in the range [xLowerBound, xUpperBound[
int yUpperBound () const
 getting the upper bound of the kernel y-coordinates y must be in the range [yLowerBound, yUpperBound[
double operator() (int x, int y) const
 getting the value of the point (x,y) of the kernel.
ConvolutionKerneloperator= (const ConvolutionKernel &k)
 Allocate the kernel k to this kernel.

Protected Attributes

unsigned int _width
 width of the kernel
unsigned int _height
 height of the kernel
int _xOrigin
 x-coordinate of the origin of the kernel
int _yOrigin
 y-coordinate of the origin of the kernel
double * _values
 buffer containing the values of the kernel


Detailed Description

Kernel used for convolution filter.

Definition at line 55 of file ConvolutionKernel.hpp.


Constructor & Destructor Documentation

kn::ConvolutionKernel::ConvolutionKernel (  ) 

Constructor by default Compute a defaut kernel size 3*3 with origin in (1,1) (at the center of kernel) Values are all equals to 1 (average).

Definition at line 40 of file ConvolutionKernel.cpp.

kn::ConvolutionKernel::ConvolutionKernel ( unsigned int  width,
unsigned int  height,
unsigned int  xOrigin,
unsigned int  yOrigin,
double *  values = NULL 
)

Constructor to build a rectangular kernel.

Parameters:
width width of the kernel
height height of the kernel
xOrigin x-coordinate of the kernel origin
yOrigin y-coordinate of the kernel origin
values optional values buffer WHICH IS NOT COPYIED. If not used, the kernel is filled with 1.0

Definition at line 49 of file ConvolutionKernel.cpp.

kn::ConvolutionKernel::ConvolutionKernel ( const ConvolutionKernel e  ) 

Copy Constructor.

Parameters:
e Convolution Kernel to clone

Definition at line 68 of file ConvolutionKernel.cpp.

kn::ConvolutionKernel::~ConvolutionKernel (  ) 

dealoccates image convolution data

Definition at line 79 of file ConvolutionKernel.cpp.


Member Function Documentation

unsigned int kn::ConvolutionKernel::height (  )  const [inline]

getting the height of the kernel

Returns:
the height of the kernel

Definition at line 100 of file ConvolutionKernel.hpp.

double kn::ConvolutionKernel::operator() ( int  x,
int  y 
) const

getting the value of the point (x,y) of the kernel.

getting the value of the point (x,y) of the kernel, in the kernel referencial.

Parameters:
x the x-coordinate, in kernel referencial
y the y-coordinate, in kernel referencial
Returns:
the value of the point (x,y) of the kernel
Exceptions:
ImageException coordinates out of bounds

Definition at line 83 of file ConvolutionKernel.cpp.

ConvolutionKernel & kn::ConvolutionKernel::operator= ( const ConvolutionKernel k  ) 

Allocate the kernel k to this kernel.

Parameters:
k the kernel used to defined this kernel
Returns:
the kernel

Definition at line 91 of file ConvolutionKernel.cpp.

const double* kn::ConvolutionKernel::values (  )  const [inline]

getting the buffer of the values of the kernel

Returns:
the buffer of the values of the kernel

Definition at line 115 of file ConvolutionKernel.hpp.

unsigned int kn::ConvolutionKernel::width (  )  const [inline]

getting the width of the kernel

Returns:
the width of the kernel

Definition at line 95 of file ConvolutionKernel.hpp.

int kn::ConvolutionKernel::xLowerBound (  )  const [inline]

getting the lower bound of the kernel x-coordinates x must be in the range [xLowerBound, xUpperBound[

Returns:
the lower bound of the kernel x-coordinates

Definition at line 121 of file ConvolutionKernel.hpp.

unsigned int kn::ConvolutionKernel::xOrigin (  )  const [inline]

getting the x-coordinate of the origin of the kernel

Returns:
the x-coordinate of the origin of the kernel

Definition at line 105 of file ConvolutionKernel.hpp.

int kn::ConvolutionKernel::xUpperBound (  )  const [inline]

getting the upper bound of the kernel x-coordinates x must be in the range [xLowerBound, xUpperBound[

Returns:
the upper bound of the kernel x-coordinates

Definition at line 133 of file ConvolutionKernel.hpp.

int kn::ConvolutionKernel::yLowerBound (  )  const [inline]

getting the lower bound of the kernel y-coordinates y must be in the range [yLowerBound, yUpperBound[

Returns:
the lower bound of the kernel y-coordinates

Definition at line 127 of file ConvolutionKernel.hpp.

unsigned int kn::ConvolutionKernel::yOrigin (  )  const [inline]

getting the y-coordinate of the origin of the kernel

Returns:
the y-coordinate of the origin of the kernel

Definition at line 110 of file ConvolutionKernel.hpp.

int kn::ConvolutionKernel::yUpperBound (  )  const [inline]

getting the upper bound of the kernel y-coordinates y must be in the range [yLowerBound, yUpperBound[

Returns:
the upper bound of the kernel y-coordinates

Definition at line 139 of file ConvolutionKernel.hpp.


Member Data Documentation

unsigned int kn::ConvolutionKernel::_height [protected]

height of the kernel

Definition at line 86 of file ConvolutionKernel.hpp.

double* kn::ConvolutionKernel::_values [protected]

buffer containing the values of the kernel

Definition at line 89 of file ConvolutionKernel.hpp.

unsigned int kn::ConvolutionKernel::_width [protected]

width of the kernel

Definition at line 85 of file ConvolutionKernel.hpp.

x-coordinate of the origin of the kernel

Definition at line 87 of file ConvolutionKernel.hpp.

y-coordinate of the origin of the kernel

Definition at line 88 of file ConvolutionKernel.hpp.


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

Generated on Thu Nov 12 16:06:36 2009 for OpenKraken-image by  doxygen 1.5.8