MDSTk Libraries  1.1.0
Medical Data Segmentation Toolkit
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes
mds::img::CKernel3D Class Reference

Class encapsulating a 3D convolution kernel. More...

#include <mdsKernel.h>

Inheritance diagram for mds::img::CKernel3D:
Inheritance graph
[legend]

List of all members.

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

tDataat (tSize x, tSize y, tSize z)
 Returns reference to the kernel coefficient [x][y][z].
const tDataat (tSize x, tSize y, tSize z) const
 CKernel3D (tSize Size)
 Constructor that creates a new 3D convolution kernel.
 CKernel3D (tConstDataPtr pData, tSize Size)
 Constructor.
 CKernel3D (const CKernel3D &k)
 Copy constructor.
void create (tSize Size)
 Creates a new 2D convolution kernel.
tDataPtr getPtr (tSize x, tSize y, tSize z)
 Returns pointer to a given kernel data [x][y][z].
tConstDataPtr getPtr (tSize x, tSize y, tSize z) const
tDataPtr getPtr ()
 Returns pointer to the kernel data.
tConstDataPtr getPtr () const
tSize getSize () const
 Returns the kernel size.
tDataoperator() (tSize x, tSize y, tSize z)
 Returns the subscripted kernel coefficient [x][y][z].
const tDataoperator() (tSize x, tSize y, tSize z) const
CKernel3Doperator= (const CKernel3D &k)
 Assignment operator.
void set (tSize x, tSize y, tSize z, const tData &Value)
 Sets the kernel data.
virtual ~CKernel3D ()
 Virtual destructor.

Protected Member Functions

 CKernel3D ()
 Default constructor.
void init (tSize Size)
 Allocates data of a given size.

Protected Attributes

tSize m_YOffset
 Kernel size.
tSize m_ZOffset

Private Types

typedef CDataAllocator
< tConvKernelData
base
typedef base::tConstData tConstData
 Const data type.

Private Member Functions

tDataat (tSize i)
 Returns reference to the element [i].
const tDataat (tSize i) const
CDatacreate (tConstDataPtr pData, tSize Size)
 Allocates memory and copies the specified data.
CDatacreate (const CData &Data)
 Allocates memory and copies the specified data.
CDatafill (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.
tDataoperator() (tSize i)
 Returns reference to the subscripted element [i].
const tDataoperator() (tSize i) const
CDataset (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.

Detailed Description

Class encapsulating a 3D convolution kernel.


Member Typedef Documentation

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 >.


Constructor & Destructor Documentation

Constructor that creates a new 3D convolution kernel.

Constructor.

Copy constructor.

virtual mds::img::CKernel3D::~CKernel3D ( ) [virtual]

Virtual destructor.

Default constructor.

  • It does no allocation of the kernel data.
  • Be sure that the method init(...) is used somewhere.
  • Avoid of using it!

Member Function Documentation

Returns reference to the kernel coefficient [x][y][z].

  • Kernel data are viewed as three dimensional.
const tData& mds::img::CKernel3D::at ( tSize  x,
tSize  y,
tSize  z 
) const

Creates a new 2D convolution kernel.

Reimplemented from mds::base::CData< tConvKernelData >.

Returns pointer to a given kernel data [x][y][z].

  • 3D version.

Returns pointer to the kernel data.

Reimplemented from mds::base::CData< tConvKernelData >.

Returns the kernel size.

Reimplemented from mds::base::CData< tConvKernelData >.

void mds::img::CKernel3D::init ( tSize  Size) [protected]

Allocates data of a given size.

  • This method is primarily designed for kernel data allocation when the default constructor was used.
  • Provides no checking of the existing data and its (de,re)allocation.
  • Avoid of using it!
tData& mds::img::CKernel3D::operator() ( tSize  x,
tSize  y,
tSize  z 
)

Returns the subscripted kernel coefficient [x][y][z].

  • Kernel data are viewed as three dimensional.
const tData& mds::img::CKernel3D::operator() ( tSize  x,
tSize  y,
tSize  z 
) const
CKernel3D & mds::img::CKernel3D::operator= ( const CKernel3D k)

Assignment operator.

void mds::img::CKernel3D::set ( tSize  x,
tSize  y,
tSize  z,
const tData Value 
)

Sets the kernel data.

  • 3D version.

Member Data Documentation

Kernel size.


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