Public Member Functions | Private Member Functions | Private Attributes

lssr::UosIO< T > Class Template Reference

An input class for laser scans in UOS 3d format. More...

#include <UosIO.hpp>

List of all members.

Public Member Functions

 UosIO ()
 Contructor.
T ** read (string dir, size_t &n)
 Reads all scans or an specified range of scans from the given directory.
void setFirstScan (int n)
 Defines the first scan to read.
void setLastScan (int n)
 Defines the last scan to read.

Private Member Functions

T ** readNewFormat (string dir, int first, int last, size_t &n)
 Reads scans from first} to last} in new UOS format.
T ** readOldFormat (string dir, int first, int last, size_t &n)
 Reads scans from first} to last} in old UOS format.
Matrix4< float > parseFrameFile (ifstream &frameFile)
 Creates a transformation matrix from given frame file.
std::string to_string (const T &t, int width)
std::string to_string (const T &t)
rad (const T deg)
deg (const T rad)

Private Attributes

int m_firstScan
 The first scan to read (or -1 if all scans should be processed).
int m_lastScan
 The last scan to read (or -1 if all scans should be processed).

Detailed Description

template<typename T>
class lssr::UosIO< T >

An input class for laser scans in UOS 3d format.

Per default, this class tries to read all scans in the given directory. If you don't want to specify which scans to read, use the setFirstScan} and setLastScan} methods to specify an interval to read. If .frame files are present, the single scans will be transformed according to the last transformation in the file. If no .frame file are present, the .pose files will be sued to transform the scans.

Definition at line 34 of file UosIO.hpp.


Constructor & Destructor Documentation

template<typename T >
lssr::UosIO< T >::UosIO (  )  [inline]

Contructor.

Definition at line 41 of file UosIO.hpp.


Member Function Documentation

template<typename T >
T lssr::UosIO< T >::deg ( const T  rad  )  [inline, private]

Converts an angle (given in rad) to deg

Parameters:
rad angle in rad
Returns:
angle in deg

Definition at line 127 of file UosIO.hpp.

template<typename T >
Matrix4<float> lssr::UosIO< T >::parseFrameFile ( ifstream &  frameFile  )  [private]

Creates a transformation matrix from given frame file.

Parameters:
frameFile 
Returns:
A matrix representing the final transformation from a frame file
template<typename T >
T lssr::UosIO< T >::rad ( const T  deg  )  [inline, private]

Converts an angle (given in deg) to rad

Parameters:
deg integer indicating, whether the figure to be drawn to show the clusters should be circles (0) or rectangles(1)
Returns:
the clustered image, with the clusters marked by colored figures

Definition at line 116 of file UosIO.hpp.

template<typename T >
T** lssr::UosIO< T >::read ( string  dir,
size_t &  n 
)

Reads all scans or an specified range of scans from the given directory.

Parameters:
dir A directory containing scans in UOS format.
Returns:
An indexed array of scan points
template<typename T >
T** lssr::UosIO< T >::readNewFormat ( string  dir,
int  first,
int  last,
size_t &  n 
) [private]

Reads scans from first} to last} in new UOS format.

Parameters:
dir The directory path
first The first scan to read
last The last scan to read
Returns:
All read data points
template<typename T >
T** lssr::UosIO< T >::readOldFormat ( string  dir,
int  first,
int  last,
size_t &  n 
) [private]

Reads scans from first} to last} in old UOS format.

Parameters:
dir The directory path
first The first scan to read
last The last scan to read
Returns:
All read data points
template<typename T >
void lssr::UosIO< T >::setFirstScan ( int  n  )  [inline]

Defines the first scan to read.

Parameters:
n The first scan to read

Definition at line 56 of file UosIO.hpp.

template<typename T >
void lssr::UosIO< T >::setLastScan ( int  n  )  [inline]

Defines the last scan to read.

Parameters:
n The last scan to read

Definition at line 62 of file UosIO.hpp.

template<typename T >
std::string lssr::UosIO< T >::to_string ( const T &  t  )  [inline, private]

Definition at line 100 of file UosIO.hpp.

template<typename T >
std::string lssr::UosIO< T >::to_string ( const T &  t,
int  width 
) [inline, private]

Definition at line 93 of file UosIO.hpp.


Member Data Documentation

template<typename T >
int lssr::UosIO< T >::m_firstScan [private]

The first scan to read (or -1 if all scans should be processed).

Definition at line 134 of file UosIO.hpp.

template<typename T >
int lssr::UosIO< T >::m_lastScan [private]

The last scan to read (or -1 if all scans should be processed).

Definition at line 137 of file UosIO.hpp.


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