DGtal  1.5.beta
DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar > Class Template Reference

Aim: A class that recognizes pieces of digital planes of given diagonal width. When the width is \(1 \times \sqrt{3}\), it corresponds to standard planes. Contrary to ChordStandardPlaneComputer, the axis is not specified at initialization of the object. This class uses four instances of ChordStandardPlaneComputer of axis z, by transforming points \((x,y,z)\) to \((x \pm z, y \pm z, z)\). More...

#include <DGtal/geometry/surfaces/ChordGenericStandardPlaneComputer.h>

Data Structures

struct  Transform
 

Public Types

typedef TSpace Space
 
typedef TInputPoint InputPoint
 
typedef TInternalScalar InternalScalar
 
typedef InputPoint InputVector
 
typedef ChordNaivePlaneComputer< Space, InputPoint, InternalScalarChordComputer
 
typedef ChordComputer::Component Component
 
typedef ChordComputer::Coordinate Coordinate
 
typedef ChordComputer::InternalVector InternalVector
 
typedef ChordComputer::Point Point
 
typedef ChordComputer::Primitive Primitive
 
typedef ChordComputer::InputPointSet InputPointSet
 
typedef ChordComputer::Size Size
 
typedef ChordComputer::ConstIterator InputPointSetConstIterator
 
typedef ChordComputer::Iterator InputPointSetIterator
 
typedef boost::transform_iterator< Transform, InputPointSetConstIterator, InputPoint, InputPointConstIterator
 
typedef ConstIterator const_iterator
 
typedef const InputPointconst_pointer
 
typedef const InputPointconst_reference
 
typedef InputPoint value_type
 
typedef InputPointSet::difference_type difference_type
 
typedef InputPointSet::size_type size_type
 

Public Member Functions

 ~ChordGenericStandardPlaneComputer ()
 
 ChordGenericStandardPlaneComputer ()
 
 ChordGenericStandardPlaneComputer (const ChordGenericStandardPlaneComputer &other)
 
ChordGenericStandardPlaneComputeroperator= (const ChordGenericStandardPlaneComputer &other)
 
Dimension active () const
 
void clear ()
 
void init (InternalScalar widthNumerator=NumberTraits< InternalScalar >::ONE, InternalScalar widthDenominator=NumberTraits< InternalScalar >::ONE)
 
Size size () const
 
bool empty () const
 
ConstIterator begin () const
 
ConstIterator end () const
 
Size max_size () const
 
Size maxSize () const
 
bool operator() (const Point &p) const
 
bool extendAsIs (const InputPoint &p)
 
bool extend (const InputPoint &p)
 
bool isExtendable (const InputPoint &p) const
 
template<typename TInputIterator >
bool extend (TInputIterator it, TInputIterator itE)
 
template<typename TInputIterator >
bool isExtendable (TInputIterator it, TInputIterator itE) const
 
Primitive primitive () const
 
template<typename Vector3D >
void getNormal (Vector3D &normal) const
 
template<typename Vector3D >
void getUnitNormal (Vector3D &normal) const
 
void getBounds (double &min, double &max) const
 
InputPoint minimalPoint () const
 
InputPoint maximalPoint () const
 
void getCharacteristics (InternalVector &n, InternalScalar &imin, InternalScalar &imax, InputPoint &p_min, InputPoint &p_max) const
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 

Static Protected Member Functions

static Transform t (Dimension orthant)
 
static Transform invT (Dimension orthant)
 

Private Types

typedef std::vector< Dimension >::iterator OrthantIterator
 
typedef std::vector< Dimension >::const_iterator OrthantConstIterator
 

Private Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CSpace< TSpace >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CSignedNumber< TInternalScalar >))
 
 BOOST_STATIC_ASSERT ((TSpace::dimension==3))
 
 BOOST_STATIC_ASSERT ((TInputPoint::dimension==3))
 

Private Attributes

std::vector< DimensionmyOrthants
 
ChordComputer myComputers [4]
 
std::vector< Dimension_orthantsToErase
 

Static Private Attributes

static Transform myTransforms [4]
 

Detailed Description

