38 #include <boost/filesystem.hpp> 40 #include <Eigen/Dense> 56 void getPoseFromFile(BaseVector<float>& position, BaseVector<float>& angles,
const boost::filesystem::path
file);
70 boost::filesystem::path& transfromFile,
71 std::vector<float>& pts,
72 std::vector<float>& nrm);
137 void writePose(
const BaseVector<float>& position,
const BaseVector<float>& angles,
const boost::filesystem::path& out);
255 #include "IOUtils.tcc" 257 #endif // IOUTILS_HPP Transform< T > getTransformationFromDat(const boost::filesystem::path &frames)
Returns a Eigen 4x4 maxtrix representation of the transformation represented in the given dat file...
Transform< T > getTransformationFromFile(const boost::filesystem::path &file)
Returns a Eigen 4x4 maxtrix representation of the transformation represented in the given file...
void 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...
std::shared_ptr< PointBuffer > PointBufferPtr
Transform< T > getTransformationFromFrames(const boost::filesystem::path &frames)
Returns a Eigen 4x4 maxtrix representation of the transformation represented in the given frame file...
Transform< T > loadFromFile(const boost::filesystem::path &file)
Reads an Eigen 4x4 matrix from the given file (16 coefficients, row major)
size_t getNumberOfPointsInPLY(const std::string &filename)
Get the Number Of Points (element points if present, vertex count otherwise) in a PLY file...
void 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...
size_t 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 apen...
void writePose(const BaseVector< float > &position, const BaseVector< float > &angles, const boost::filesystem::path &out)
Writes pose information in Euler representation to the given file.
size_t getReductionFactor(ModelPtr model, size_t targetSize)
Computes the reduction factor for a given target size (number of points) when reducing a point cloud ...
void slamToLVRInPlace(PointBufferPtr src)
Transforms src, which is assumed to be in slam6Ds left-handed coordinate system into our right-handed...
Transform< T > getTransformationFromPose(const boost::filesystem::path &pose)
Returns a Eigen 4x4 maxtrix representation of the transformation represented in the given pose file...
PointBufferPtr subSamplePointBuffer(PointBufferPtr src, const size_t &n)
Computes a random sub-sampling of a point buffer by creating a uniform distribution over all point in...
void getPoseFromFile(BaseVector< float > &position, BaseVector< float > &angles, const boost::filesystem::path file)
Loads an Euler representation of from a pose file.
std::shared_ptr< Model > ModelPtr
size_t writeModel(ModelPtr model, const boost::filesystem::path &outfile)
Writes the given model to the given file.
void parseSLAMDirectory(std::string dir, vector< ScanPtr > &scans)
Reads a directory containing data from slam6d. Represents.
void writeFrame(const Transform< T > &transform, const boost::filesystem::path &framesOut)
Writes a Eigen transformation into a .frames file.
size_t countPointsInFile(const boost::filesystem::path &inFile)
Counts the number of points (i.e. number of lines) in the given file.