Public Member Functions | Private Member Functions | Private Attributes | List of all members
lvr2::ClSurface Class Reference

#include <ClSurface.hpp>

Public Member Functions

void calculateNormals ()
 Starts calculation the normals on GPU. More...
 
 ClSurface (floatArr &points, size_t num_points, int device=0)
 
void distances (std::vector< QueryPoint< Vec > > &query_points, float voxel_size)
 
void freeGPU ()
 
void getNormals (floatArr output_normals)
 Get the resulting normals of the normal calculation. After calling "start". More...
 
void setFlippoint (float v_x, float v_y, float v_z)
 Set the viewpoint to orientate the normals. More...
 
void setKd (int kd)
 Set the number of k nearest neighbors k-neighborhood for distance. More...
 
void setKi (int ki)
 Set the number of k nearest neighbors k-neighborhood for interpolation. More...
 
void setKn (int kn)
 Set the number of k nearest neighbors k-neighborhood. More...
 
void setMethod (std::string method)
 Set Method for normal calculation. More...
 
void setReconstructionMode (bool mode=true)
 
 ~ClSurface ()
 

Private Member Functions

void finalizeCl ()
 
void getDeviceInformation (int platform_id=0, int device_id=0)
 
const char * getErrorString (cl_int error)
 
void init ()
 PRIVATE ///. More...
 
void initCl ()
 
void initKdTree ()
 
void loadEstimationKernel ()
 
void loadInterpolationKernel ()
 

Private Attributes

cl_mem D_kd_tree_splits
 
cl_mem D_kd_tree_values
 
cl_mem D_Normals
 
cl_mem D_V
 
boost::shared_ptr< LBKdTreekd_tree_gen
 
LBPointArray< unsigned char > * kd_tree_splits
 
LBPointArray< float > * kd_tree_values
 
int m_calc_method
 
cl_command_queue m_command_queue
 
cl_context m_context
 
cl_ulong m_device_global_memory
 
cl_device_id m_device_id
 
int m_k
 
int m_kd
 
cl_kernel m_kernel_normal_estimation
 
cl_kernel m_kernel_normal_interpolation
 
int m_ki
 
cl_uint m_mps
 
cl_platform_id m_platform_id
 
cl_program m_program_es
 
cl_program m_program_in
 
bool m_reconstruction_mode
 
cl_int m_ret
 
cl_uint m_threads_per_block
 
float m_vx
 
float m_vy
 
float m_vz
 
const char * NORMAL_ESTIMATION_KERNEL_STRING
 
const char * NORMAL_INTERPOLATION_KERNEL_STRING
 
LBPointArray< float > Result_Normals
 
LBPointArray< float > V
 

Detailed Description

Definition at line 63 of file ClSurface.hpp.

Constructor & Destructor Documentation

◆ ClSurface()

lvr2::ClSurface::ClSurface ( floatArr points,
size_t  num_points,
int  device = 0 
)

Definition at line 34 of file ClSurface.cpp.

◆ ~ClSurface()

lvr2::ClSurface::~ClSurface ( )

Definition at line 55 of file ClSurface.cpp.

Member Function Documentation

◆ calculateNormals()

void lvr2::ClSurface::calculateNormals ( )

Starts calculation the normals on GPU.

Definition at line 62 of file ClSurface.cpp.

◆ distances()

void lvr2::ClSurface::distances ( std::vector< QueryPoint< Vec > > &  query_points,
float  voxel_size 
)

TODO: Implement

Definition at line 223 of file ClSurface.cpp.

◆ finalizeCl()

void lvr2::ClSurface::finalizeCl ( )
private

Definition at line 276 of file ClSurface.cpp.

◆ freeGPU()

void lvr2::ClSurface::freeGPU ( )

Definition at line 228 of file ClSurface.cpp.

◆ getDeviceInformation()

void lvr2::ClSurface::getDeviceInformation ( int  platform_id = 0,
int  device_id = 0 
)
private

Definition at line 460 of file ClSurface.cpp.

◆ getErrorString()

const char * lvr2::ClSurface::getErrorString ( cl_int  error)
private

Definition at line 382 of file ClSurface.cpp.

◆ getNormals()

void lvr2::ClSurface::getNormals ( floatArr  output_normals)

Get the resulting normals of the normal calculation. After calling "start".

Parameters
output_normalsPointArray as return value

Definition at line 177 of file ClSurface.cpp.

◆ init()

void lvr2::ClSurface::init ( )
private

PRIVATE ///.

Definition at line 235 of file ClSurface.cpp.

◆ initCl()

void lvr2::ClSurface::initCl ( )
private

Definition at line 261 of file ClSurface.cpp.

◆ initKdTree()

void lvr2::ClSurface::initKdTree ( )
private

Definition at line 253 of file ClSurface.cpp.

◆ loadEstimationKernel()

void lvr2::ClSurface::loadEstimationKernel ( )
private

Definition at line 296 of file ClSurface.cpp.

◆ loadInterpolationKernel()

void lvr2::ClSurface::loadInterpolationKernel ( )
private

Definition at line 340 of file ClSurface.cpp.

◆ setFlippoint()

void lvr2::ClSurface::setFlippoint ( float  v_x,
float  v_y,
float  v_z 
)

Set the viewpoint to orientate the normals.

Parameters
v_xCoordinate X axis
v_yCoordinate Y axis
v_zCoordinate Z axis

Definition at line 200 of file ClSurface.cpp.

◆ setKd()

void lvr2::ClSurface::setKd ( int  kd)

Set the number of k nearest neighbors k-neighborhood for distance.

Parameters
kThe size of the used k-neighborhood

