Class Util

Nested Relationships

Nested Types

Class Documentation

class Util

A class that contains utility functions/types.

Public Functions

template<typename T>
inline 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.

Parameters:

in – The transformation matrix in slam6d coordinate system

Returns:

The transformation matrix in riegl coordinate system

Public Static Functions

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

Returns the spectral channel index for a given wavelength.

Parameters:
  • wavelength – The wavenlength

  • p – A pointcloud pointer

  • fallback – A 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

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

For a given spectral channel it return the corresponding wavelength.

Parameters:
  • channel – The spectral channel index

  • p – A pointcloud pointer

  • fallback – A 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.

static float wavelengthPerChannel(PointBufferPtr p)

Calculates the wavelength distance between two spectral channels.

Parameters:

p – The pointcloud pointer

Returns:

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

template<typename T>
static inline boost::shared_array<T> convert_vector_to_shared_array(std::vector<T> source)

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

Parameters:

source – The vector from where the data will be copied

Returns:

returns A shared array with a copy of the data from the given vector

template<typename BaseVecT>
static inline 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.

Parameters:

in – The transformation matrix in riegl coordinate system

Returns:

The transformation matrix in slam6d coordinate system

template<typename ValueType>
static inline BaseVector<ValueType> slam6d_to_riegl_point(const BaseVector<ValueType> &in)
template<typename ValueType>
static inline ValueType deg_to_rad(ValueType deg)

Converts an angle from degree to radian.

Parameters:

deg – Angle in degree

Returns:

Angle in radians

template<typename ValueType>
static inline ValueType rad_to_deg(ValueType rad)

Converts an angle from radian to degree.

Parameters:

rad – Angle in radians

Returns:

Angle in degree

template<typename BaseVecT>
static inline Vector3<typename BaseVecT::CoordType> to_eigen(const BaseVecT &vec) noexcept

Convert a BaseVecT to Eigen::Vector3.

Parameters:

vec – The BaseVec to convert to eigen

Returns:

Returns the vector as an Eigen::Vector3 object

struct ColorVecCompare

A comparison object for Vector<VecUChar>

Public Functions

inline bool operator()(const VecUChar &lhs, const VecUChar &rhs) const

Comparison operator.

Parameters:
  • lhs – The first object for comparison

  • rhs – The second object for comparison

Returns:

Returns true if lhs is smaller and elsewise false