degate  0.1.2
Public Member Functions | Private Attributes
degate::FilterKernel Class Reference

The class FilterKernel implemements a container for 2D filter kernel data. More...

#include <FilterKernel.h>

Inheritance diagram for degate::FilterKernel:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 FilterKernel (unsigned int _columns, unsigned int _rows)
virtual ~FilterKernel ()
unsigned int get_columns () const
unsigned int get_rows () const
unsigned int get_center_row () const
unsigned int get_center_column () const
double get (int column, int row) const
void set (int column, int row, double val)
void print () const

Private Attributes

unsigned int columns
unsigned int rows
std::vector< double > data

Detailed Description

The class FilterKernel implemements a container for 2D filter kernel data.

Definition at line 37 of file FilterKernel.h.


Constructor & Destructor Documentation

degate::FilterKernel::FilterKernel ( unsigned int  _columns,
unsigned int  _rows 
) [inline]

Definition at line 45 of file FilterKernel.h.

                                                            :
      columns(_columns),
      rows(_rows),
      data(_columns * _rows) {
    }
virtual degate::FilterKernel::~FilterKernel ( ) [inline, virtual]

Definition at line 51 of file FilterKernel.h.

{}

Member Function Documentation

double degate::FilterKernel::get ( int  column,
int  row 
) const [inline]

Definition at line 69 of file FilterKernel.h.

References columns, and data.

                                                 {
      return data[row * columns + column];
    }
unsigned int degate::FilterKernel::get_center_column ( ) const [inline]

Definition at line 65 of file FilterKernel.h.

References columns.

Referenced by degate::GaussianBlur::GaussianBlur(), and degate::LoG::LoG().

                                                  {
      return columns >> 1;
    }

Here is the caller graph for this function:

unsigned int degate::FilterKernel::get_center_row ( ) const [inline]

Definition at line 61 of file FilterKernel.h.

References rows.

Referenced by degate::GaussianBlur::GaussianBlur(), and degate::LoG::LoG().

                                               {
      return rows >> 1;
    }

Here is the caller graph for this function:

unsigned int degate::FilterKernel::get_columns ( ) const [inline]

Definition at line 53 of file FilterKernel.h.

References columns.

Referenced by degate::GaussianBlur::GaussianBlur(), and degate::LoG::LoG().

                                            {
      return columns;
    }

Here is the caller graph for this function:

unsigned int degate::FilterKernel::get_rows ( ) const [inline]

Definition at line 57 of file FilterKernel.h.

References rows.

Referenced by degate::GaussianBlur::GaussianBlur(), and degate::LoG::LoG().

                                         {
      return rows;
    }

Here is the caller graph for this function:

void degate::FilterKernel::print ( ) const [inline]

Definition at line 77 of file FilterKernel.h.

References columns, and rows.

                       {
      unsigned int x, y;
      for(y = 0; y < columns; y++) {
        for(x = 0; x < rows; x++) {
          boost::format f("%5.10f ");
          f % get(x, y);
          std::cout << f.str();
        }
        std::cout << std::endl;
      }
    }
void degate::FilterKernel::set ( int  column,
int  row,
double  val 
) [inline]

Definition at line 73 of file FilterKernel.h.

References columns, and data.

                                                     {
      data[row * columns + column] = val;
    }

Member Data Documentation

unsigned int degate::FilterKernel::columns [private]

Definition at line 40 of file FilterKernel.h.

Referenced by get(), get_center_column(), get_columns(), print(), and set().

std::vector<double> degate::FilterKernel::data [private]

Definition at line 41 of file FilterKernel.h.

Referenced by get(), and set().

unsigned int degate::FilterKernel::rows [private]

Definition at line 40 of file FilterKernel.h.

Referenced by get_center_row(), get_rows(), and print().


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