RDB 2
Public Member Functions | List of all members
riegl::rdb::pointcloud::QueryStat Class Reference

Point statistics query. More...

#include <queryStat.hpp>

Public Member Functions

 QueryStat ()
 Default constructor. More...
 
 QueryStat (riegl::rdb::PointcloudData *pointcloud)
 Constructor. More...
 
 operator bool () const
 Check if query is not null. More...
 
bool valid () const
 Check if query is not null. More...
 
void close ()
 Finish query. More...
 
void index (GraphNode &root, const std::string &filter=std::string())
 Get index graph. More...
 
GraphNode index (const std::string &filter=std::string())
 
void minimum (const GraphNode::ID &nodeID, const std::string &attribute, const DataType dataType, void *buffer, const bool cleaned=false)
 Lowest value of node. More...
 
template<typename ValueType >
void minimum (const GraphNode::ID &nodeID, const std::string &attribute, ValueType &buffer, const bool cleaned=false)
 Lowest value of node. More...
 
template<typename ValueType >
void minimum (const GraphNode::ID &nodeID, const std::string &attribute, ValueType *buffer, const bool cleaned=false)
 Lowest value of node. More...
 
void maximum (const GraphNode::ID &nodeID, const std::string &attribute, const DataType dataType, void *buffer, const bool cleaned=false)
 Highest value of node. More...
 
template<typename ValueType >
void maximum (const GraphNode::ID &nodeID, const std::string &attribute, ValueType &buffer, const bool cleaned=false)
 Highest value of node. More...
 
template<typename ValueType >
void maximum (const GraphNode::ID &nodeID, const std::string &attribute, ValueType *buffer, const bool cleaned=false)
 Highest value of node. More...
 
void revision (const GraphNode::ID &nodeID, const std::string &attribute, Transaction::ID &revision)
 Attribute revision. More...
 
Transaction::ID revision (const GraphNode::ID &nodeID, const std::string &attribute)
 

Detailed Description

Point statistics query.

This query provides point attribute statistics like minimum and maximum value.

See also
riegl::rdb::Pointcloud::stat()
Note
You either must delete the query object or call close() before the parent Pointcloud instance is closed/deleted!
Examples:
rdb-example-06-database-stat.cpp.

Definition at line 69 of file queryStat.hpp.

Constructor & Destructor Documentation

riegl::rdb::pointcloud::QueryStat::QueryStat ( )
explicit

Default constructor.

Creates a null query - i.e. the query cannot be used to read stats.

See also
riegl::rdb::Pointcloud::stat()
riegl::rdb::pointcloud::QueryStat::QueryStat ( riegl::rdb::PointcloudData *  pointcloud)
explicit

Constructor.

Creates a query prepared for reading stats.

Note
You cannot create new QueryStat objects this way, use riegl::rdb::Pointcloud::stat() instead.

Member Function Documentation

void riegl::rdb::pointcloud::QueryStat::close ( )

Finish query.

Call this function when done with reading stats.

void riegl::rdb::pointcloud::QueryStat::index ( GraphNode root,
const std::string &  filter = std::string() 
)

Get index graph.

This function returns a simple directed graph which represents the index structure that is used to organize the point cloud.

The optional filter expression can be used to select particular graph nodes - if no filter is given, all nodes will be returned. Filter expression syntax see riegl::rdb::Pointcloud::select().

Note: The reported point counts and attribute extents are not affected by the filter expressions given here or defined in the meta data item riegl.stored_filters.

Details see description of class GraphNode.

Parameters
[out]rootgraph root node
[in]filteroptional filter expression
Examples:
rdb-example-06-database-stat.cpp.
GraphNode riegl::rdb::pointcloud::QueryStat::index ( const std::string &  filter = std::string())
inline
Parameters
[in]filteroptional filter expression

Definition at line 132 of file queryStat.hpp.

void riegl::rdb::pointcloud::QueryStat::maximum ( const GraphNode::ID nodeID,
const std::string &  attribute,
const DataType  dataType,
void *  buffer,
const bool  cleaned = false 
)

Highest value of node.

Provides the attribute's maximum value of a branch (i.e. node and children). If the node ID is zero, then the maximum value of all points is returned.

The target buffer is expected to be s*d bytes large, where s is the size of one element as defined by 'dataType' and d is the number of attribute dimensions (elements).

Parameters
[in]nodeIDnode identifier
[in]attributeattribute name
[in]dataTypedata type of target buffer
[out]bufferbuffer for maximum value
[in]cleanedtrue: ignore invalid values
Examples:
rdb-example-06-database-stat.cpp.
template<typename ValueType >
void riegl::rdb::pointcloud::QueryStat::maximum ( const GraphNode::ID nodeID,
const std::string &  attribute,
ValueType &  buffer,
const bool  cleaned = false 
)
inline

