Classes | Public Member Functions | Static Public Member Functions | List of all members
lvr2::Util Class Reference

A class that contains utility functions/types. More...

#include <Util.hpp>

Classes

struct  ColorVecCompare
 A comparison object for Vector<VecUChar> More...
 

Public Member Functions

template<typename T >
Transform< T > slam6d_to_riegl_transform (const Transform< T > &mat)
 Converts a transformation matrix that is used in slam6d coordinate system into a transformation matrix that is used in riegl coordinate system. More...
 

Static Public Member Functions

template<typename T >
static boost::shared_array< T > convert_vector_to_shared_array (std::vector< T > source)
 Creates a shared array with the data from the given vector. More...
 
template<typename ValueType >
static ValueType deg_to_rad (ValueType deg)
 Converts an angle from degree to radian. More...
 
static int getSpectralChannel (int wavelength, PointBufferPtr p, int fallback=-1)
 Returns the spectral channel index for a given wavelength. More...
 
static int getSpectralWavelength (int channel, PointBufferPtr p, int fallback=-1)
 For a given spectral channel it return the corresponding wavelength. More...
 
template<typename ValueType >
static ValueType rad_to_deg (ValueType rad)
 Converts an angle from radian to degree. More...
 
template<typename BaseVecT >
static Matrix4< BaseVecT > riegl_to_slam6d_transform (const Matrix4< BaseVecT > &in)
 Converts a transformation matrix that is used in riegl coordinate system into a transformation matrix that is used in slam6d coordinate system. More...
 
template<typename ValueType >
static BaseVector< ValueType > slam6d_to_riegl_point (const BaseVector< ValueType > &in)
 
static float wavelengthPerChannel (PointBufferPtr p)
 Calculates the wavelength distance between two spectral channels. More...
 

Detailed Description

A class that contains utility functions/types.

Definition at line 56 of file Util.hpp.

Member Function Documentation

◆ convert_vector_to_shared_array()

template<typename T >
static boost::shared_array<T> lvr2::Util::convert_vector_to_shared_array ( std::vector< T >  source)
inlinestatic

Creates a shared array with the data from the given vector.

Parameters
sourceThe vector from where the data will be copied
Returns
returns A shared array with a copy of the data from the given vector

Definition at line 108 of file Util.hpp.

◆ deg_to_rad()

template<typename ValueType >
static ValueType lvr2::Util::deg_to_rad ( ValueType  deg)
inlinestatic

Converts an angle from degree to radian.

Parameters
degAngle in degree
Returns
Angle in radians

Definition at line 202 of file Util.hpp.

◆ getSpectralChannel()

int lvr2::Util::getSpectralChannel ( int  wavelength,
PointBufferPtr  p,
int  fallback = -1 
)
static

Returns the spectral channel index for a given wavelength.

Parameters
wavelengthThe wavenlength
pA pointcloud pointer
fallbackA fallback that will be returned if something went wrong (default -1)
Returns
Returns for a wavelength the corresponding spectral channel index for the pointcloud or fallback if the pointcloud has no spectral channel data or the wavelength is not in the given range of the spectral channel data

Definition at line 35 of file Util.cpp.

◆ getSpectralWavelength()

int lvr2::Util::getSpectralWavelength ( int  channel,
PointBufferPtr  p,
int  fallback = -1 
)
static

For a given spectral channel it return the corresponding wavelength.

Parameters
channelThe spectral channel index
pA pointcloud pointer
fallbackA fallback that will be returned if something went wrong (default -1)
Returns
Returns for a spectral channel index the corresponding wavelength for the given pointcloud or fallback if the pointcloud has no spectral channel data or the spectral channel index is out of range.

Definition at line 55 of file Util.cpp.

◆ rad_to_deg()

template<typename ValueType >
static ValueType lvr2::Util::rad_to_deg ( ValueType  rad)
inlinestatic

Converts an angle from radian to degree.

Parameters
radAngle in radians
Returns
Angle in degree

Definition at line 215 of file Util.hpp.

◆ riegl_to_slam6d_transform()

template<typename BaseVecT >
static Matrix4<BaseVecT> lvr2::Util::riegl_to_slam6d_transform ( const Matrix4< BaseVecT > &  in)
inlinestatic

Converts a transformation matrix that is used in riegl coordinate system into a transformation matrix that is used in slam6d coordinate system.

Parameters
inThe transformation matrix in riegl coordinate system
Returns
The transformation matrix in slam6d coordinate system

Definition at line 125 of file Util.hpp.

◆ slam6d_to_riegl_point()

template<typename ValueType >
static BaseVector<ValueType> lvr2::Util::slam6d_to_riegl_point ( const BaseVector< ValueType > &  in)
inlinestatic

Definition at line 183 of file Util.hpp.

◆ slam6d_to_riegl_transform()

template<typename T >
Transform<T> lvr2::Util::slam6d_to_riegl_transform ( const Transform< T > &  mat)
inline

Converts a transformation matrix that is used in slam6d coordinate system into a transformation matrix that is used in riegl coordinate system.

Parameters
inThe transformation matrix in slam6d coordinate system
Returns
The transformation matrix in riegl coordinate system

Definition at line 158 of file Util.hpp.

◆ wavelengthPerChannel()

float lvr2::Util::wavelengthPerChannel ( PointBufferPtr  p)
static

Calculates the wavelength distance between two spectral channels.

Parameters
pThe pointcloud pointer
Returns
Returns the wavelength distance between two spectral channels and if the pointcloud has no spectral channel data it return -1

Definition at line 73 of file Util.cpp.


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:12