template<typename TSpace, typename TInputPoint, typename TInternalScalar>
class DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >

Aim: A class that recognizes pieces of digital planes of given diagonal width. When the width is \(1 \times \sqrt{3}\), it corresponds to standard planes. Contrary to ChordStandardPlaneComputer, the axis is not specified at initialization of the object. This class uses four instances of ChordStandardPlaneComputer of axis z, by transforming points \((x,y,z)\) to \((x \pm z, y \pm z, z)\).

Description of template class 'ChordGenericStandardPlaneComputer'

As a (3D) geometric primitive computer, it obeys the concept CAdditivePrimitiveComputer. It is copy constructible, assignable. It has methods extend(), extend( InputIterator, InputIterator) and isExtendable(), isExtendable(InputIterator, InputIterator). The object stores all the distinct points p such that 'extend(p )' was successful. It is thus a model of boost::ForwardContainer (non mutable). It is iterable (inner type ConstIterator, begin(), end()). You may clear() it.

It is also a model of concepts::CPointPredicate (returns 'true' iff a point is within the current bounds).

Note on complexity: See ChordNaivePlaneComputer and Comparative evaluation of COBA and Chord algorithm. Although it uses four instances of ChordStandardNaiveComputer, the recognition is not four times slower. Indeed, recognition stops quickly on bad diagonal axes.

Template Parameters
TSpacespecifies the digital space (provides dimension and types for the primitive)
TInputPointspecifies the type of the input points (digital or not). Usually, you may choose TInputPoint = TSpace::Point, but this is not compulsory. You may for instance wish to manipulate floating-point value points. This is possible, but you have to choose the type TInternalScalar accordingly.
TInternalScalarspecifies the type of scalar used in internal computations, generally a more precise type than TInputPoint::Component. For instance, for digital points, the type should be able to hold integers of order \((2*D)^2\) if D is the diameter of the set of digital points.
typedef SpaceND<3,int> Z3;
typedef ChordGenericStandardPlaneComputer< Z3, Z3::Point, int64_t > StandardPlaneComputer;
StandardPlaneComputer plane;
plane.init( 1, 1 ); // width is 1/1 => standard
plane.extend( Point( 10, 0, 0 ) ); // return 'true'
plane.extend( Point( 0, 8, 0 ) ); // return 'true'
plane.extend( Point( 0, 0, 6 ) ); // return 'true'
plane.extend( Point( 5, 5, 5 ) ); // return 'false'
// There is no standard plane going through the 3 first points and the last one.
Space Z3
Definition: StdDefs.h:145

Model of boost::DefaultConstructible, boost::CopyConstructible, boost::Assignable, boost::ForwardContainer, concepts::CAdditivePrimitiveComputer, concepts::CPointPredicate.

Definition at line 122 of file ChordGenericStandardPlaneComputer.h.

Member Typedef Documentation

◆ ChordComputer

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
typedef ChordNaivePlaneComputer< Space, InputPoint, InternalScalar > DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::ChordComputer

Definition at line 135 of file ChordGenericStandardPlaneComputer.h.

◆ Component

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
typedef ChordComputer::Component DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::Component

Definition at line 136 of file ChordGenericStandardPlaneComputer.h.

◆ const_iterator

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
typedef ConstIterator DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::const_iterator

Definition at line 208 of file ChordGenericStandardPlaneComputer.h.

◆ const_pointer

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
typedef const InputPoint* DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::const_pointer

Definition at line 209 of file ChordGenericStandardPlaneComputer.h.

◆ const_reference

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
typedef const InputPoint& DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::const_reference

Definition at line 210 of file ChordGenericStandardPlaneComputer.h.

◆ ConstIterator

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
typedef boost::transform_iterator<Transform,InputPointSetConstIterator, InputPoint,InputPoint> DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::ConstIterator

We wrap a transform over the iterator on point that uses one of the functor Transform to cast back the point from the naive space to the standard space.

Definition at line 204 of file ChordGenericStandardPlaneComputer.h.

◆ Coordinate

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
typedef ChordComputer::Coordinate DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::Coordinate

