31#if defined(SphericalAccumulator_RECURSES)
32#error Recursive header files inclusion detected in SphericalAccumulator.h
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>
434#include "DGtal/geometry/tools//SphericalAccumulator.ih"
441#undef SphericalAccumulator_RECURSES
Aim: Implements basic operations that will be used in Point and Vector classes.
Aim: implements an accumulator (as histograms for 1D scalars) adapted to spherical point samples.
SphericalAccumulator & operator=(const SphericalAccumulator &other)
Quantity myBinNumber
Number of bins.
std::vector< Quantity >::const_iterator ConstIterator
Type to iterate on bin values.
std::vector< Vector > myAccumulatorDir
Accumulator reprensentative directions.
Vector representativeDirection(ConstIterator &it) const
ConstIterator begin() const
std::string className() const
Size myMaxBinTheta
Theta coordinate of the max bin.
void maxCountBin(Size &posPhi, Size &posTheta) const
Quantity count(const Size &posPhi, const Size &posTheta) const
RealVector getBinDirection(const Size &posPhi, const Size &posTheta) const
void binCoordinates(const Vector &aDir, Size &posPhi, Size &posTheta) const
void selfDisplay(std::ostream &out) const
void getBinGeometry(const Size &posPhi, const Size &posTheta, RealVector &a, RealVector &b, RealVector &c, RealVector &d) const
BOOST_STATIC_ASSERT(Vector::dimension==3)
ConstIterator end() const
TVector Vector
Vector direction types.
size_t Size
Type to represent bin indexes.
DGtal::int32_t Quantity
Type to store the bin counts.
Size myNphi
Number of slices in the phi direction.
void binCoordinates(ConstIterator &aDir, Size &posPhi, Size &posTheta) const
Quantity myTotal
Number of samples.
SphericalAccumulator(const SphericalAccumulator &other)
PointVector< 3, double > RealVector
Type to represent normalized vector (internal use).
Quantity binNumber() const
Size myNtheta
Number of bins in the theta direction.
Vector representativeDirection(const Size &posPhi, const Size &posTheta) const
std::vector< Quantity > myAccumulator
Accumulator container.
SphericalAccumulator(const Size aNphi)
bool isValidBin(const Size &posPhi, const Size &posTheta) const
Size myMaxBinPhi
Phi coordinate of the max bin.
void addDirection(const Vector &aDir)
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
boost::int32_t int32_t
signed 32-bit integer.