38 #define _USE_MATH_DEFINES 56 using std::stringstream;
61 using Vec = BaseVector<float>;
123 void reduce(
string dir,
string target,
int reduction = 1);
180 ss << std::setfill(
'0') << std::setw(width) << t;
204 return (
float)((2 *
M_PI *
deg) / 360);
216 return (
float)((rad * 360) / (2 *
M_PI));
void saveRemissionAsColor(bool convert)
Convert remission value to pseudo RGB values while saving.
int m_numScans
Number of loaded scans.
std::string to_string(const int &t, int width)
bool m_saveRemissionColor
If true, remission values will be converted to color.
A 4x4 matrix class implementation for use with the provided vertex types.
void readOldFormat(ModelPtr &m, string dir, int first, int last, size_t &n)
Reads scans from first} to last} in old UOS format.
bool m_saveRemission
If true, the original remission information will be saved.
void setLastScan(int n)
Defines the last scan to read.
void convert(COORD_SYSTEM from, COORD_SYSTEM to, float *point)
void reduce(string dir, string target, int reduction=1)
Matrix4< Vec > parseFrameFile(ifstream &frameFile)
Creates a transformation matrix from given frame file.
float deg(const float rad)
ModelPtr read(string dir)
Reads all scans or an specified range of scans from the given directory.
Read and write pointclouds from .pts and .3d files.
Interface specification for low-level io. All read elements are stored in linear arrays.
void readNewFormat(ModelPtr &m, string dir, int first, int last, size_t &n)
Reads scans from first} to last} in new UOS format.
int m_reductionTarget
Number of targeted points for reduction.
int m_lastScan
The last scan to read (or -1 if all scans should be processed)
std::string to_string(const int &t)
Base interface for all I/O related classes.
void saveRemission(bool yes)
Save remission (if present)
std::shared_ptr< Model > ModelPtr
An input class for laser scans in UOS 3d format.
int m_firstScan
The first scan to read (or -1 if all scans should be processed)
float rad(const float deg)
bool m_saveToDisk
If true, the read point will not be stored in local memory.
ofstream m_outputFile
Filestream to save reduced data.
void save(string filename)
void setFirstScan(int n)
Defines the first scan to read.