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...
COBANaivePlaneComputer< Space, InternalInteger > COBAComputer
ConstIterator begin() const
PointSet::const_iterator PointSetConstIterator
void getCharacteristics(IntegerVector3 &n, InternalInteger &imin, InternalInteger &imax, Point &p_min, Point &p_max) const
Point minimalPoint() const
std::vector< Dimension >::const_iterator OrthantConstIterator
~COBAGenericStandardPlaneComputer()
void getBounds(double &min, double &max) const
bool extend(TInputIterator it, TInputIterator itE)
TInternalInteger InternalInteger
COBAGenericStandardPlaneComputer & operator=(const COBAGenericStandardPlaneComputer &other)
COBAGenericStandardPlaneComputer()
IntegerComputer< InternalInteger > MyIntegerComputer
static Transform invT(Dimension orthant)
bool operator()(const Point &p) const
Point maximalPoint() const
ConstIterator const_iterator
boost::transform_iterator< Transform, PointSetConstIterator, Point, Point > ConstIterator
PointSet::size_type size_type
const Point & const_reference
void getUnitNormal(Vector3D &normal) const
COBAComputer myComputers[4]
COBAComputer::Primitive Primitive
bool extend(const Point &p)
PointSet::iterator PointSetIterator
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
void getNormal(Vector3D &normal) const
COBAGenericStandardPlaneComputer(const COBAGenericStandardPlaneComputer &other)
std::vector< Dimension > myOrthants
Primitive primitive() const
PointSet::difference_type difference_type
COBAComputer::IntegerVector3 IntegerVector3
void init(InternalInteger diameter, InternalInteger widthNumerator=NumberTraits< InternalInteger >::ONE, InternalInteger widthDenominator=NumberTraits< InternalInteger >::ONE)
MyIntegerComputer & ic() const
std::vector< Dimension > _orthantsToErase
const Point * const_pointer
std::set< Point > PointSet
static Transform myTransforms[4]
bool isExtendable(const Point &p) const
static Transform t(Dimension orthant)
BOOST_STATIC_ASSERT((TSpace::dimension==3))
BOOST_CONCEPT_ASSERT((concepts::CInteger< TInternalInteger >))
bool extendAsIs(const Point &p)
bool isExtendable(TInputIterator it, TInputIterator itE) const
void selfDisplay(std::ostream &out) const
std::vector< Dimension >::iterator OrthantIterator
ConstIterator end() const
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.