Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes

lssr::FastReconstruction< VertexT, NormalT > Class Template Reference

A surface reconstruction object that implements the standard marching cubes algorithm using a hashed grid structure for parallel computation. More...

#include <FastReconstruction.hpp>

Inheritance diagram for lssr::FastReconstruction< VertexT, NormalT >:
Inheritance graph
[legend]
Collaboration diagram for lssr::FastReconstruction< VertexT, NormalT >:
Collaboration graph
[legend]

List of all members.

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.

Detailed Description

template<typename VertexT, typename NormalT>
class lssr::FastReconstruction< VertexT, NormalT >

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.


Constructor & Destructor Documentation

template<typename VertexT, typename NormalT>
lssr::FastReconstruction< VertexT, NormalT >::FastReconstruction ( PointCloudManager< VertexT, NormalT > &  manager,
float  resolution,
bool  isVoxelsize = false 
)

Constructor.

Parameters:
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
template<typename VertexT, typename NormalT>
virtual lssr::FastReconstruction< VertexT, NormalT >::~FastReconstruction (  )  [inline, virtual]

Destructor.

Definition at line 50 of file FastReconstruction.hpp.


Member Function Documentation

template<typename VertexT, typename NormalT>
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.

template<typename VertexT, typename NormalT>
void lssr::FastReconstruction< VertexT, NormalT >::calcIndices (  )  [private]

Calculates the maximal grid indices.

template<typename VertexT, typename NormalT>
void lssr::FastReconstruction< VertexT, NormalT >::calcQueryPointValues (  )  [private]

Calculates the distance for all generated query points.

template<typename VertexT, typename NormalT>
void lssr::FastReconstruction< VertexT, NormalT >::createGrid (  )  [private]

Creates the needed query points for the reconstruction processs.

template<typename VertexT, typename NormalT>
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.

Parameters:
position The box corner index
i,j,k A triple that identifies a cell in the grid
Returns:
The index of an existing query point or -1 if no point corresponding to the given position exists.
template<typename VertexT, typename NormalT>
virtual void lssr::FastReconstruction< VertexT, NormalT >::getMesh ( BaseMesh< VertexT, NormalT > &  mesh  )  [virtual]

Returns the surface reconstruction of the given point set.

Parameters:
mesh 

Implements lssr::Reconstructor< VertexT, NormalT >.

Here is the caller graph for this function:

template<typename VertexT, typename 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.


Member Data Documentation

template<typename VertexT, typename NormalT>
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.

template<typename VertexT , typename NormalT >
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.

template<typename VertexT, typename NormalT>
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.

template<typename VertexT, typename NormalT>
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.

template<typename VertexT, typename NormalT>
size_t lssr::FastReconstruction< VertexT, NormalT >::m_maxIndexX [private]

The maximal index in x direction.

Definition at line 117 of file FastReconstruction.hpp.

template<typename VertexT, typename NormalT>
size_t lssr::FastReconstruction< VertexT, NormalT >::m_maxIndexY [private]

The maximal index in y direction.

Definition at line 120 of file FastReconstruction.hpp.

template<typename VertexT, typename NormalT>
size_t lssr::FastReconstruction< VertexT, NormalT >::m_maxIndexZ [private]

The maximal index in z direction.

Definition at line 123 of file FastReconstruction.hpp.

template<typename VertexT, typename NormalT>
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.

template<typename VertexT, typename NormalT>
float lssr::FastReconstruction< VertexT, NormalT >::m_voxelsize [private]

The voxelsize used for reconstruction.

Definition at line 108 of file FastReconstruction.hpp.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Defines