-
indicates whether data should be read in binary (
true
) or in ASCII (false
) - Type: Boolean
-
Default:
true
-
Extra: This parameter is only relevant for
PLY
writing: theOFF
andXYZ
formats are always ASCII, and theLAS
format is always binary.
CGAL 5.4.4 - 3D Point Set
|
This module offers convenience overloads of input/ouput functions available in the Point Set Processing package.
These overloads, available after including CGAL/Point_set_3/IO.h
, allow the user to call point set processing algorithms without having to handle manually property maps and iterators.
Input functions instanciate all the necessary property maps:
CGAL::Point_set_3
property normal
with template type Vector
CGAL::Point_set_3
class with the name and type given by the PLY header or by the LAS standard.For a complete documentation of these functions, please refer to the Point Set Processing Reference manual.
Modules | |
Input/Output (LAS) | |
I/O Functions for the LAS (Lidar) File Format. | |
Input/Output (OFF) | |
I/O Functions for the Object File Format (OFF). | |
Input/Output (PLY) | |
I/O Functions for the Polygon File Format (PLY). | |
Input/Output (XYZ) | |
I/O Functions for the XYZ File Format. | |
Input/Output (Deprecated) | |
These I/O functions are deprecated and newer versions should be used. | |
Functions | |
template<typename Point , typename Vector , typename NamedParameters > | |
bool | CGAL::IO::read_point_set (const std::string &fname, CGAL::Point_set_3< Point, Vector > &ps, const NamedParameters &np) |
reads the point set from an input file. More... | |
template<typename Point , typename Vector > | |
std::ostream & | CGAL::operator<< (std::ostream &os, const CGAL::Point_set_3< Point, Vector > &ps) |
writes the point set in an output stream in the Polygon File Format (PLY). More... | |
template<typename Point , typename Vector , typename NamedParameters > | |
bool | CGAL::IO::write_point_set (const std::string &fname, CGAL::Point_set_3< Point, Vector > &ps, const NamedParameters &np) |
writes the point set in an output file. More... | |
template<typename Point , typename Vector > | |
std::istream & | operator>> (std::istream &is, CGAL::Point_set_3< Point, Vector > &ps) |
reads the point set from an input stream. More... | |
std::ostream& CGAL::operator<< | ( | std::ostream & | os, |
const CGAL::Point_set_3< Point, Vector > & | ps | ||
) |
#include <CGAL/Point_set_3/IO.h>
writes the point set in an output stream in the Polygon File Format (PLY).
All properties are inserted in their instantiation order.
std::ios::binary
must be set during the creation of the ofstream
, and the IO::Mode
of the stream must be set to BINARY
.os | the output stream |
ps | the point set |
os
|
related |
reads the point set from an input stream.
Supported file formats are the following:
.off
).ply
).las
).xyz
)The format is detected from the stream. If the stream contains normal vectors, the normal map is added to the point set. For PLY input, all point properties found in the header are added.
std::ios::binary
must be set during the creation of the ifstream
.is | input stream |
ps | point set |
is
bool CGAL::IO::read_point_set | ( | const std::string & | fname, |
CGAL::Point_set_3< Point, Vector > & | ps, | ||
const NamedParameters & | np | ||
) |
#include <CGAL/Point_set_3/IO.h>
reads the point set from an input file.
Supported file formats are the following:
.off
).ply
).las
).xyz
)The format is detected from the filename extension (letter case is not important). If the file contains normal vectors, the normal map is added to the point set. For PLY input, all point properties found in the header are added.
Point | the point type of the Point_set_3 |
Vector | the vector type of the Point_set_3 |
NamedParameters | a sequence of Named Parameters |
fname | name of the input file |
ps | the point set |
np | an optional sequence of Named Parameters among the ones listed below |
|
true
if the reading was successful, false
otherwise. bool CGAL::IO::write_point_set | ( | const std::string & | fname, |
CGAL::Point_set_3< Point, Vector > & | ps, | ||
const NamedParameters & | np | ||
) |
#include <CGAL/Point_set_3/IO.h>
writes the point set in an output file.
Supported file formats are the following:
.off
).ply
).las
).xyz
)The format is detected from the filename extension (letter case is not important).
Point | the point type of the Point_set_3 |
Vector | the vector type of the Point_set_3 |
NamedParameters | a sequence of Named Parameters |
fname | name of the output file |
ps | the point set |
np | an optional sequence of Named Parameters among the ones listed below |
| |
|
true
if the writing was successful, false
otherwise.