Go to the documentation of this file.
35 #ifndef _LVR2_RECONSTRUCTION_HASHGRID_H_
36 #define _LVR2_RECONSTRUCTION_HASHGRID_H_
38 #include <unordered_map>
49 using std::unordered_map;
70 virtual void addLatticePoint(
int i,
int j,
int k,
float distance = 0.0) = 0;
93 template<
typename BaseVecT,
typename BoxT>
103 typedef unordered_map<size_t, size_t>
qp_map;
106 typedef typename unordered_map<size_t, BoxT*>::iterator
box_map_it;
166 HashGrid(std::vector<PointBufferPtr> chunks,
179 virtual void addLatticePoint(
int i,
int j,
int k,
float distance = 0.0);
283 return f < 0 ? f - .5 : f + .5;
327 #include "HashGrid.tcc"
unordered_map< size_t, BoxT * >::iterator box_map_it
Typedef to alias iterators for box maps.
BoundingBox< BaseVecT > qp_bb
GridBase(bool extrude=true)
size_t m_maxIndexX
The maximal index in x direction.
float m_voxelsize
The voxelsize used for reconstruction.
BaseVecT m_coordinateScales
Save scaling factors (i.e., -1 or +1) to mapp different coordinate systems.
virtual void saveGrid(string file)
Saves a representation of the grid to the given file.
size_t hashValue(int i, int j, int k) const
Calculates the hash value for the given index triple.
vector< QueryPoint< BaseVecT > >::iterator query_point_it
Typedef to alias iterators to query points.
virtual void addLatticePoint(int i, int j, int k, float distance=0.0)=0
query_point_it lastQueryPoint()
size_t m_maxIndexY
The maximal index in y direction.
virtual void serialize(string file)
void setBB(BoundingBox< BaseVecT > &bb)
vector< QueryPoint< BaseVecT > > & getQueryPoints()
BoundingBox< BaseVecT > m_boundingBox
Bounding box of the covered volume.
void setCoordinateScaling(float x, float y, float z)
Set x, y, z values to scale the scene or use combinations of +/-1 to mapp different coordinate system...
void saveCells(string file)
Saves a representation of the cells to the given file.
query_point_it firstQueryPoint()
void calcIndices()
Calculates needed lattice parameters.
virtual void saveGrid(string file)=0
Saves a representation of the grid to the given file.
size_t getNumberOfCells()
A dynamic bounding box class.
size_t m_maxIndexZ
The maximal index in z direction.
unordered_map< size_t, BoxT * > box_map
Typedef to alias box map.
size_t m_maxIndex
The absolute maximal index of the reconstruction grid.
string m_boxType
True if a local tetraeder decomposition is used for reconstruction.
virtual void addLatticePoint(int i, int j, int k, float distance=0.0)
virtual void setExtrusion(bool extrude)
BoundingBox< BaseVecT > & getBoundingBox()
HashGrid(float cellSize, BoundingBox< BaseVecT > boundingBox, bool isVoxelSize=true, bool extrude=true)
unordered_map< size_t, size_t > qp_map
unsigned int findQueryPoint(int position, int x, int y, int z)
Searches for a existing shared lattice point in the grid.
box_map m_cells
Map to handle the boxes in the grid.
unsigned int m_globalIndex
The maximum used cell index within the grid.
vector< QueryPoint< BaseVecT > > m_queryPoints
A vector containing the query points for the reconstruction.
size_t m_maxIndexSquare
The squared maximal index of the reconstruction grid.
lvr2
Author(s): Thomas Wiemann
, Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:23