Highest value of node.

Provides the attribute's maximum value of a branch (i.e. node and children). If the node ID is zero, then the maximum value of all points is returned.

The target buffer is expected to be s*d bytes large, where s is the size of one element as defined by 'dataType' and d is the number of attribute dimensions (elements).

Parameters
[in]nodeIDnode identifier
[in]attributeattribute name
[out]bufferbuffer (data, pointer to data, std::array or std::vector)
[in]cleanedtrue: ignore invalid values

Definition at line 203 of file queryStat.hpp.

template<typename ValueType >
void riegl::rdb::pointcloud::QueryStat::maximum ( const GraphNode::ID nodeID,
const std::string &  attribute,
ValueType *  buffer,
const bool  cleaned = false 
)
inline

Highest value of node.

Provides the attribute's maximum value of a branch (i.e. node and children). If the node ID is zero, then the maximum value of all points is returned.

The target buffer is expected to be s*d bytes large, where s is the size of one element as defined by 'dataType' and d is the number of attribute dimensions (elements).

Parameters
[in]nodeIDnode identifier
[in]attributeattribute name
[out]bufferbuffer (data, pointer to data, std::array or std::vector)
[in]cleanedtrue: ignore invalid values

Definition at line 215 of file queryStat.hpp.

void riegl::rdb::pointcloud::QueryStat::minimum ( const GraphNode::ID nodeID,
const std::string &  attribute,
const DataType  dataType,
void *  buffer,
const bool  cleaned = false 
)

Lowest value of node.

Provides the attribute's minimum value of a branch (i.e. node and children). If the node ID is zero, then the minimum value of all points is returned.

The target buffer is expected to be s*d bytes large, where s is the size of one element as defined by 'dataType' and d is the number of attribute dimensions (elements).

Parameters
[in]nodeIDnode identifier
[in]attributeattribute name
[in]dataTypedata type of target buffer
[out]bufferbuffer for minimum value
[in]cleanedtrue: ignore invalid values
Examples:
rdb-example-06-database-stat.cpp.
template<typename ValueType >
void riegl::rdb::pointcloud::QueryStat::minimum ( const GraphNode::ID nodeID,
const std::string &  attribute,
ValueType &  buffer,
const bool  cleaned = false 
)
inline

Lowest value of node.

Provides the attribute's minimum value of a branch (i.e. node and children). If the node ID is zero, then the minimum value of all points is returned.

The target buffer is expected to be s*d bytes large, where s is the size of one element as defined by 'dataType' and d is the number of attribute dimensions (elements).

Parameters
[in]nodeIDnode identifier
[in]attributeattribute name
[out]bufferbuffer (data, pointer to data, std::array or std::vector)
[in]cleanedtrue: ignore invalid values

Definition at line 161 of file queryStat.hpp.

template<typename ValueType >
void riegl::rdb::pointcloud::QueryStat::minimum ( const GraphNode::ID nodeID,
const std::string &  attribute,
ValueType *  buffer,
const bool  cleaned = false 
)
inline

Lowest value of node.

Provides the attribute's minimum value of a branch (i.e. node and children). If the node ID is zero, then the minimum value of all points is returned.

The target buffer is expected to be s*d bytes large, where s is the size of one element as defined by 'dataType' and d is the number of attribute dimensions (elements).

Parameters
[in]nodeIDnode identifier
[in]attributeattribute name
[out]bufferbuffer (data, pointer to data, std::array or std::vector)
[in]cleanedtrue: ignore invalid values

Definition at line 173 of file queryStat.hpp.

riegl::rdb::pointcloud::QueryStat::operator bool ( ) const

Check if query is not null.

See also
valid()
void riegl::rdb::pointcloud::QueryStat::revision ( const GraphNode::ID nodeID,
const std::string &  attribute,
Transaction::ID revision 
)

Attribute revision.

Provides the ID of the last transaction that has modified the attribute in any node of the given branch.

Parameters
[in]nodeIDnode identifier
[in]attributeattribute name
[out]revisiontransaction ID, see above
Transaction::ID riegl::rdb::pointcloud::QueryStat::revision ( const GraphNode::ID nodeID,
const std::string &  attribute 
)
inline
Parameters
[in]nodeIDnode identifier
[in]attributeattribute name

Definition at line 236 of file queryStat.hpp.

bool riegl::rdb::pointcloud::QueryStat::valid ( ) const

Check if query is not null.

A null query cannot be used to read stats.


The documentation for this class was generated from the following file: