Ponca  eb7239a9c07e156fb1edc6faac7fe89e2b256bda
Point Cloud Analysis library
Loading...
Searching...
No Matches
Ponca::BasketUnitBase< DataPoint, _NFilter, T > Class Template Reference

Base class of any computation unit of a Basket. More...

#include <basketUnit.h>

Collaboration diagram for Ponca::BasketUnitBase< DataPoint, _NFilter, T >:

Public Types

using Scalar = typename DataPoint::Scalar
 Inherited scalar type.
using VectorType = typename DataPoint::VectorType
 Inherited vector type.
using NeighborFilter = _NFilter
 Filter applied on each neighbor.
using NeighborFrame = typename NeighborFilter::NeighborhoodFrame

Public Member Functions

bool setNeighborFilter (const NeighborFilter &_nFilter)
void init ()
 Set the evaluation position and reset the internal states.
bool isReady () const
 Is the primitive well-fitted and ready to use (finalize has been called) ?
bool isStable () const
 Is the fitted primitive ready to use (finalize has been called and the result is stable).
bool needAnotherPass () const
 Is another pass required for fitting (finalize has been called and the result is NEED_OTHER_PASS).
int getNumNeighbors () const
 Get number of points added in the neighborhood (with positive weight).
Scalar getWeightSum () const
 Get the sum of the weights.
void startNewPass ()
 To be called when starting a new processing pass, ie.
const NeighborFilter & getNeighborFilter () const
 Read access to the NeighborFilter.
NeighborFrame & getNeighborFrame ()
const NeighborFrame & getNeighborFrame () const
FIT_RESULT getCurrentState () const
void addLocalNeighbor (Scalar w, const VectorType &, const DataPoint &)
 Add a neighbor to perform the fit.
FIT_RESULT finalize ()

Protected Attributes

NeighborFilter m_nFilter
 Neighborhood filter.
FIT_RESULT m_eCurrentState {UNDEFINED}
 Represent the current state of the fit (finalize function update the state).

Detailed Description

template<class DataPoint, class _NFilter, typename T = void>
class Ponca::BasketUnitBase< DataPoint, _NFilter, T >

Base class of any computation unit of a Basket.

It is the first unit of the Basket class. It is used to define default fallback functions, and to store and provide public access to the neighborhood statistics, fitting status, ... It also stores the shared datastructures such as the NeighborFilter.

Definition at line 26 of file basketUnit.h.

Member Typedef Documentation

◆ NeighborFilter

template<class DataPoint, class _NFilter, typename T = void>
using Ponca::BasketUnitBase< DataPoint, _NFilter, T >::NeighborFilter = _NFilter

Filter applied on each neighbor.

Definition at line 31 of file basketUnit.h.

◆ NeighborFrame

template<class DataPoint, class _NFilter, typename T = void>
using Ponca::BasketUnitBase< DataPoint, _NFilter, T >::NeighborFrame = typename NeighborFilter::NeighborhoodFrame

Definition at line 32 of file basketUnit.h.

◆ Scalar

template<class DataPoint, class _NFilter, typename T = void>
using Ponca::BasketUnitBase< DataPoint, _NFilter, T >::Scalar = typename DataPoint::Scalar

Inherited scalar type.

Definition at line 29 of file basketUnit.h.

◆ VectorType

template<class DataPoint, class _NFilter, typename T = void>
using Ponca::BasketUnitBase< DataPoint, _NFilter, T >::VectorType = typename DataPoint::VectorType

Inherited vector type.

Definition at line 30 of file basketUnit.h.

Member Function Documentation

◆ addLocalNeighbor()

template<class DataPoint, class _NFilter, typename T = void>
void Ponca::BasketUnitBase< DataPoint, _NFilter, T >::addLocalNeighbor ( Scalar w,
const VectorType & ,
const DataPoint &  )
inline

Add a neighbor to perform the fit.

Definition at line 107 of file basketUnit.h.

◆ finalize()

template<class DataPoint, class _NFilter, typename T = void>
FIT_RESULT Ponca::BasketUnitBase< DataPoint, _NFilter, T >::finalize ( )
inline

Definition at line 114 of file basketUnit.h.

◆ getCurrentState()

template<class DataPoint, class _NFilter, typename T = void>
FIT_RESULT Ponca::BasketUnitBase< DataPoint, _NFilter, T >::getCurrentState ( ) const
inlinenodiscard
Returns
the current test of the fit