Definition at line 137 of file ChordGenericStandardPlaneComputer.h.

◆ difference_type

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
typedef InputPointSet::difference_type DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::difference_type

Definition at line 212 of file ChordGenericStandardPlaneComputer.h.

◆ InputPoint

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
typedef TInputPoint DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::InputPoint

Definition at line 132 of file ChordGenericStandardPlaneComputer.h.

◆ InputPointSet

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
typedef ChordComputer::InputPointSet DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::InputPointSet

Definition at line 141 of file ChordGenericStandardPlaneComputer.h.

◆ InputPointSetConstIterator

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
typedef ChordComputer::ConstIterator DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::InputPointSetConstIterator

Definition at line 143 of file ChordGenericStandardPlaneComputer.h.

◆ InputPointSetIterator

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
typedef ChordComputer::Iterator DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::InputPointSetIterator

Definition at line 144 of file ChordGenericStandardPlaneComputer.h.

◆ InputVector

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
typedef InputPoint DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::InputVector

Definition at line 134 of file ChordGenericStandardPlaneComputer.h.

◆ InternalScalar

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
typedef TInternalScalar DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::InternalScalar

Definition at line 133 of file ChordGenericStandardPlaneComputer.h.

◆ InternalVector

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
typedef ChordComputer::InternalVector DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::InternalVector

Definition at line 138 of file ChordGenericStandardPlaneComputer.h.

◆ OrthantConstIterator

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
typedef std::vector<Dimension>::const_iterator DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::OrthantConstIterator
private

Definition at line 149 of file ChordGenericStandardPlaneComputer.h.

◆ OrthantIterator

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
typedef std::vector<Dimension>::iterator DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::OrthantIterator
private

Definition at line 148 of file ChordGenericStandardPlaneComputer.h.

◆ Point

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
typedef ChordComputer::Point DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::Point

Definition at line 139 of file ChordGenericStandardPlaneComputer.h.

◆ Primitive

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
typedef ChordComputer::Primitive DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::Primitive

Definition at line 140 of file ChordGenericStandardPlaneComputer.h.

◆ Size

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
typedef ChordComputer::Size DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::Size

Definition at line 142 of file ChordGenericStandardPlaneComputer.h.

◆ size_type

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
typedef InputPointSet::size_type DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::size_type

Definition at line 213 of file ChordGenericStandardPlaneComputer.h.

◆ Space

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
typedef TSpace DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::Space

Definition at line 131 of file ChordGenericStandardPlaneComputer.h.

◆ value_type

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
typedef InputPoint DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::value_type

Definition at line 211 of file ChordGenericStandardPlaneComputer.h.

Constructor & Destructor Documentation

◆ ~ChordGenericStandardPlaneComputer()

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::~ChordGenericStandardPlaneComputer ( )

Destructor.

◆ ChordGenericStandardPlaneComputer() [1/2]

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::ChordGenericStandardPlaneComputer ( )

Constructor. The object is not valid and should be initialized.

See also
init

◆ ChordGenericStandardPlaneComputer() [2/2]

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::ChordGenericStandardPlaneComputer ( const ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar > &  other)

Copy constructor.

Parameters
otherthe object to clone.

Member Function Documentation

◆ active()

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
Dimension DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::active ( ) const
Returns
an active axis (or the active axis when there is only one).

◆ begin()

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
ConstIterator DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::begin ( ) const
Returns
a const iterator pointing on the first point stored in the current standard plane.

◆ BOOST_CONCEPT_ASSERT() [1/2]

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::BOOST_CONCEPT_ASSERT ( (concepts::CSignedNumber< TInternalScalar >)  )
private

◆ BOOST_CONCEPT_ASSERT() [2/2]

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::BOOST_CONCEPT_ASSERT ( (concepts::CSpace< TSpace >)  )
private

◆ BOOST_STATIC_ASSERT() [1/2]

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::BOOST_STATIC_ASSERT ( (TInputPoint::dimension==3)  )
private

◆ BOOST_STATIC_ASSERT() [2/2]

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::BOOST_STATIC_ASSERT ( (TSpace::dimension==3)  )
private

