31 #if defined(SphericalAccumulator_RECURSES) 32 #error Recursive header files inclusion detected in SphericalAccumulator.h 33 #else // defined(SphericalAccumulator_RECURSES) 35 #define SphericalAccumulator_RECURSES 37 #if !defined SphericalAccumulator_h 39 #define SphericalAccumulator_h 45 #include "DGtal/base/Common.h" 46 #include "DGtal/kernel/PointVector.h" 47 #include "DGtal/kernel/NumberTraits.h" 101 template <
typename TVector>
162 Size &posTheta)
const;
174 const Size &posTheta)
const;
193 const Size &posTheta)
const;
254 return "SphericalAccumulator";
267 const Size &posTheta)
const;
282 const Size &posTheta,
297 const Size &posTheta)
const;
331 Size &posTheta)
const;
425 template <
typename T>
427 operator<< ( std::ostream & out, const SphericalAccumulator<T> & object );
434 #include "DGtal/geometry/tools//SphericalAccumulator.ih" 439 #endif // !defined SphericalAccumulator_h 441 #undef SphericalAccumulator_RECURSES 442 #endif // else defined(SphericalAccumulator_RECURSES) SphericalAccumulator & operator=(const SphericalAccumulator &other)
std::vector< Vector > myAccumulatorDir
Accumulator reprensentative directions.
boost::uint32_t uint32_t
unsigned 32-bit integer.
Vector representativeDirection(const Size &posPhi, const Size &posTheta) const
std::vector< Quantity > myAccumulator
Accumulator container.
MyDigitalSurface::ConstIterator ConstIterator
TVector Vector
Vector direction types.
Quantity myTotal
Number of samples.
Size myMaxBinPhi
Phi coordinate of the max bin.
void maxCountBin(Size &posPhi, Size &posTheta) const
std::vector< Quantity >::const_iterator ConstIterator
Type to iterate on bin values.
Size myNphi
Number of slices in the phi direction.
std::string className() const
void selfDisplay(std::ostream &out) const
PointVector< 3, double > RealVector
Type to represent normalized vector (internal use).
void addDirection(const Vector &aDir)
Size myMaxBinTheta
Theta coordinate of the max bin.
Quantity count(const Size &posPhi, const Size &posTheta) const
RealVector getBinDirection(const Size &posPhi, const Size &posTheta) const
DGtal is the top-level namespace which contains all DGtal functions and types.
Quantity binNumber() const
Aim: implements an accumulator (as histograms for 1D scalars) adapted to spherical point samples...
Size myNtheta
Number of bins in the theta direction.
BOOST_STATIC_ASSERT(Vector::dimension==3)
DGtal::uint32_t Size
Type to represent bin indexes.
void getBinGeometry(const Size &posPhi, const Size &posTheta, RealVector &a, RealVector &b, RealVector &c, RealVector &d) const
Quantity myBinNumber
Number of bins.
DGtal::int32_t Quantity
Type to store the bin counts.
void binCoordinates(const Vector &aDir, Size &posPhi, Size &posTheta) const
boost::int32_t int32_t
signed 32-bit integer.
bool isValidBin(const Size &posPhi, const Size &posTheta) const
SphericalAccumulator(const SphericalAccumulator &other)
ConstIterator end() const
ConstIterator begin() const