Ponca  4d2a58fa5c6375adef5c4b208f4d47e016cecd6d
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

void setNeighborFilter (const NeighborFilter &_nFilter)
 Init the WeightFunc, without changing the other internal states.
 
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 NeighborFiltergetNeighborFilter () 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 ()
 Finalize the procedure.
 

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 103 of file basketUnit.h.

◆ finalize()

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

Finalize the procedure.

Returns
Fitting Status
Warning
Must be called be for any use of the fitting output

Definition at line 110 of file basketUnit.h.

◆ getCurrentState()

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

Definition at line 100 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 93 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 95 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 96 of file basketUnit.h.

◆ getNumNeighbors()

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

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

Definition at line 80 of file basketUnit.h.

◆ getWeightSum()

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

Get the sum of the weights.

Definition at line 83 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 57 of file basketUnit.h.

◆ isReady()

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

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 67 of file basketUnit.h.

◆ isStable()

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

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

Definition at line 73 of file basketUnit.h.

◆ needAnotherPass()

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

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

See also
startNewPass

Definition at line 77 of file basketUnit.h.

◆ setNeighborFilter()

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

Init the WeightFunc, without changing the other internal states.

Calls startNewPass internally.

Warning
Must be * called be for any computation (and before init).
See also
getWeightFunc

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 86 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.