A surface reconstruction object that implements the standard marching cubes algorithm using a hashed grid structure for parallel computation. More...
#include <FastReconstruction.hpp>
Public Member Functions | |
FastReconstruction (PointCloudManager< VertexT, NormalT > &manager, float resolution, bool isVoxelsize=false) | |
Constructor. | |
virtual | ~FastReconstruction () |
Destructor. | |
virtual void | getMesh (BaseMesh< VertexT, NormalT > &mesh) |
Returns the surface reconstruction of the given point set. | |
Protected Attributes | |
PointCloudManager< VertexT, NormalT > & | m_manager |
The point cloud manager that handles the loaded point cloud data. | |
Private Member Functions | |
void | calcIndices () |
Calculates the maximal grid indices. | |
void | createGrid () |
Creates the needed query points for the reconstruction processs. | |
void | calcQueryPointValues () |
Calculates the distance for all generated query points. | |
uint | findQueryPoint (const int &position, const int &i, const int &j, const int &k) |
Tries to find an existing query point in the grid for the virtual box corner (1..8) for the cell at (i, j, k) in the grid. | |
size_t | hashValue (int i, int j, int k) const |
Calculates the hash value for the given index tripel. | |
int | calcIndex (float f) |
Rounds the given value to the neares integer value. | |
Private Attributes | |
float | m_voxelsize |
The voxelsize used for reconstruction. | |
size_t | m_maxIndex |
The absolute maximal index of the reconstruction grid. | |
size_t | m_maxIndexSquare |
The squared maximal index of the reconstruction grid. | |
size_t | m_maxIndexX |
The maximal index in x direction. | |
size_t | m_maxIndexY |
The maximal index in y direction. | |
size_t | m_maxIndexZ |
The maximal index in z direction. | |
hash_map< size_t, FastBox < VertexT, NormalT > * > | m_cells |
A hahs map to store the created grid cells. | |
vector< QueryPoint< VertexT > > | m_queryPoints |
A vector containing the query points for the reconstruction. |
A surface reconstruction object that implements the standard marching cubes algorithm using a hashed grid structure for parallel computation.
Definition at line 30 of file FastReconstruction.hpp.
lssr::FastReconstruction< VertexT, NormalT >::FastReconstruction | ( | PointCloudManager< VertexT, NormalT > & | manager, | |
float | resolution, | |||
bool | isVoxelsize = false | |||
) |
Constructor.
manager | A point cloud manager instance | |
resolution | The number of intersections (on the longest side of the volume taken by the data points) used by the reconstruction. | |
isVoxelsize | If set to true, interpret resolution as voxelsize instead of number of intersections |
virtual lssr::FastReconstruction< VertexT, NormalT >::~FastReconstruction | ( | ) | [inline, virtual] |
Destructor.
Definition at line 50 of file FastReconstruction.hpp.
int lssr::FastReconstruction< VertexT, NormalT >::calcIndex | ( | float | f | ) | [inline, private] |
Rounds the given value to the neares integer value.
Definition at line 102 of file FastReconstruction.hpp.
void lssr::FastReconstruction< VertexT, NormalT >::calcIndices | ( | ) | [private] |
Calculates the maximal grid indices.
void lssr::FastReconstruction< VertexT, NormalT >::calcQueryPointValues | ( | ) | [private] |
Calculates the distance for all generated query points.
void lssr::FastReconstruction< VertexT, NormalT >::createGrid | ( | ) | [private] |
Creates the needed query points for the reconstruction processs.
uint lssr::FastReconstruction< VertexT, NormalT >::findQueryPoint | ( | const int & | position, | |
const int & | i, | |||
const int & | j, | |||
const int & | k | |||
) | [private] |
Tries to find an existing query point in the grid for the virtual box corner (1..8) for the cell at (i, j, k) in the grid.
position | The box corner index | |
i,j,k | A triple that identifies a cell in the grid |
virtual void lssr::FastReconstruction< VertexT, NormalT >::getMesh | ( | BaseMesh< VertexT, NormalT > & | mesh | ) | [virtual] |
Returns the surface reconstruction of the given point set.
mesh |
Implements lssr::Reconstructor< VertexT, NormalT >.
size_t lssr::FastReconstruction< VertexT, NormalT >::hashValue | ( | int | i, | |
int | j, | |||
int | k | |||
) | const [inline, private] |
Calculates the hash value for the given index tripel.
Definition at line 94 of file FastReconstruction.hpp.
hash_map<size_t, FastBox<VertexT, NormalT>* > lssr::FastReconstruction< VertexT, NormalT >::m_cells [private] |
A hahs map to store the created grid cells.
Definition at line 126 of file FastReconstruction.hpp.
PointCloudManager<VertexT, NormalT>& lssr::Reconstructor< VertexT, NormalT >::m_manager [protected, inherited] |
The point cloud manager that handles the loaded point cloud data.
Definition at line 44 of file Reconstructor.hpp.
size_t lssr::FastReconstruction< VertexT, NormalT >::m_maxIndex [private] |
The absolute maximal index of the reconstruction grid.
Definition at line 111 of file FastReconstruction.hpp.
size_t lssr::FastReconstruction< VertexT, NormalT >::m_maxIndexSquare [private] |
The squared maximal index of the reconstruction grid.
Definition at line 114 of file FastReconstruction.hpp.
size_t lssr::FastReconstruction< VertexT, NormalT >::m_maxIndexX [private] |
The maximal index in x direction.
Definition at line 117 of file FastReconstruction.hpp.
size_t lssr::FastReconstruction< VertexT, NormalT >::m_maxIndexY [private] |
The maximal index in y direction.
Definition at line 120 of file FastReconstruction.hpp.
size_t lssr::FastReconstruction< VertexT, NormalT >::m_maxIndexZ [private] |
The maximal index in z direction.
Definition at line 123 of file FastReconstruction.hpp.
vector<QueryPoint<VertexT> > lssr::FastReconstruction< VertexT, NormalT >::m_queryPoints [private] |
A vector containing the query points for the reconstruction.
Definition at line 129 of file FastReconstruction.hpp.
float lssr::FastReconstruction< VertexT, NormalT >::m_voxelsize [private] |
The voxelsize used for reconstruction.
Definition at line 108 of file FastReconstruction.hpp.