Namespaces | Functions
IOUtils.hpp File Reference
#include "lvr2/io/Timestamp.hpp"
#include "lvr2/io/Model.hpp"
#include "lvr2/io/CoordinateTransform.hpp"
#include "lvr2/registration/TransformUtils.hpp"
#include "lvr2/types/MatrixTypes.hpp"
#include "lvr2/types/ScanTypes.hpp"
#include <boost/filesystem.hpp>
#include <Eigen/Dense>
#include <fstream>
#include <vector>
#include "IOUtils.tcc"
Include dependency graph for IOUtils.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 lvr2
 

Functions

size_t lvr2::countPointsInFile (const boost::filesystem::path &inFile)
 Counts the number of points (i.e. number of lines) in the given file. More...
 
size_t lvr2::getNumberOfPointsInPLY (const std::string &filename)
 Get the Number Of Points (element points if present, vertex count otherwise) in a PLY file. More...
 
void lvr2::getPoseFromFile (BaseVector< float > &position, BaseVector< float > &angles, const boost::filesystem::path file)
 Loads an Euler representation of from a pose file. More...
 
size_t lvr2::getReductionFactor (ModelPtr model, size_t targetSize)
 Computes the reduction factor for a given target size (number of points) when reducing a point cloud using a modulo filter. More...
 
size_t lvr2::getReductionFactor (boost::filesystem::path &inFile, size_t targetSize)
 Computes the reduction factor for a given target size (number of points) when reducing a point cloud loaded from an ASCII file using a modulo filter. More...
 
template<typename T >
Transform< T > lvr2::getTransformationFromDat (const boost::filesystem::path &frames)
 Returns a Eigen 4x4 maxtrix representation of the transformation represented in the given dat file. More...
 
template<typename T >
Transform< T > lvr2::getTransformationFromFile (const boost::filesystem::path &file)
 Returns a Eigen 4x4 maxtrix representation of the transformation represented in the given file. More...
 
template<typename T >
Transform< T > lvr2::getTransformationFromFrames (const boost::filesystem::path &frames)
 Returns a Eigen 4x4 maxtrix representation of the transformation represented in the given frame file. More...
 
template<typename T >
Transform< T > lvr2::getTransformationFromPose (const boost::filesystem::path &pose)
 Returns a Eigen 4x4 maxtrix representation of the transformation represented in the given pose file. More...
 
template<typename T >
Transform< T > lvr2::loadFromFile (const boost::filesystem::path &file)
 Reads an Eigen 4x4 matrix from the given file (16 coefficients, row major) More...
 
void lvr2::parseSLAMDirectory (std::string dir, vector< ScanPtr > &scans)
 Reads a directory containing data from slam6d. Represents. More...
 
void lvr2::slamToLVRInPlace (PointBufferPtr src)
 Transforms src, which is assumed to be in slam6Ds left-handed coordinate system into our right-handed default coordinate system. The transformation is done in-place, so the original data will be modified. More...
 
PointBufferPtr lvr2::subSamplePointBuffer (PointBufferPtr src, const size_t &n)
 Computes a random sub-sampling of a point buffer by creating a uniform distribution over all point indices with given target size. The sub-sampling is applied to all channels in the source buffer. More...
 
PointBufferPtr lvr2::subSamplePointBuffer (PointBufferPtr src, const std::vector< size_t > &indices)
 Computes a reduced version of the source buffer by sampling all channels using the given set of point indices. More...
 
void lvr2::transformPointCloudAndAppend (PointBufferPtr &buffer, boost::filesystem::path &transfromFile, std::vector< float > &pts, std::vector< float > &nrm)
 Transforms the given point buffer according to the transformation stored in transformFile and appends the transformed points and normals to pts and nrm. More...
 
template<typename T >
void lvr2::writeFrame (const Transform< T > &transform, const boost::filesystem::path &framesOut)
 Writes a Eigen transformation into a .frames file. More...
 
size_t lvr2::writeModel (ModelPtr model, const boost::filesystem::path &outfile)
 Writes the given model to the given file. More...
 
void lvr2::writePointsAndNormals (std::vector< float > &p, std::vector< float > &n, std::string outfile)
 Writes the points and normals (float triples) stored in p and n to the given output file. Attention: The data is converted to a PointBuffer structure to be able to use the IO library, which results in a considerable memory overhead. More...
 
size_t lvr2::writePointsToStream (ModelPtr model, std::ofstream &out, bool nocolor=false)
 Writes the points stored in the given model to the fiven output stream. This function is used to apend point cloud data to an already existing ASCII file.. More...
 
void lvr2::writePose (const BaseVector< float > &position, const BaseVector< float > &angles, const boost::filesystem::path &out)
 Writes pose information in Euler representation to the given file. More...
 


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