Definition at line 104 of file basketUnit.h.

◆ getNeighborFilter()

template<class DataPoint, class _NFilter, typename T = void>
const NeighborFilter & Ponca::BasketUnitBase< DataPoint, _NFilter, T >::getNeighborFilter ( ) const
inline

Read access to the NeighborFilter.

See also
setNeighborFilter

Definition at line 97 of file basketUnit.h.

◆ getNeighborFrame() [1/2]

template<class DataPoint, class _NFilter, typename T = void>
NeighborFrame & Ponca::BasketUnitBase< DataPoint, _NFilter, T >::getNeighborFrame ( )
inline

Definition at line 99 of file basketUnit.h.

◆ getNeighborFrame() [2/2]

template<class DataPoint, class _NFilter, typename T = void>
const NeighborFrame & Ponca::BasketUnitBase< DataPoint, _NFilter, T >::getNeighborFrame ( ) const
inline

Definition at line 100 of file basketUnit.h.

◆ getNumNeighbors()

template<class DataPoint, class _NFilter, typename T = void>
int Ponca::BasketUnitBase< DataPoint, _NFilter, T >::getNumNeighbors ( ) const
inlinenodiscard

Get number of points added in the neighborhood (with positive weight).

Definition at line 84 of file basketUnit.h.

◆ getWeightSum()

template<class DataPoint, class _NFilter, typename T = void>
Scalar Ponca::BasketUnitBase< DataPoint, _NFilter, T >::getWeightSum ( ) const
inlinenodiscard

Get the sum of the weights.

Definition at line 87 of file basketUnit.h.

◆ init()

template<class DataPoint, class _NFilter, typename T = void>
void Ponca::BasketUnitBase< DataPoint, _NFilter, T >::init ( )
inline

Set the evaluation position and reset the internal states.

Warning
Must be called be for any computation (but * after #setNeighborFilter)

Definition at line 61 of file basketUnit.h.

◆ isReady()

template<class DataPoint, class _NFilter, typename T = void>
bool Ponca::BasketUnitBase< DataPoint, _NFilter, T >::isReady ( ) const
inlinenodiscard

Is the primitive well-fitted and ready to use (finalize has been called) ?

Warning
The fit can still be unstable
See also
isStable

Definition at line 71 of file basketUnit.h.

◆ isStable()

template<class DataPoint, class _NFilter, typename T = void>
bool Ponca::BasketUnitBase< DataPoint, _NFilter, T >::isStable ( ) const
inlinenodiscard

Is the fitted primitive ready to use (finalize has been called and the result is stable).

Definition at line 77 of file basketUnit.h.

◆ needAnotherPass()

template<class DataPoint, class _NFilter, typename T = void>
bool Ponca::BasketUnitBase< DataPoint, _NFilter, T >::needAnotherPass ( ) const
inlinenodiscard

Is another pass required for fitting (finalize has been called and the result is NEED_OTHER_PASS).

See also
startNewPass

Definition at line 81 of file basketUnit.h.

◆ setNeighborFilter()

template<class DataPoint, class _NFilter, typename T = void>
bool Ponca::BasketUnitBase< DataPoint, _NFilter, T >::setNeighborFilter ( const NeighborFilter & _nFilter)
inline

Definition at line 54 of file basketUnit.h.

◆ startNewPass()

template<class DataPoint, class _NFilter, typename T = void>
void Ponca::BasketUnitBase< DataPoint, _NFilter, T >::startNewPass ( )
inline

To be called when starting a new processing pass, ie.

when getCurrentState()==#NEED_ANOTHER_PASS

Definition at line 90 of file basketUnit.h.

Member Data Documentation

◆ m_eCurrentState

template<class DataPoint, class _NFilter, typename T = void>
FIT_RESULT Ponca::BasketUnitBase< DataPoint, _NFilter, T >::m_eCurrentState {UNDEFINED}
protected

Represent the current state of the fit (finalize function update the state).

Definition at line 47 of file basketUnit.h.

◆ m_nFilter

template<class DataPoint, class _NFilter, typename T = void>
NeighborFilter Ponca::BasketUnitBase< DataPoint, _NFilter, T >::m_nFilter
protected

Neighborhood filter.

Definition at line 43 of file basketUnit.h.