DGtal 1.3.0
|
Aim: Functor that subsamples an initial domain by given a grid size and a shift vector. By this way, for a given point considered in a new domain, it allows to recover the point coordinates in the source domain. Such functor can be usefull to apply basic image subsampling in any dimensions by using ImageAdapter class. More...
#include <DGtal/kernel/BasicPointFunctors.h>
Public Types | |
typedef TDomain::Space | Space |
typedef TDomain::Size | Size |
typedef TDomain::Integer | IntergerDom |
typedef Space::Dimension | Dimension |
typedef Space::Point | Point |
Public Member Functions | |
BasicDomainSubSampler (const TDomain &aSourceDomain, const std::vector< TValue > &aGridSize, const Point &aGridShift) | |
Point | operator() (const Point &aPoint) const |
const TDomain & | getSubSampledDomain () |
Private Attributes | |
TDomain | mySourceDomain |
TDomain | myNewDomain |
TDomain | myGridSampleDomain |
Point | myGridShift |
std::vector< TValue > | myGridSize |
Aim: Functor that subsamples an initial domain by given a grid size and a shift vector. By this way, for a given point considered in a new domain, it allows to recover the point coordinates in the source domain. Such functor can be usefull to apply basic image subsampling in any dimensions by using ImageAdapter class.
Description of template class 'BasicDomainSubSampler'
TDomain | the type of the domain. |
TInteger | specifies the integer number type used to define the space. |
TValue | specify the type of the value which define the grid size (generally type int (default) when subsampling with large grid size and double to re sampling with grid size less than 1). |
Definition at line 637 of file BasicPointFunctors.h.
typedef Space::Dimension DGtal::functors::BasicDomainSubSampler< TDomain, TInteger, TValue >::Dimension |
Definition at line 643 of file BasicPointFunctors.h.
typedef TDomain::Integer DGtal::functors::BasicDomainSubSampler< TDomain, TInteger, TValue >::IntergerDom |
Definition at line 642 of file BasicPointFunctors.h.
typedef Space::Point DGtal::functors::BasicDomainSubSampler< TDomain, TInteger, TValue >::Point |
Definition at line 644 of file BasicPointFunctors.h.
typedef TDomain::Size DGtal::functors::BasicDomainSubSampler< TDomain, TInteger, TValue >::Size |
Definition at line 641 of file BasicPointFunctors.h.
typedef TDomain::Space DGtal::functors::BasicDomainSubSampler< TDomain, TInteger, TValue >::Space |
Definition at line 640 of file BasicPointFunctors.h.
|
inline |
Constructor. Construct the functor from a source domain, a grid size, and a shift vector. The points of the resulting domain are defined as the upper left of the sampling grid.
aSourceDomain | the source domain. |
aGridSize | the subsampling grid size. |
aGridShift | the shift applied to the sampling grid. |
Definition at line 657 of file BasicPointFunctors.h.
References DGtal::PointVector< dim, Integer >::diagonal(), dim, DGtal::SpaceND< dim, TInteger >::dimension, DGtal::functors::BasicDomainSubSampler< TDomain, TInteger, TValue >::myGridSampleDomain, DGtal::functors::BasicDomainSubSampler< TDomain, TInteger, TValue >::myGridSize, and DGtal::functors::BasicDomainSubSampler< TDomain, TInteger, TValue >::myNewDomain.
|
inline |
This method can be usefull to directely recover the new domain associated to the resulting subsampled domain.
Definition at line 726 of file BasicPointFunctors.h.
References DGtal::functors::BasicDomainSubSampler< TDomain, TInteger, TValue >::myNewDomain.
Referenced by main().
|
inline |
The operator computes the coordinates of the point in the subsampled domain. By default it returns the first lower point of the window associated to the sampling grid. If the resulting point is outside the source domain it scans this window and returns a point belonging to the source domain. If such a point does not exits it return the point with null coordinates.
aPoint | a point which should belong to the new domain. |
Definition at line 694 of file BasicPointFunctors.h.
References aPoint(), DGtal::PointVector< dim, Integer >::diagonal(), dim, DGtal::SpaceND< dim, TInteger >::dimension, DGtal::Trace::error(), DGtal::functors::BasicDomainSubSampler< TDomain, TInteger, TValue >::myGridSampleDomain, DGtal::functors::BasicDomainSubSampler< TDomain, TInteger, TValue >::myGridShift, DGtal::functors::BasicDomainSubSampler< TDomain, TInteger, TValue >::myGridSize, DGtal::functors::BasicDomainSubSampler< TDomain, TInteger, TValue >::myNewDomain, DGtal::functors::BasicDomainSubSampler< TDomain, TInteger, TValue >::mySourceDomain, and DGtal::trace.
|
private |
Definition at line 734 of file BasicPointFunctors.h.
Referenced by DGtal::functors::BasicDomainSubSampler< TDomain, TInteger, TValue >::BasicDomainSubSampler(), and DGtal::functors::BasicDomainSubSampler< TDomain, TInteger, TValue >::operator()().
|
private |
Definition at line 735 of file BasicPointFunctors.h.
Referenced by DGtal::functors::BasicDomainSubSampler< TDomain, TInteger, TValue >::operator()().
|
private |
Definition at line 736 of file BasicPointFunctors.h.
Referenced by DGtal::functors::BasicDomainSubSampler< TDomain, TInteger, TValue >::BasicDomainSubSampler(), and DGtal::functors::BasicDomainSubSampler< TDomain, TInteger, TValue >::operator()().
|
private |
Definition at line 732 of file BasicPointFunctors.h.
Referenced by DGtal::functors::BasicDomainSubSampler< TDomain, TInteger, TValue >::BasicDomainSubSampler(), DGtal::functors::BasicDomainSubSampler< TDomain, TInteger, TValue >::getSubSampledDomain(), and DGtal::functors::BasicDomainSubSampler< TDomain, TInteger, TValue >::operator()().
|
private |
Definition at line 731 of file BasicPointFunctors.h.
Referenced by DGtal::functors::BasicDomainSubSampler< TDomain, TInteger, TValue >::operator()().