Class UosIO

Inheritance Relationships

Base Type

Class Documentation

class UosIO : public lvr2::ModelIOBase

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.

Public Functions

inline UosIO()

Contructor.

ModelPtr read(string dir)

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

inline void setFirstScan(int n)

Defines the first scan to read.

Parameters:

n – The first scan to read

inline void setLastScan(int n)

Defines the last scan to read.

Parameters:

n – The last scan to read

void reduce(string dir, string target, int reduction = 1)

Reduces the given point cloud and exports all points into on single file.

Parameters:
  • dir – The directory containg the scan data

  • reduction – Reduction factor (export only every n-th point)

  • target – A target file name

inline void save(string filename)

Todo:

Implement this!

Warning

This function is not yet implemented!

inline void saveRemissionAsColor(bool convert)

Convert remission value to pseudo RGB values while saving.

inline void saveRemission(bool yes)

Save remission (if present)

Matrix4<Vec> parseFrameFile(ifstream &frameFile)

Creates a transformation matrix from given frame file.

Parameters:

frameFile

Returns:

A matrix representing the final transformation from a frame file