MDSTk Libraries
1.1.0
Medical Data Segmentation Toolkit
|
Class encapsulating a 2D convolution kernel. More...
#include <mdsKernel.h>
Public Types | |
typedef mds::base::CData < tConvKernelData > | data |
Data base. | |
typedef data::tConstDataPtr | tConstDataPtr |
Pointer to the constant data. | |
typedef data::tData | tData |
Data type. | |
typedef data::tDataPtr | tDataPtr |
Pointer to the data. | |
Public Member Functions | |
tData & | at (tSize x, tSize y) |
Returns reference to the kernel coefficient [x][y]. | |
const tData & | at (tSize x, tSize y) const |
CKernel2D (tSize Size) | |
Constructor that creates a new 2D convolution kernel. | |
CKernel2D (tConstDataPtr pData, tSize Size) | |
Constructor. | |
CKernel2D (const CKernel2D &k) | |
Copy constructor. | |
void | create (tSize Size) |
Creates a new 2D convolution kernel. | |
tDataPtr | getPtr (tSize x, tSize y) |
Returns pointer to a specified kernel coefficient [x][y]. | |
tConstDataPtr | getPtr (tSize x, tSize y) const |
tDataPtr | getPtr () |
Returns pointer to the kernel data. | |
tConstDataPtr | getPtr () const |
tSize | getSize () const |
Returns the kernel size. | |
tData & | operator() (tSize x, tSize y) |
Returns reference to the kernel coefficient [x][y]. | |
const tData & | operator() (tSize x, tSize y) const |
CKernel2D & | operator= (const CKernel2D &k) |
Assignment operator. | |
void | set (tSize x, tSize y, const tData &Value) |
Sets the kernel data. | |
virtual | ~CKernel2D () |
Virtual destructor. | |
Protected Member Functions | |
CKernel2D () | |
Default constructor. | |
void | init (tSize Size) |
Allocates data of a given size. | |
Protected Attributes | |
tSize | m_YOffset |
Kernel size in y-dimension. | |
Private Types | |
typedef CDataAllocator < tConvKernelData > | base |
typedef base::tConstData | tConstData |
Const data type. | |
Private Member Functions | |
tData & | at (tSize i) |
Returns reference to the element [i]. | |
const tData & | at (tSize i) const |
CData & | create (tConstDataPtr pData, tSize Size) |
Allocates memory and copies the specified data. | |
CData & | create (const CData &Data) |
Allocates memory and copies the specified data. | |
CData & | fill (const tData &Value) |
Fills the entire data. | |
Function | forEach (Function Func) |
Calls function object for every element. | |
Function | forEach (Function Func) const |
Calls function object for every element. | |
Function | forRange (tSize i, tSize j, Function Func) |
Calls function object for all elements in the range <i, j>. | |
Function | forRange (tSize i, tSize j, Function Func) const |
Calls function object for all elements in the range <i, j>. | |
tDataPtr | getPtr (tSize i) |
Returns pointer to the element [i]. | |
tConstDataPtr | getPtr (tSize i) const |
bool | isWithinBlock (tSize i, tSize j) const |
Returns true if the specified range of elements lie within a continuous block of memory. | |
tData & | operator() (tSize i) |
Returns reference to the subscripted element [i]. | |
const tData & | operator() (tSize i) const |
CData & | set (tSize i, const tConvKernelData &Value) |
Sets the element of matrix at the position [i]. | |
Private Attributes | |
tDataPtr | m_pData |
Pointer to the allocated data. | |
tSize | m_Size |
Size of the allocated data. |
Class encapsulating a 2D convolution kernel.
Data base.
Pointer to the constant data.
Reimplemented from mds::base::CData< tConvKernelData >.
Data type.
Reimplemented from mds::base::CData< tConvKernelData >.
Pointer to the data.
Reimplemented from mds::base::CData< tConvKernelData >.
mds::img::CKernel2D::CKernel2D | ( | tSize | Size | ) |
Constructor that creates a new 2D convolution kernel.
mds::img::CKernel2D::CKernel2D | ( | CKernel2D::tConstDataPtr | pData, |
tSize | Size | ||
) |
Constructor.
mds::img::CKernel2D::CKernel2D | ( | const CKernel2D & | k | ) |
Copy constructor.
virtual mds::img::CKernel2D::~CKernel2D | ( | ) | [virtual] |
Virtual destructor.
mds::img::CKernel2D::CKernel2D | ( | ) | [protected] |
Default constructor.
tData& mds::img::CKernel2D::at | ( | tSize | x, |
tSize | y | ||
) |
Returns reference to the kernel coefficient [x][y].
const tData& mds::img::CKernel2D::at | ( | tSize | x, |
tSize | y | ||
) | const |
void mds::img::CKernel2D::create | ( | tSize | Size | ) |
Creates a new 2D convolution kernel.
Reimplemented from mds::base::CData< tConvKernelData >.
tDataPtr mds::img::CKernel2D::getPtr | ( | tSize | x, |
tSize | y | ||
) |
Returns pointer to a specified kernel coefficient [x][y].
tConstDataPtr mds::img::CKernel2D::getPtr | ( | tSize | x, |
tSize | y | ||
) | const |
Returns pointer to the kernel data.
Reimplemented from mds::base::CData< tConvKernelData >.
tConstDataPtr mds::img::CKernel2D::getPtr | ( | ) | const |
Reimplemented from mds::base::CData< tConvKernelData >.
tSize mds::img::CKernel2D::getSize | ( | ) | const |
Returns the kernel size.
Reimplemented from mds::base::CData< tConvKernelData >.
Reimplemented in mds::img::CGaussFilter< I >, mds::img::CGaussFilter< tImage >, and mds::img::CGaussFilter< CFImage >.
void mds::img::CKernel2D::init | ( | tSize | Size | ) | [protected] |
Allocates data of a given size.
Returns reference to the kernel coefficient [x][y].
void mds::img::CKernel2D::set | ( | tSize | x, |
tSize | y, | ||
const tData & | Value | ||
) |
Sets the kernel data.
tSize mds::img::CKernel2D::m_YOffset [protected] |
Kernel size in y-dimension.