#include <perfect_spatial_hashing.h>
Public Member Functions | |
void | Allocate (const int size) |
BinaryImage () | |
void | Clear () |
bool | ContainsData (const typename UniformGrid::CellCoordinate &at) const |
bool | GetFlag (const typename UniformGrid::CellCoordinate &at) const |
bool & | GetFlag (const int i, const int j, const int k) const |
int | GetResolution () const |
bool | operator() (const int i, const int j, const int k) |
bool | operator[] (const typename UniformGrid::CellCoordinate &at) |
void | SetFlag (const typename UniformGrid::CellCoordinate &at) |
void | SetFlat (const int i, const int j, const int k) |
~BinaryImage () | |
Protected Attributes | |
std::vector< std::vector < std::vector< bool > > > | m_Mask |
int | m_Resolution |
This class is used to encode the sparsity of the dataset. Since the hash table stores data associated with a sparse subset of the domain, it may be necessary to determine if an arbitrary query point lies in this defined domain.
Definition at line 935 of file perfect_spatial_hashing.h.
vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::BinaryImage::BinaryImage | ( | ) | [inline] |
Default constructor
Definition at line 941 of file perfect_spatial_hashing.h.
vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::BinaryImage::~BinaryImage | ( | ) | [inline] |
Destructor
Definition at line 950 of file perfect_spatial_hashing.h.
void vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::BinaryImage::Allocate | ( | const int | size | ) | [inline] |
Allocate the space necessary to encode the distribution of the dataset over the domain.
[in] | size | The resolution on each dimension of the bitmap. |
Definition at line 957 of file perfect_spatial_hashing.h.
void vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::BinaryImage::Clear | ( | void | ) | [inline] |
Removes all flags from the bitmap. This function is called after a failed attempt to create the offset-table.
Definition at line 973 of file perfect_spatial_hashing.h.
bool vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::BinaryImage::ContainsData | ( | const typename UniformGrid::CellCoordinate & | at | ) | const [inline] |
Checks if a portion of the dataset fall inside the UniformGrid cell having coordinate at
.
[in] | at | The index of the UniformGrid cell to check. |
true
if and only if a portion of the dataset in included in this UniformGrid cell. Definition at line 986 of file perfect_spatial_hashing.h.
bool vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::BinaryImage::GetFlag | ( | const typename UniformGrid::CellCoordinate & | at | ) | const [inline] |
Definition at line 1016 of file perfect_spatial_hashing.h.
bool& vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::BinaryImage::GetFlag | ( | const int | i, | |
const int | j, | |||
const int | k | |||
) | const [inline] |
Definition at line 1012 of file perfect_spatial_hashing.h.
int vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::BinaryImage::GetResolution | ( | ) | const [inline] |
Returns the number of entries in each dimension.
Definition at line 993 of file perfect_spatial_hashing.h.
bool vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::BinaryImage::operator() | ( | const int | i, | |
const int | j, | |||
const int | k | |||
) | [inline] |
Return the value stored in the d-dimensional bitmap at the given position.
[in] | i | |
[in] | j | |
[in] | k |
Definition at line 1003 of file perfect_spatial_hashing.h.
bool vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::BinaryImage::operator[] | ( | const typename UniformGrid::CellCoordinate & | at | ) | [inline] |
Return the value stored at the given position in the d-dimensional bitmap.
[in] | at |
Definition at line 1011 of file perfect_spatial_hashing.h.
void vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::BinaryImage::SetFlag | ( | const typename UniformGrid::CellCoordinate & | at | ) | [inline] |
Definition at line 1017 of file perfect_spatial_hashing.h.
void vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::BinaryImage::SetFlat | ( | const int | i, | |
const int | j, | |||
const int | k | |||
) | [inline] |
Definition at line 1013 of file perfect_spatial_hashing.h.
std::vector< std::vector< std::vector< bool > > > vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::BinaryImage::m_Mask [protected] |
The bitmap image.
Definition at line 1021 of file perfect_spatial_hashing.h.
int vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::BinaryImage::m_Resolution [protected] |
The resolution of the bitmap.
Definition at line 1022 of file perfect_spatial_hashing.h.