A import / export class for point cloud data in plain text formats. Currently the file extensions .xyz, .txt, .3d and .pts are supported.
More...
#include <AsciiIO.hpp>
|
| AsciiIO () |
| Default constructor. More...
|
|
virtual ModelPtr | read (string filename) |
| Reads the given file and stores point and color information in the given parameters. More...
|
|
virtual ModelPtr | read (string filename, const int &x, const int &y, const int &z, const int &r=-1, const int &g=-1, const int &b=-1, const int &i=-1) |
| read Parses the given file and stores point and color attribute information in the returned model pointer. It is assumed that the each line in the file (except the first one which may be a header line) contains point coordinates (x, y, z) and optional color and intensity information. The position (columns) of the supported attritbutes within each line are define by the respective parameters given to this function. Each line may consist of more attributes, but only the ones specified are parsed. Not existing attributes are indicated by -1. More...
|
|
virtual void | save (string filename) |
|
| BaseIO () |
|
virtual ModelPtr | getModel () |
| Get the model for io operations. More...
|
|
virtual ModelPtr | read (std::string filename)=0 |
| Parse the given file and load supported elements. More...
|
|
virtual void | save (ModelPtr model, std::string filename) |
| Set the model and save the loaded elements to the given file. More...
|
|
virtual void | save (std::string filename)=0 |
| Save the loaded elements to the given file. More...
|
|
virtual void | setModel (ModelPtr m) |
| Set the model for io operations to use. More...
|
|
virtual | ~BaseIO () |
|
|
static size_t | countLines (string filename) |
| TODO: Coordinate mapping for ascii files. More...
|
|
static int | getEntriesInLine (string filename) |
| Helper method. Returns the number of columns in the given file. More...
|
|
A import / export class for point cloud data in plain text formats. Currently the file extensions .xyz, .txt, .3d and .pts are supported.
Definition at line 55 of file AsciiIO.hpp.
◆ AsciiIO()
lvr2::AsciiIO::AsciiIO |
( |
| ) |
|
|
inline |
◆ countLines()
size_t lvr2::AsciiIO::countLines |
( |
string |
filename | ) |
|
|
static |
TODO: Coordinate mapping for ascii files.
Definition at line 386 of file AsciiIO.cpp.
◆ getEntriesInLine()
int lvr2::AsciiIO::getEntriesInLine |
( |
string |
filename | ) |
|
|
static |
Helper method. Returns the number of columns in the given file.
Definition at line 404 of file AsciiIO.cpp.
◆ read() [1/2]
ModelPtr lvr2::AsciiIO::read |
( |
string |
filename | ) |
|
|
virtual |
Reads the given file and stores point and color information in the given parameters.
- Parameters
-
Definition at line 227 of file AsciiIO.cpp.
◆ read() [2/2]
ModelPtr lvr2::AsciiIO::read |
( |
string |
filename, |
|
|
const int & |
x, |
|
|
const int & |
y, |
|
|
const int & |
z, |
|
|
const int & |
r = -1 , |
|
|
const int & |
g = -1 , |
|
|
const int & |
b = -1 , |
|
|
const int & |
i = -1 |
|
) |
| |
|
virtual |
read Parses the given file and stores point and color attribute information in the returned model pointer. It is assumed that the each line in the file (except the first one which may be a header line) contains point coordinates (x, y, z) and optional color and intensity information. The position (columns) of the supported attritbutes within each line are define by the respective parameters given to this function. Each line may consist of more attributes, but only the ones specified are parsed. Not existing attributes are indicated by -1.
- Parameters
-
filename | The file to parse |
x | The colum number containing the x-coordinate of a point |
y | The colum number containing the y-coordinate of a point |
z | The colum number containing the z-coordinate of a point |
r | The colum number containing the r color component (or -1) |
g | The colum number containing the g color component (or -1) |
b | The colum number containing the b color component (or -1) |
i | The colum number containing the intensity value (or -1) |
- Returns
Definition at line 51 of file AsciiIO.cpp.
◆ save()
void lvr2::AsciiIO::save |
( |
string |
filename | ) |
|
|
virtual |
- Todo:
- : Implement save method for ASCII Files...
- Parameters
-
Definition at line 300 of file AsciiIO.cpp.
The documentation for this class was generated from the following files: