Voxel Class Reference

Map of labels (object IDs) to number of points. More...

#include <VisionX/libraries/VoxelGrids/LabelDensity/VoxelGrid.h>

+ Inheritance diagram for Voxel:

Public Member Functions

std::map< Label, float > getDensity () const
 Get the relative frequency of labels, so that the sum is 1.0.
 
std::pair< Label, std::size_t > getMax () const
 Get the label with most points and the number of points.
 
Label getMaxLabel () const
 Get the label with most points.
 
std::size_t getTotal () const
 Get the total number of points in this voxel.
 
bool isFree () const
 Indicate whether this voxel is free, i.e. it contains no points.
 
bool operator!= (const Voxel &rhs) const
 
bool operator== (const Voxel &rhs) const
 Equality operator.
 

Friends

std::ostream & operator<< (std::ostream &os, const Voxel &voxel)
 Outstream operator.
 

Detailed Description

Map of labels (object IDs) to number of points.

Member Function Documentation

◆ getDensity()

std::map< Label, float > getDensity ( ) const

Get the relative frequency of labels, so that the sum is 1.0.

If getTotal() is 0, the total of the returned density is also 0.0.

◆ getMax()

std::pair< Label, std::size_t > getMax ( ) const

Get the label with most points and the number of points.

◆ getMaxLabel()

Label getMaxLabel ( ) const

Get the label with most points.

◆ getTotal()

std::size_t getTotal ( ) const

Get the total number of points in this voxel.

◆ isFree()

bool isFree ( ) const

Indicate whether this voxel is free, i.e. it contains no points.

◆ operator!=()

bool operator!= ( const Voxel & rhs) const

◆ operator==()

bool operator== ( const Voxel & rhs) const

Equality operator.

Considers a non-existent label and a label with count 0 equal.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const Voxel & voxel )
friend

Outstream operator.


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