◆ clear()

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
void DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::clear ( )

Clear the object, free memory. The plane keeps its main axis, diameter and width, but contains no point.

◆ empty()

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
bool DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::empty ( ) const
Returns
'true' if and only if this object contains no point.

◆ end()

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
ConstIterator DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::end ( ) const
Returns
a const iterator pointing after the last point stored in the current standard plane.

◆ extend() [1/2]

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
bool DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::extend ( const InputPoint p)

Adds the point p and checks if we have still a digital plane of specified width. The plane parameters may be updated so as to include the new point.

Parameters
pany 3D point (in the specified diameter).
Returns
'true' if it is still a plane, 'false' otherwise (the object is then in its original state).

◆ extend() [2/2]

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
template<typename TInputIterator >
bool DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::extend ( TInputIterator  it,
TInputIterator  itE 
)

Adds the range of points [it, itE) and checks if we have still a digital plane of specified width. The plane parameters may be updated so as to include all the new points. All points pointed by iterators should be in the diameter of this object.

Template Parameters
TInputIteratorany model of InputIterator on InputPoint.
Parameters
itan iterator on the first element of the range of 3D points.
itEan iterator after the last element of the range of 3D points.
Returns
'true' if it is still a plane, 'false' otherwise (the object is then in its original state).

◆ extendAsIs()

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
bool DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::extendAsIs ( const InputPoint p)

Adds the point p to this plane if it is within the current bounds. The plane parameters are not updated.

Parameters
pany 3D point (in the specified diameter).
Returns
'true' if p is in the plane, 'false' otherwise (the object is then in its original state).

◆ getBounds()

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
void DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::getBounds ( double &  min,
double &  max 
) const

If n is the unit normal to the current plane, then n.x >= min and n.x <= max are the two half-planes defining it.

Parameters
minthe lower bound (corresponding to the unit vector).
maxthe upper bound (corresponding to the unit vector).

◆ getCharacteristics()

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
void DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::getCharacteristics ( InternalVector n,
InternalScalar imin,
InternalScalar imax,
InputPoint p_min,
InputPoint p_max 
) const

The basic method for computing all characteristics of the recognized plane. Used by primitive, minimalPoint, maximalPoint, getBounds.

Parameters
[out]nthe integral normal vector (with last component positive).
[out]iminthe minimum dot product of an inserted point with n.
[out]imaxthe maximum dot product of an inserted point with n.
[out]p_minan inserted point satisfying the minimum dot product imin.
[out]p_maxan inserted point satisfying the maximum dot product imax.

◆ getNormal()

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
template<typename Vector3D >
void DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::getNormal ( Vector3D &  normal) const
Template Parameters
Vector3Dany type T such that T.operator[](int i) returns a reference to a double. i ranges in 0,1,2.
Parameters
normal(updates) the current normal vector

◆ getUnitNormal()

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
template<typename Vector3D >
void DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::getUnitNormal ( Vector3D &  normal) const
Template Parameters
Vector3Dany type T such that T.operator[](int i) returns a reference to a double. i ranges in 0,1,2.
Parameters
normal(updates) the current unit normal vector

◆ init()

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
void DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::init ( InternalScalar  widthNumerator = NumberTraitsInternalScalar >::ONE,
InternalScalar  widthDenominator = NumberTraitsInternalScalar >::ONE 
)

All these parameters cannot be changed during the process. After this call, the object is in a consistent state and can accept new points for recognition. Calls clear so that the object is ready to be extended.

Parameters
widthNumeratorthe maximal diagonal width for the plane is defined as the rational number widthNumerator / widthDenominator x sqrt(3). (default is 1/1 x sqrt(3), i.e. standard plane).
widthDenominatorthe maximal diagonal width for the plane is defined as the rational number widthNumerator / widthDenominator x sqrt(3). (default is 1/1 x sqrt(3), i.e. standard plane).

Referenced by main().

◆ invT()

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
static Transform DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::invT ( Dimension  orthant)
staticprotected
Parameters
orthantany orthant specified as an integer between 0 and 3.
Returns
the space transformation "naive to standard" associated with orthant orthant.

