DGtal 1.4.0
|
Aim: This class precomputes the Voronoi Covariance Measure of a set of points. It can compute the covariance measure of an arbitrary function with given support. More...
#include <DGtal/geometry/volumes/estimation/VoronoiCovarianceMeasure.h>
Data Structures | |
struct | CharacteristicSetPredicate |
Public Types | |
typedef TSpace | Space |
the type of digital space | |
typedef TSeparableMetric | Metric |
the type of metric | |
typedef Space::Point | Point |
the type of digital point | |
typedef Space::Size | Size |
the type for counting elements | |
typedef Space::Integer | Integer |
the type of each digital point coordinate, some integral type | |
typedef DGtal::HyperRectDomain< Space > | Domain |
the type of rectangular domain of the VCM. | |
typedef DGtal::ImageContainerBySTLVector< Domain, bool > | CharacteristicSet |
the type of a binary image that is the characteristic function of K. | |
typedef DGtal::SpatialCubicalSubdivision< Space > | ProximityStructure |
the structure used for proximity queries. | |
typedef DGtal::functors::NotPointPredicate< CharacteristicSetPredicate > | NotPredicate |
the type of the point predicate used by the voronoi map. | |
typedef DGtal::VoronoiMap< Space, NotPredicate, Metric > | Voronoi |
the type of the Voronoi map. | |
typedef double | Scalar |
the type for "real" numbers. | |
typedef DGtal::SimpleMatrix< Scalar, Space::dimension, Space::dimension > | MatrixNN |
the type for nxn matrix of real numbers. | |
typedef MatrixNN::RowVector | VectorN |
the type for N-vector of real numbers | |
typedef std::vector< Point > | PointContainer |
the list of points | |
typedef std::map< Point, MatrixNN > | Point2MatrixNN |
Associates a matrix to points. | |
Public Member Functions | |
VoronoiCovarianceMeasure (double _R, double _r, Metric aMetric=Metric(), bool verbose=false) | |
~VoronoiCovarianceMeasure () | |
Scalar | R () const |
Scalar | r () const |
void | clean () |
template<typename PointInputIterator > | |
void | init (PointInputIterator itb, PointInputIterator ite) |
const Domain & | domain () const |
const Voronoi & | voronoiMap () const |
const Point2MatrixNN & | vcmMap () const |
template<typename Point2ScalarFunction > | |
MatrixNN | measure (Point2ScalarFunction chi_r, Point p) const |
void | selfDisplay (std::ostream &out) const |
bool | isValid () const |
Protected Member Functions | |
VoronoiCovarianceMeasure () | |
Private Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CSpace< TSpace >)) | |
BOOST_CONCEPT_ASSERT ((concepts::CSeparableMetric< TSeparableMetric >)) | |
VoronoiCovarianceMeasure (const VoronoiCovarianceMeasure &other) | |
VoronoiCovarianceMeasure & | operator= (const VoronoiCovarianceMeasure &other) |
Private Attributes | |
double | myBigR |
The parameter R in the VCM, i.e. the offset radius for the compact set K. | |
double | mySmallR |
Metric | myMetric |
The metric chosen for the Voronoi map. | |
bool | myVerbose |
Tells if it is verbose mode. | |
Domain | myDomain |
The domain in which all computations are done. | |
CharacteristicSet * | myCharSet |
A binary image that defines the characteristic set of K. | |
Voronoi * | myVoronoi |
Stores the voronoi map. | |
Point2MatrixNN | myVCM |
The map point -> VCM. | |
ProximityStructure * | myProximityStructure |
The structure used for proximity queries. | |
Aim: This class precomputes the Voronoi Covariance Measure of a set of points. It can compute the covariance measure of an arbitrary function with given support.
Description of template class 'VoronoiCovarianceMeasure'
You may obtain the whole sequence (Point,VCM) by accessing the map vcmMap.
TSpace | type of Digital Space (model of CSpace). |
TSeparableMetric | a model of CSeparableMetric used for computing the Voronoi map (e.g. Euclidean metric is DGtal::ExactPredicateLpSeparableMetric<TSpace, 2> ) |
Definition at line 79 of file VoronoiCovarianceMeasure.h.
typedef DGtal::ImageContainerBySTLVector<Domain,bool> DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::CharacteristicSet |
the type of a binary image that is the characteristic function of K.
Definition at line 91 of file VoronoiCovarianceMeasure.h.
typedef DGtal::HyperRectDomain<Space> DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::Domain |
the type of rectangular domain of the VCM.
Definition at line 90 of file VoronoiCovarianceMeasure.h.
typedef Space::Integer DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::Integer |
the type of each digital point coordinate, some integral type
Definition at line 89 of file VoronoiCovarianceMeasure.h.
typedef DGtal::SimpleMatrix< Scalar, Space::dimension, Space::dimension > DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::MatrixNN |
the type for nxn matrix of real numbers.
Definition at line 120 of file VoronoiCovarianceMeasure.h.
typedef TSeparableMetric DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::Metric |
the type of metric
Definition at line 86 of file VoronoiCovarianceMeasure.h.
typedef DGtal::functors::NotPointPredicate<CharacteristicSetPredicate> DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::NotPredicate |
the type of the point predicate used by the voronoi map.
Definition at line 114 of file VoronoiCovarianceMeasure.h.
typedef Space::Point DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::Point |
the type of digital point
Definition at line 87 of file VoronoiCovarianceMeasure.h.
typedef std::map<Point,MatrixNN> DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::Point2MatrixNN |
Associates a matrix to points.
Definition at line 123 of file VoronoiCovarianceMeasure.h.
typedef std::vector<Point> DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::PointContainer |
the list of points
Definition at line 122 of file VoronoiCovarianceMeasure.h.
typedef DGtal::SpatialCubicalSubdivision<Space> DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::ProximityStructure |
the structure used for proximity queries.
Definition at line 92 of file VoronoiCovarianceMeasure.h.
typedef double DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::Scalar |
the type for "real" numbers.
Definition at line 117 of file VoronoiCovarianceMeasure.h.
typedef Space::Size DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::Size |
the type for counting elements
Definition at line 88 of file VoronoiCovarianceMeasure.h.
typedef TSpace DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::Space |
the type of digital space
Definition at line 85 of file VoronoiCovarianceMeasure.h.
typedef MatrixNN::RowVector DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::VectorN |
the type for N-vector of real numbers
Definition at line 121 of file VoronoiCovarianceMeasure.h.
typedef DGtal::VoronoiMap<Space, NotPredicate, Metric > DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::Voronoi |
the type of the Voronoi map.
Definition at line 115 of file VoronoiCovarianceMeasure.h.
DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::VoronoiCovarianceMeasure | ( | double | _R, |
double | _r, | ||
Metric | aMetric = Metric(), | ||
bool | verbose = false ) |
Constructor.
_R | the offset radius for the set of points. Voronoi cells are intersected with this offset. The unit corresponds to a step in the digital space. |
_r | (an upper bound of) the radius of the support of forthcoming kernel functions ( \( \chi_r \)). The unit corresponds to a step in the digital space. This parameter is used for preparing the data structure that answers to proximity queries. |
aMetric | an instance of the metric. |
verbose | if 'true' displays information on ongoing computation. |
DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::~VoronoiCovarianceMeasure | ( | ) |
Destructor.
|
protected |
Constructor. Forbidden by default (protected to avoid g++ warnings).
|
private |
Copy constructor.
other | the object to clone. Forbidden by default. |
|
private |
|
private |
void DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::clean | ( | ) |
Cleans intermediate data structure likes the characteristic set and the voronoi map.
const Domain & DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::domain | ( | ) | const |
void DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::init | ( | PointInputIterator | itb, |
PointInputIterator | ite ) |
Computes the Voronoi Covariance Measure for the set of points given by range [itb,ite)
PointInputIterator | an input iterator on digital points. |
itb | the start of the range |
ite | the end of the range. |
bool DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
MatrixNN DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::measure | ( | Point2ScalarFunction | chi_r, |
Point | p ) const |
Computes the Voronoi Covariance Measure of the function chi_r.
Point2ScalarFunction | the type of a functor Point->Scalar. For instance functors::HatPointFunction and functors::BallConstantPointFunction are models of this type. |
chi_r | the kernel function whose support is included in the cube centered on the origin with edge size 2r (see VoronoiCovarianceMeasure). |
p | the point where the kernel function is moved. It must lie within domain. |
|
private |
Assignment.
other | the object to copy. |
Scalar DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::R | ( | ) | const |
Scalar DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::r | ( | ) | const |
void DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
const Point2MatrixNN & DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::vcmMap | ( | ) | const |
const Voronoi & DGtal::VoronoiCovarianceMeasure< TSpace, TSeparableMetric >::voronoiMap | ( | ) | const |
|
private |
The parameter R in the VCM, i.e. the offset radius for the compact set K.
Definition at line 224 of file VoronoiCovarianceMeasure.h.
|
private |
A binary image that defines the characteristic set of K.
Definition at line 235 of file VoronoiCovarianceMeasure.h.
|
private |
The domain in which all computations are done.
Definition at line 233 of file VoronoiCovarianceMeasure.h.
|
private |
The metric chosen for the Voronoi map.
Definition at line 229 of file VoronoiCovarianceMeasure.h.
|
private |
The structure used for proximity queries.
Definition at line 241 of file VoronoiCovarianceMeasure.h.
|
private |
The parameter r in VCM(chi_r), i.e. an upper bound for the diameter of the support of kernel functions.
Definition at line 227 of file VoronoiCovarianceMeasure.h.
|
private |
The map point -> VCM.
Definition at line 239 of file VoronoiCovarianceMeasure.h.
|
private |
Tells if it is verbose mode.
Definition at line 231 of file VoronoiCovarianceMeasure.h.
|
private |
Stores the voronoi map.
Definition at line 237 of file VoronoiCovarianceMeasure.h.