![]() |
MDSTk Libraries
1.1.0
Medical Data Segmentation Toolkit
|
Class for getting along samples in a circular neighborhood around a given center pixel. More...
#include <mdsCircularSampler.h>

Public Types | |
| enum | { TEMPLATE_PARAMETER_IS_NOT_IMAGE = I::CLASS_IMAGE } |
| Check that I is an image. More... | |
| typedef I::tImage | tImage |
| Image type. | |
| typedef I::tPixel | tPixel |
| Image pixel type. | |
| typedef std::vector< tPixel > | tSamples |
| Vector of samples. | |
Public Member Functions | |
| CCircularSampler (int NumOfSamples=CircularSampler::DEFAULT_NUM_OF_SAMPLES, mds::img::tCoordinate Radius=CircularSampler::DEFAULT_RADIUS) | |
| Default constructor. | |
| template<class Function > | |
| Function | forEach (tSize x, tSize y, Function Func) |
| template<class Function > | |
| Function | forEach (tSize x, tSize y, Function Func) |
| Applies a given functor to all samples in circular neighbourhood of a given center pixel. | |
| tPixel | getCenter (tSize x, tSize y) |
| Returns value of the center pixel. | |
| mds::tSize | getMinMargin () const |
| Returns margin needed for sampled pixels to be inside an image. | |
| int | getNumOfSamples () const |
| Returns samples count. | |
| mds::img::tCoordinate | getRadius () const |
| Returns radius of the neighbourhood. | |
| bool | getSamples (tSize x, tSize y, tSamples &Result) |
| Returns samples from circular neighborhood of a given center pixel. | |
| CCircularSampler & | setImage (tImage *pImage) |
| Sets the image. | |
| ~CCircularSampler () | |
| Destructor. | |
Public Attributes | |
| mds::img::tCoordinate | tCoordinate |
| Float coordinates. | |
Protected Types | |
| typedef std::vector < mds::img::CPoint3D > | tCoords |
| Relative coordinates of samples. | |
Protected Member Functions | |
| void | updateCoords () |
| Update relative coordinates of samples. | |
Protected Attributes | |
| tCoords | m_Coords |
| Relative coordinates of points to be sampled. | |
| int | m_NumOfSamples |
| Number of samples. | |
| mds::img::tCoordinate | m_Radius |
| Neighbourhood radius. | |
| tImage::tSmartPtr | m_spImage |
| Image to obtain samples from. | |
Class for getting along samples in a circular neighborhood around a given center pixel.
Samples are equally spaced pixels on a circle of a specified radius. Number of samples and the radius can be set. Samples which don't exactly fit the pixel grid are interpolated.
typedef std::vector<mds::img::CPoint3D> mds::lbp::CCircularSampler< I >::tCoords [protected] |
Relative coordinates of samples.
| typedef I::tImage mds::lbp::CCircularSampler< I >::tImage |
Image type.
| typedef I::tPixel mds::lbp::CCircularSampler< I >::tPixel |
Image pixel type.
| typedef std::vector<tPixel> mds::lbp::CCircularSampler< I >::tSamples |
Vector of samples.
| anonymous enum |
| mds::lbp::CCircularSampler< I >::CCircularSampler | ( | int | NumOfSamples = CircularSampler::DEFAULT_NUM_OF_SAMPLES, |
| mds::img::tCoordinate | Radius = CircularSampler::DEFAULT_RADIUS |
||
| ) |
Default constructor.
| mds::lbp::CCircularSampler< I >::~CCircularSampler | ( | ) |
Destructor.
| Function mds::lbp::CCircularSampler< I >::forEach | ( | tSize | x, |
| tSize | y, | ||
| Function | Func | ||
| ) |
| Function mds::lbp::CCircularSampler< I >::forEach | ( | tSize | x, |
| tSize | y, | ||
| Function | Func | ||
| ) |
Applies a given functor to all samples in circular neighbourhood of a given center pixel.
| CCircularSampler< I >::tPixel CCircularSampler::getCenter | ( | tSize | x, |
| tSize | y | ||
| ) |
Returns value of the center pixel.
| mds::tSize mds::lbp::CCircularSampler< I >::getMinMargin | ( | ) | const |
Returns margin needed for sampled pixels to be inside an image.
| int mds::lbp::CCircularSampler< I >::getNumOfSamples | ( | ) | const |
Returns samples count.
| mds::img::tCoordinate mds::lbp::CCircularSampler< I >::getRadius | ( | ) | const |
Returns radius of the neighbourhood.
| bool CCircularSampler::getSamples | ( | tSize | x, |
| tSize | y, | ||
| tSamples & | Result | ||
| ) |
Returns samples from circular neighborhood of a given center pixel.
| CCircularSampler& mds::lbp::CCircularSampler< I >::setImage | ( | tImage * | pImage | ) |
Sets the image.
| void CCircularSampler::updateCoords | ( | ) | [protected] |
Update relative coordinates of samples.
tCoords mds::lbp::CCircularSampler< I >::m_Coords [protected] |
Relative coordinates of points to be sampled.
First one has coordinates [radius,0], others following CCW.
int mds::lbp::CCircularSampler< I >::m_NumOfSamples [protected] |
Number of samples.
mds::img::tCoordinate mds::lbp::CCircularSampler< I >::m_Radius [protected] |
Neighbourhood radius.
tImage::tSmartPtr mds::lbp::CCircularSampler< I >::m_spImage [protected] |
Image to obtain samples from.
| mds::img::tCoordinate mds::lbp::CCircularSampler< I >::tCoordinate |
Float coordinates.
1.7.6.1