31#if defined(COBAGenericStandardPlaneComputer_RECURSES)
32#error Recursive header files inclusion detected in COBAGenericStandardPlaneComputer.h
35#define COBAGenericStandardPlaneComputer_RECURSES
37#if !defined COBAGenericStandardPlaneComputer_h
39#define COBAGenericStandardPlaneComputer_h
45#include "DGtal/base/Common.h"
46#include "DGtal/base/IteratorAdapter.h"
47#include "DGtal/kernel/CInteger.h"
48#include "DGtal/kernel/CSpace.h"
49#include "DGtal/kernel/SpaceND.h"
50#include "DGtal/kernel/PointVector.h"
51#include "DGtal/arithmetic/IntegerComputer.h"
52#include "DGtal/geometry/surfaces/COBANaivePlaneComputer.h"
126 template <
typename TSpace,
127 typename TInternalInteger >
140 typedef typename PointSet::size_type
Size;
177 if (
_posY )
return Point( p[ 0 ] + p[ 2 ], p[ 1 ] + p[ 2 ], p[ 2 ] );
178 else return Point( p[ 0 ] + p[ 2 ], p[ 1 ] - p[ 2 ], p[ 2 ] );
180 if (
_posY )
return Point( p[ 0 ] - p[ 2 ], p[ 1 ] + p[ 2 ], p[ 2 ] );
181 else return Point( p[ 0 ] - p[ 2 ], p[ 1 ] - p[ 2 ], p[ 2 ] );
189 if (
_posY )
return Point( p[ 0 ] - p[ 2 ], p[ 1 ] - p[ 2 ], p[ 2 ] );
190 else return Point( p[ 0 ] - p[ 2 ], p[ 1 ] + p[ 2 ], p[ 2 ] );
192 if (
_posY )
return Point( p[ 0 ] + p[ 2 ], p[ 1 ] - p[ 2 ], p[ 2 ] );
193 else return Point( p[ 0 ] + p[ 2 ], p[ 1 ] + p[ 2 ], p[ 2 ] );
196 template <
typename Vector3D>
199 if (
_posX ) v[ 2 ] += v[ 0 ];
200 else v[ 2 ] -= v[ 0 ];
201 if (
_posY ) v[ 2 ] += v[ 1 ];
202 else v[ 2 ] -= v[ 1 ];
204 template <
typename Vector3D>
207 if (
_posX ) v[ 2 ] -= v[ 0 ];
208 else v[ 2 ] += v[ 0 ];
209 if (
_posY ) v[ 2 ] -= v[ 1 ];
210 else v[ 2 ] += v[ 1 ];
219 typedef boost::transform_iterator<Transform,PointSetConstIterator,Point,Point>
407 template <
typename TInputIterator>
408 bool extend( TInputIterator it, TInputIterator itE );
424 template <
typename TInputIterator>
451 template <
typename Vector3D>
460 template <
typename Vector3D>
550 template <
typename TSpace,
typename TInternalInteger>
559#include "DGtal/geometry/surfaces/COBAGenericStandardPlaneComputer.ih"
566#undef COBAGenericStandardPlaneComputer_RECURSES
Aim: A class that recognizes pieces of digital planes of given axis width. When the diagonal width is...
IntegerComputer< InternalInteger > MyIntegerComputer
std::vector< Dimension >::const_iterator OrthantConstIterator
PointSet::iterator PointSetIterator
COBANaivePlaneComputer< Space, InternalInteger > COBAComputer
ConstIterator begin() const
std::set< Point > PointSet
void getCharacteristics(IntegerVector3 &n, InternalInteger &imin, InternalInteger &imax, Point &p_min, Point &p_max) const
Point minimalPoint() const
~COBAGenericStandardPlaneComputer()
void getBounds(double &min, double &max) const
bool extend(TInputIterator it, TInputIterator itE)
COBAGenericStandardPlaneComputer & operator=(const COBAGenericStandardPlaneComputer &other)
COBAGenericStandardPlaneComputer()
static Transform invT(Dimension orthant)
bool operator()(const Point &p) const
ConstIterator const_iterator
Point maximalPoint() const
void getUnitNormal(Vector3D &normal) const
COBAComputer myComputers[4]
bool extend(const Point &p)
COBAComputer::IntegerVector3 IntegerVector3
std::vector< Dimension >::iterator OrthantIterator
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
const Point & const_reference
void getNormal(Vector3D &normal) const
COBAGenericStandardPlaneComputer(const COBAGenericStandardPlaneComputer &other)
std::vector< Dimension > myOrthants
Primitive primitive() const
PointSet::size_type size_type
void init(InternalInteger diameter, InternalInteger widthNumerator=NumberTraits< InternalInteger >::ONE, InternalInteger widthDenominator=NumberTraits< InternalInteger >::ONE)
PointSet::const_iterator PointSetConstIterator
MyIntegerComputer & ic() const
std::vector< Dimension > _orthantsToErase
static Transform myTransforms[4]
PointSet::difference_type difference_type
bool isExtendable(const Point &p) const
static Transform t(Dimension orthant)
BOOST_STATIC_ASSERT((TSpace::dimension==3))
BOOST_CONCEPT_ASSERT((concepts::CInteger< TInternalInteger >))
TInternalInteger InternalInteger
bool extendAsIs(const Point &p)
boost::transform_iterator< Transform, PointSetConstIterator, Point, Point > ConstIterator
const Point * const_pointer
bool isExtendable(TInputIterator it, TInputIterator itE) const
void selfDisplay(std::ostream &out) const
ConstIterator end() const
COBAComputer::Primitive Primitive
Aim: This class gathers several types and methods to make computation with integers.
Aim: A parallel strip in the space is the intersection of two parallel half-planes such that each hal...
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
DGtal::uint32_t Dimension
Aim: The traits class for all models of Cinteger.
Aim: Concept checking for Integer Numbers. More precisely, this concept is a refinement of both CEucl...
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines.