|
Ponca
6d7f3619cbd70eb6ac131a3267ba1a351b1c9d07
Point Cloud Analysis library
|
This modules includes classes and methods for Spatial Partitioning and queries. More...
Classes | |
| struct | Ponca::QueryInputBase |
| Base class for queries input type. More... | |
| struct | Ponca::QueryOutputBase |
| Base class for queries output types. More... | |
| struct | Ponca::QueryOutputBase::DummyOutputParameter |
| struct | Ponca::QueryInput< InputType_ > |
| Base class for Query input type. More... | |
| struct | Ponca::QueryInputIsIndex< Index > |
Extension of QueryInput that handles an index based search, in a partitioning structure. More... | |
| struct | Ponca::QueryInputIsPosition< DataPoint > |
Extension of QueryInput that handles a position based search, in a partitioning structure. More... | |
| struct | Ponca::QueryOutputIsRange< Index, Scalar > |
| Class to construct the range query output. More... | |
| struct | Ponca::QueryOutputIsNearest< Index, Scalar > |
| Class to construct the nearest query output. More... | |
| struct | Ponca::QueryOutputIsKNearest< Index, Scalar, MAX_KNN_SIZE > |
| Class to construct the knearest queries. More... | |
| struct | Ponca::Query< Input_, Output_ > |
| Composes the Query object depending on an input type and output type. More... | |
Macros | |
| #define | POINT_QUERY_DOC(OUT_TYPE) |
| #define | INDEX_QUERY_DOC(OUT_TYPE) |
| Base Query class combining QueryInputIsPosition and QueryOutputIs##OUT_TYPE##. | |
This modules includes classes and methods for Spatial Partitioning and queries.
| struct Ponca::QueryInputBase |
| struct Ponca::QueryOutputBase |
Base class for queries output types.
QueryOutput objects are the return types of the searches of the accelerating structures defined in the SpatialPartitioning module.
They are used for easy access to the result outputs. (e.g. to iterate over the neighbors of the evaluated point using a rangeNeighborsQuery request).
Inheritance diagram for Ponca::QueryOutputBase:
Collaboration diagram for Ponca::QueryOutputBase:| struct Ponca::QueryOutputBase::DummyOutputParameter |
| struct Ponca::QueryInput |
Base class for Query input type.
Stores internally a value that is related to the point about to be evaluated (e.g. the position of the point, or its index)
Inheritance diagram for Ponca::QueryInput< InputType_ >:
Collaboration diagram for Ponca::QueryInput< InputType_ >:Public Types | |
| using | InputType = InputType_ |
| Alias to the templated input type. | |
Public Member Functions | |
| QueryInput (InputType input) | |
| Default constructor that initialize the input field. | |
| const InputType & | input () const |
| Read access to the input. | |
Protected Member Functions | |
| void | setInput (const InputType &input) |
| Edit the input. | |
| using Ponca::QueryInput< InputType_ >::InputType = InputType_ |
|
inline |
|
inline |
|
inlineprotected |
Edit the input.
| struct Ponca::QueryInputIsIndex |
Extension of QueryInput that handles an index based search, in a partitioning structure.
Stores internally the index of the evaluated point.
Inheritance diagram for Ponca::QueryInputIsIndex< Index >:
Collaboration diagram for Ponca::QueryInputIsIndex< Index >:Public Types | |
| using | Base = QueryInput< Index > |
| Alias to the inherited type. | |
| using | InputType = typename Base::InputType |
| Alias to the templated input type (Index) | |
Public Types inherited from Ponca::QueryInput< Index > | |
| using | InputType = Index |
| Alias to the templated input type. | |
Public Member Functions | |
| QueryInputIsIndex (const InputType &point=-1) | |
| Default constructor that initialize the input index. | |
| void | operator() (const InputType &point=InputType::Zero()) |
| Access operator that resets the input index. | |
Public Member Functions inherited from Ponca::QueryInput< Index > | |
| QueryInput (InputType input) | |
| Default constructor that initialize the input field. | |
| const InputType & | input () const |
| Read access to the input. | |
Protected Member Functions | |
| template<typename IndexType > | |
| bool | skipIndexFunctor (IndexType idx) const |
| Functor used to check if a given Idx must be skipped. | |
| template<typename VectorType , typename Container > | |
| const VectorType | getInputPosition (const Container &c) |
| Generic method to access input position. The VectorType needs to be passed as a template argument. | |
Protected Member Functions inherited from Ponca::QueryInput< Index > | |
| void | setInput (const InputType &input) |
| Edit the input. | |
| using Ponca::QueryInputIsIndex< Index >::Base = QueryInput<Index> |
| using Ponca::QueryInputIsIndex< Index >::InputType = typename Base::InputType |
|
inline |
|
inlineprotected |
|
inline |
| struct Ponca::QueryInputIsPosition |
Extension of QueryInput that handles a position based search, in a partitioning structure.
Stores internally the position of the evaluated point.
Inheritance diagram for Ponca::QueryInputIsPosition< DataPoint >:
Collaboration diagram for Ponca::QueryInputIsPosition< DataPoint >:Public Types | |
| using | Base = QueryInput< typename DataPoint::VectorType > |
| Alias to the inherited type. | |
| using | InputType = typename Base::InputType |
| Alias to the templated input type (Index) | |
Public Types inherited from Ponca::QueryInput< DataPoint::VectorType > | |
| using | InputType = DataPoint::VectorType |
| Alias to the templated input type. | |
Public Member Functions | |
| QueryInputIsPosition (const InputType &point=InputType::Zero()) | |
| Default constructor that initialize the input position. | |
| void | operator() (const InputType &point=InputType::Zero()) |
| Access operator that resets the input point. | |
Public Member Functions inherited from Ponca::QueryInput< DataPoint::VectorType > | |
| QueryInput (InputType input) | |
| Default constructor that initialize the input field. | |
| const InputType & | input () const |
| Read access to the input. | |
Protected Member Functions | |
| template<typename IndexType > | |
| bool | skipIndexFunctor (IndexType idx) const |
| Functor used to check if a given Idx must be skipped. | |
| template<typename VectorType = typename DataPoint::VectorType, typename Container > | |
| const VectorType | getInputPosition (const Container &) |
| Generic method to access input position. The VectorType needs to be passed as a template argument. | |
Protected Member Functions inherited from Ponca::QueryInput< DataPoint::VectorType > | |
| void | setInput (const InputType &input) |
| Edit the input. | |
| using Ponca::QueryInputIsPosition< DataPoint >::Base = QueryInput<typename DataPoint::VectorType> |
| using Ponca::QueryInputIsPosition< DataPoint >::InputType = typename Base::InputType |
|
inline |
|
inlineprotected |
|
inline |
| struct Ponca::QueryOutputIsRange |
Class to construct the range query output.
Stores internally the radius value of a range request.
Inheritance diagram for Ponca::QueryOutputIsRange< Index, Scalar >:
Collaboration diagram for Ponca::QueryOutputIsRange< Index, Scalar >:Public Types | |
| using | OutputParameter = Scalar |
| Alias to Output type. | |
Public Member Functions | |
| QueryOutputIsRange (OutputParameter radius=OutputParameter(0)) | |
| Default constructor that initialize the output parameter value. | |
| void | operator() (OutputParameter radius) |
| Access operator that resets the output parameter. | |
| Scalar | radius () const |
| Generic method to access the radius. | |
| Scalar | squaredRadius () const |
| Generic method to access the radius squared. | |
| void | setRadius (Scalar radius) |
| Set the radius distance of the query. | |
| void | setSquaredRadius (Scalar radius) |
| Set the squared radius distance of the query. | |
Protected Member Functions | |
| void | reset () |
| Reset Query for a new search. | |
| Scalar | descentDistanceThreshold () const |
| Distance threshold used during tree descent to select nodes to explore. | |
Protected Attributes | |
| Scalar | m_squared_radius {0} |
| Radius used for the search. | |
| using Ponca::QueryOutputIsRange< Index, Scalar >::OutputParameter = Scalar |
|
inline |
|
inlineprotected |
|
inline |
|
inline |
Generic method to access the radius.
squaredRadius, because it computes the square root of the squared radius each time it is called. This is done this way to avoid having to store internally two values related to the radius.squaredRadius is overall better for distance comparison.
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
protected |
| struct Ponca::QueryOutputIsNearest |
Class to construct the nearest query output.
Stores internally the nearest neighbor and the Distance threshold (for tree descent).
Inheritance diagram for Ponca::QueryOutputIsNearest< Index, Scalar >:
Collaboration diagram for Ponca::QueryOutputIsNearest< Index, Scalar >:Public Types | |
| using | OutputParameter = typename QueryOutputBase::DummyOutputParameter |
| Alias to Output type. | |
Public Member Functions | |
| QueryOutputIsNearest () | |
| Default constructor. | |
| void | operator() () |
| Access operator. | |
| Index | get () const |
| Get the closest points. | |
Protected Member Functions | |
| void | reset () |
| Reset Query for a new search. | |
| Scalar | descentDistanceThreshold () const |
| Distance threshold used during tree descent to select nodes to explore. | |
Protected Attributes | |
| Index | m_nearest {-1} |
| Index of the nearest neighbor. | |
| Scalar | m_squared_distance {std:: numeric_limits < Scalar > ::max()} |
| Distance to the nearest neighbor. | |
| using Ponca::QueryOutputIsNearest< Index, Scalar >::OutputParameter = typename QueryOutputBase::DummyOutputParameter |
|
inline |
|
inlineprotected |
|
inline |
|
inline |
|
inlineprotected |
|
protected |
|
protected |
| struct Ponca::QueryOutputIsKNearest |
Class to construct the knearest queries.
Stores internally the neighbors collection of the knn request and the Distance threshold (for tree descent).
| MAX_KNN_SIZE | Maximum size of the K-neighborhood |
Inheritance diagram for Ponca::QueryOutputIsKNearest< Index, Scalar, MAX_KNN_SIZE >:
Collaboration diagram for Ponca::QueryOutputIsKNearest< Index, Scalar, MAX_KNN_SIZE >:Public Types | |
| using | OutputParameter = Index |
| Alias to Output type. | |
| using | Queue = LimitedPriorityQueue< IndexSquaredDistance< Index, Scalar >, MAX_KNN_SIZE > |
| Alias to LimitedPriorityQueue. | |
Public Member Functions | |
| QueryOutputIsKNearest (OutputParameter k=0) | |
| Default constructor that initialize the output parameter value. | |
| void | operator() (OutputParameter k) |
| Access operator that resets the output parameter. | |
| Queue & | queue () |
| Access to the priority queue storing the neighbors. | |
Protected Member Functions | |
| void | reset () |
| Reset Query for a new search. | |
| Scalar | descentDistanceThreshold () const |
| Distance threshold used during tree descent to select nodes to explore. | |
Protected Attributes | |
| Queue | m_queue |
| Queue storing the neighbors. | |
| using Ponca::QueryOutputIsKNearest< Index, Scalar, MAX_KNN_SIZE >::OutputParameter = Index |
| using Ponca::QueryOutputIsKNearest< Index, Scalar, MAX_KNN_SIZE >::Queue = LimitedPriorityQueue<IndexSquaredDistance<Index, Scalar>, MAX_KNN_SIZE> |
Alias to LimitedPriorityQueue.
|
inline |
|
inlineprotected |
|
inline |
|
inline |
|
inlineprotected |
| struct Ponca::Query |
Composes the Query object depending on an input type and output type.
| Input_ | The query input type corresponds to the value used for the search. |
| Output_ | The query output type corresponds to the results of the search (it can be iterated over). |
Inheritance diagram for Ponca::Query< Input_, Output_ >:
Collaboration diagram for Ponca::Query< Input_, Output_ >:Public Types | |
| using | QueryInType = Input_ |
| Alias to the input type. | |
| using | QueryOutType = Output_ |
| Alias to the output type. | |
Public Member Functions | |
| Query (const typename QueryInType::InputType &in) | |
| Default constructor that initialize the input parameter only. | |
| Query (const typename QueryOutType::OutputParameter &outParam, const typename QueryInType::InputType &in) | |
| Default constructor that initialize the input and output parameters. | |
| template<typename Base , typename... outputType> | |
| Base & | operator() (const typename QueryInType::InputType &in, outputType &&... out) |
| Access operator that resets the input and output parameters. | |
| template<typename Base > | |
| Base & | operator() (const typename QueryInType::InputType &in) |
| Access operator that resets the input parameter only. | |
| using Ponca::Query< Input_, Output_ >::QueryInType = Input_ |
| using Ponca::Query< Input_, Output_ >::QueryOutType = Output_ |
|
inline |
|
inline |
|
inline |
|
inline |
| #define INDEX_QUERY_DOC | ( | OUT_TYPE | ) |
Base Query class combining QueryInputIsPosition and QueryOutputIs##OUT_TYPE##.
PointQuery objects acts as a Range that can be iterated over.
They are used as the return type for the index searches
and they allow easy access to the result outputs.
This specialization of the PointQuery concept is used to iterate over the neighbors of a given point \ position, using a ##OUT_TYPE## Point Query request.
| using Ponca::KNearestIndexQuery = typedef Query<QueryInputIsIndex<Index>, QueryOutputIsKNearest<Index, Scalar, MAX_KNN_SIZE> > |
| using Ponca::KNearestPointQuery = typedef Query<QueryInputIsPosition<DataPoint>, QueryOutputIsKNearest<Index, typename DataPoint::Scalar, MAX_KNN_SIZE> > |
Base Query alias combining QueryInputIsIndex and QueryOutputIs##OUT_TYPE##.
IndexQuery objects acts as a Range that can be iterated over.
They are used as the return type for the index searches
and they allow easy access to the result outputs.
This specialization of the IndexQuery concept is used to iterate over the neighbors of a given point index, \ using a ##OUT_TYPE## Index Query request.
| MAX_KNN_SIZE | Maximum size of the K-neighborhood |
| using Ponca::NearestIndexQuery = typedef Query<QueryInputIsIndex<Index>, QueryOutputIsNearest<Index, Scalar> > |
| using Ponca::NearestPointQuery = typedef Query<QueryInputIsPosition<DataPoint>, QueryOutputIsNearest<Index, typename DataPoint::Scalar> > |
| using Ponca::RangeIndexQuery = typedef Query<QueryInputIsIndex<Index>, QueryOutputIsRange<Index, Scalar> > |
| using Ponca::RangePointQuery = typedef Query<QueryInputIsPosition<DataPoint>, QueryOutputIsRange<Index, typename DataPoint::Scalar> > |