◆ isExtendable() [1/2]

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
bool DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::isExtendable ( const InputPoint p) const

Checks if we have still a digital plane of specified width when adding point p. The object is left unchanged whatever the returned value. The invariant is 'this->isExtendable( p ) == true <=> this->extend( p ) == true'.

Parameters
pany 3D point (in the specified diameter).
Returns
'true' if this is still a plane, 'false' otherwise.

◆ isExtendable() [2/2]

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
template<typename TInputIterator >
bool DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::isExtendable ( TInputIterator  it,
TInputIterator  itE 
) const

Checks if we have still a digital plane of specified width when adding the range of points [it, itE). The object is left unchanged whatever the returned value. All points pointed by iterators should be in the diameter of this object. The invariant is 'this->isExtendable( it, itE ) == true <=> this->extend( it, itE ) == true'.

Template Parameters
TInputIteratorany model of InputIterator on InputPoint.
Parameters
itan iterator on the first element of the range of 3D points.
itEan iterator after the last element of the range of 3D points.
Returns
'true' if this is still a plane, 'false' otherwise.

◆ isValid()

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
bool DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.

◆ max_size()

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
Size DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::max_size ( ) const

NB: std version.

Returns
the maximal allowed number of points in the current standard plane.
See also
maxSize

◆ maximalPoint()

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
InputPoint DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::maximalPoint ( ) const
Precondition
! empty()
Returns
the current maximal point of the plane, i.e. the one with the highest scalar product with the current normal vector. Note that other points may also have a maximum value.

◆ maxSize()

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
Size DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::maxSize ( ) const

same as max_size

Returns
the maximal allowed number of points in the current standard plane.

◆ minimalPoint()

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
InputPoint DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::minimalPoint ( ) const
Precondition
! empty()
Returns
the current minimal point of the plane, i.e. the one with the smallest scalar product with the current normal vector. Note that other points may also have a minimum value.

◆ operator()()

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
bool DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::operator() ( const Point p) const

Checks if the point p is in the current digital plane. Therefore, a ChordGenericStandardPlaneComputer is a model of concepts::CPointPredicate.

Parameters
pany 3D point.
Returns
'true' if it is in the current plane, false otherwise.

◆ operator=()

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
ChordGenericStandardPlaneComputer& DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::operator= ( const ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar > &  other)

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'.

◆ primitive()

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
Primitive DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::primitive ( ) const
Returns
the current primitive recognized by this computer, which is a ParallelStrip of diagonal width smaller than the one specified at instanciation.
Note
The returned primitive has the form \(\mu \le \vec{N} \cdot \vec{X} \le \mu + \epsilon\). It is guaranteed that its diagonal width is strictly less than the value widthNumerator / widthDenominator x sqrt(3) specified with method init.

◆ selfDisplay()

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
void DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

◆ size()

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
Size DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::size ( ) const
Returns
the number of distinct points in the current standard plane.

◆ t()

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
static Transform DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::t ( Dimension  orthant)
staticprotected
Parameters
orthantany orthant specified as an integer between 0 and 3.
Returns
the space transformation "standard to naive" associated with orthant orthant.

Field Documentation

◆ _orthantsToErase

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
std::vector<Dimension> DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::_orthantsToErase
mutableprivate

Useful when erasing orthants.

Definition at line 493 of file ChordGenericStandardPlaneComputer.h.

◆ myComputers

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
ChordComputer DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::myComputers[4]
private

The four Chord plane computers.

Definition at line 491 of file ChordGenericStandardPlaneComputer.h.

◆ myOrthants

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
std::vector<Dimension> DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::myOrthants
private

The list of active plane orthants. Starts with {0:++,1:+-,2:-+,3:–}.

Definition at line 490 of file ChordGenericStandardPlaneComputer.h.

◆ myTransforms

template<typename TSpace , typename TInputPoint , typename TInternalScalar >
Transform DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::myTransforms[4]
staticprivate

The four space transformation associated with each Chord plane computer, shared by all computers.

Definition at line 492 of file ChordGenericStandardPlaneComputer.h.


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