|
Map of labels (object IDs) to number of points. More...
#include <VisionX/libraries/VoxelGrids/LabelDensity/VoxelGrid.h>
Public Member Functions | |
std::map< Label, float > | getDensity () const |
Get the relative frequency of labels, so that the sum is 1.0. More... | |
std::pair< Label, std::size_t > | getMax () const |
Get the label with most points and the number of points. More... | |
Label | getMaxLabel () const |
Get the label with most points. More... | |
std::size_t | getTotal () const |
Get the total number of points in this voxel. More... | |
bool | isFree () const |
Indicate whether this voxel is free, i.e. it contains no points. More... | |
bool | operator!= (const Voxel &rhs) const |
bool | operator== (const Voxel &rhs) const |
Equality operator. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Voxel &voxel) |
Outstream operator. More... | |
Map of labels (object IDs) to number of points.
Definition at line 27 of file VoxelGrid.h.
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.
Definition at line 30 of file VoxelGrid.cpp.
std::pair< Label, std::size_t > getMax | ( | ) | const |
Get the label with most points and the number of points.
Definition at line 47 of file VoxelGrid.cpp.
Label getMaxLabel | ( | ) | const |
Get the label with most points.
Definition at line 42 of file VoxelGrid.cpp.
std::size_t getTotal | ( | ) | const |
Get the total number of points in this voxel.
Definition at line 20 of file VoxelGrid.cpp.
bool isFree | ( | ) | const |
Indicate whether this voxel is free, i.e. it contains no points.
Definition at line 15 of file VoxelGrid.cpp.
bool operator!= | ( | const Voxel & | rhs | ) | const |
Definition at line 79 of file VoxelGrid.cpp.
bool operator== | ( | const Voxel & | rhs | ) | const |
Equality operator.
Considers a non-existent label and a label with count 0 equal.
Definition at line 52 of file VoxelGrid.cpp.
|
friend |
Outstream operator.
Definition at line 84 of file VoxelGrid.cpp.