Definition at line 195 of file ClSurface.cpp.

◆ setKi()

void lvr2::ClSurface::setKi ( int  ki)

Set the number of k nearest neighbors k-neighborhood for interpolation.

Parameters
kThe size of the used k-neighborhood

Definition at line 190 of file ClSurface.cpp.

◆ setKn()

void lvr2::ClSurface::setKn ( int  kn)

Set the number of k nearest neighbors k-neighborhood.

Parameters
kThe size of the used k-neighborhood

Definition at line 185 of file ClSurface.cpp.

◆ setMethod()

void lvr2::ClSurface::setMethod ( std::string  method)

Set Method for normal calculation.

Parameters
method"PCA","RANSAC"

Definition at line 207 of file ClSurface.cpp.

◆ setReconstructionMode()

void lvr2::ClSurface::setReconstructionMode ( bool  mode = true)

Reconstuction Mode: Points stay in gpu until reconstruction is finished

Definition at line 218 of file ClSurface.cpp.

Member Data Documentation

◆ D_kd_tree_splits

cl_mem lvr2::ClSurface::D_kd_tree_splits
private

Definition at line 189 of file ClSurface.hpp.

◆ D_kd_tree_values

cl_mem lvr2::ClSurface::D_kd_tree_values
private

Definition at line 188 of file ClSurface.hpp.

◆ D_Normals

cl_mem lvr2::ClSurface::D_Normals
private

Definition at line 190 of file ClSurface.hpp.

◆ D_V

cl_mem lvr2::ClSurface::D_V
private

Definition at line 187 of file ClSurface.hpp.

◆ kd_tree_gen

boost::shared_ptr<LBKdTree> lvr2::ClSurface::kd_tree_gen
private

Definition at line 164 of file ClSurface.hpp.

◆ kd_tree_splits

LBPointArray<unsigned char>* lvr2::ClSurface::kd_tree_splits
private

Definition at line 161 of file ClSurface.hpp.

◆ kd_tree_values

LBPointArray<float>* lvr2::ClSurface::kd_tree_values
private

Definition at line 160 of file ClSurface.hpp.

◆ m_calc_method

int lvr2::ClSurface::m_calc_method
private

Definition at line 170 of file ClSurface.hpp.

◆ m_command_queue

cl_command_queue lvr2::ClSurface::m_command_queue
private

Definition at line 181 of file ClSurface.hpp.

◆ m_context

cl_context lvr2::ClSurface::m_context
private

Definition at line 180 of file ClSurface.hpp.

◆ m_device_global_memory

cl_ulong lvr2::ClSurface::m_device_global_memory
private

Definition at line 178 of file ClSurface.hpp.

◆ m_device_id

cl_device_id lvr2::ClSurface::m_device_id
private

Definition at line 175 of file ClSurface.hpp.

◆ m_k

int lvr2::ClSurface::m_k
private

Definition at line 167 of file ClSurface.hpp.

◆ m_kd

int lvr2::ClSurface::m_kd
private

Definition at line 167 of file ClSurface.hpp.

◆ m_kernel_normal_estimation

cl_kernel lvr2::ClSurface::m_kernel_normal_estimation
private

Definition at line 184 of file ClSurface.hpp.

◆ m_kernel_normal_interpolation

cl_kernel lvr2::ClSurface::m_kernel_normal_interpolation
private

Definition at line 185 of file ClSurface.hpp.

◆ m_ki

int lvr2::ClSurface::m_ki
private

Definition at line 167 of file ClSurface.hpp.

◆ m_mps

cl_uint lvr2::ClSurface::m_mps
private

Definition at line 176 of file ClSurface.hpp.

◆ m_platform_id

cl_platform_id lvr2::ClSurface::m_platform_id
private

Definition at line 174 of file ClSurface.hpp.

◆ m_program_es

cl_program lvr2::ClSurface::m_program_es
private

Definition at line 182 of file ClSurface.hpp.

◆ m_program_in

cl_program lvr2::ClSurface::m_program_in
private

Definition at line 183 of file ClSurface.hpp.

◆ m_reconstruction_mode

bool lvr2::ClSurface::m_reconstruction_mode
private

Definition at line 171 of file ClSurface.hpp.

◆ m_ret

cl_int lvr2::ClSurface::m_ret
private

Definition at line 179 of file ClSurface.hpp.

◆ m_threads_per_block

cl_uint lvr2::ClSurface::m_threads_per_block
private

Definition at line 177 of file ClSurface.hpp.

◆ m_vx

float lvr2::ClSurface::m_vx
private

Definition at line 166 of file ClSurface.hpp.

◆ m_vy

float lvr2::ClSurface::m_vy
private

Definition at line 166 of file ClSurface.hpp.

◆ m_vz

float lvr2::ClSurface::m_vz
private

Definition at line 166 of file ClSurface.hpp.

◆ NORMAL_ESTIMATION_KERNEL_STRING

const char* lvr2::ClSurface::NORMAL_ESTIMATION_KERNEL_STRING
private

Definition at line 193 of file ClSurface.hpp.

◆ NORMAL_INTERPOLATION_KERNEL_STRING

const char* lvr2::ClSurface::NORMAL_INTERPOLATION_KERNEL_STRING
private

Definition at line 337 of file ClSurface.hpp.

◆ Result_Normals

LBPointArray<float> lvr2::ClSurface::Result_Normals
private

Definition at line 163 of file ClSurface.hpp.

◆ V

LBPointArray<float> lvr2::ClSurface::V
private

Definition at line 159 of file ClSurface.hpp.


The documentation for this class was generated from the following files:


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 Mon Feb 28 2022 22:46:11