This module offers convenience overloads of input/ouput functions available in the PkgPointSetProcessing3 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:
- if found in the input, normal vectors are stored in the usual
CGAL::Point_set_3
property normal
with template type Vector
- for PLY and LAS input, other properties are stored as properties in the
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.
|
template<typename Point , typename Vector > |
bool | CGAL::read_xyz_point_set (std::istream &stream, CGAL::Point_set_3< Point, Vector > &point_set) |
|
template<typename Point , typename Vector > |
bool | CGAL::read_off_point_set (std::istream &stream, CGAL::Point_set_3< Point, Vector > &point_set) |
|
template<typename Point , typename Vector > |
bool | CGAL::read_ply_point_set (std::istream &stream, CGAL::Point_set_3< Point, Vector > &point_set, std::string &comments) |
|
template<typename Point , typename Vector > |
bool | CGAL::write_ply_point_set (std::ostream &stream, const CGAL::Point_set_3< Point, Vector > &point_set, const std::string &comments=std::string()) |
|
template<typename Point , typename Vector > |
bool | CGAL::read_las_point_set (std::istream &stream, CGAL::Point_set_3< Point, Vector > &point_set) |
|
template<typename Point , typename Vector > |
bool | CGAL::write_las_point_set (std::ostream &stream, CGAL::Point_set_3< Point, Vector > &point_set) |
|
template<typename Point , typename Vector > |
bool | CGAL::write_xyz_point_set (std::ostream &stream, const CGAL::Point_set_3< Point, Vector > &point_set) |
|
template<typename Point , typename Vector > |
bool | CGAL::write_off_point_set (std::ostream &stream, const CGAL::Point_set_3< Point, Vector > &point_set) |
|
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 that can be either: More...
|
|
template<typename Point , typename Vector > |
std::ostream & | operator<< (std::ostream &os, const CGAL::Point_set_3< Point, Vector > &ps) |
| Inserts the point set in an output stream in ASCII PLY format. All properties are inserted in their instantiation order. More...
|
|
◆ operator<<()
template<typename Point , typename Vector >
std::ostream & operator<< |
( |
std::ostream & |
os, |
|
|
const CGAL::Point_set_3< Point, Vector > & |
ps |
|
) |
| |
|
related |
Inserts the point set in an output stream in ASCII PLY format. All properties are inserted in their instantiation order.
◆ operator>>()
template<typename Point , typename Vector >
std::istream & operator>> |
( |
std::istream & |
is, |
|
|
CGAL::Point_set_3< Point, Vector > & |
ps |
|
) |
| |
|
related |
Reads the point set from an input stream that can be either:
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.
◆ read_las_point_set()
template<typename Point , typename Vector >
bool CGAL::read_las_point_set |
( |
std::istream & |
stream, |
|
|
CGAL::Point_set_3< Point, Vector > & |
point_set |
|
) |
| |
#include <CGAL/Point_set_3/IO.h>
- Parameters
-
stream | input stream. |
point_set | point set |
◆ read_off_point_set()
template<typename Point , typename Vector >
bool CGAL::read_off_point_set |
( |
std::istream & |
stream, |
|
|
CGAL::Point_set_3< Point, Vector > & |
point_set |
|
) |
| |
#include <CGAL/Point_set_3/IO.h>
- Parameters
-
stream | input stream. |
point_set | point set |
◆ read_ply_point_set()
template<typename Point , typename Vector >
bool CGAL::read_ply_point_set |
( |
std::istream & |
stream, |
|
|
CGAL::Point_set_3< Point, Vector > & |
point_set, |
|
|
std::string & |
comments |
|
) |
| |
#include <CGAL/Point_set_3/IO.h>
Reads a point set with properties from an input stream in Ascii or Binary PLY format.
- the operator reads the vertex
point
property;
- if three PLY properties
nx
, ny
and nz
with type float
or double
are found, the normal map is added;
- if any other PLY property is found, a "[name]" property map is added, where
[name]
is the name of the PLY property.
The comments
parameter can be omitted. If provided, it will be used to store the potential comments found in the PLY header. Each line starting by "comment " in the header is appended to the comments
string (without the "comment " word).
- Parameters
-
stream | input stream. |
point_set | point set |
comments | PLY comments. |
- Examples
- Point_set_3/point_set_read_ply.cpp.
◆ read_xyz_point_set()
template<typename Point , typename Vector >
bool CGAL::read_xyz_point_set |
( |
std::istream & |
stream, |
|
|
CGAL::Point_set_3< Point, Vector > & |
point_set |
|
) |
| |
◆ write_las_point_set()
template<typename Point , typename Vector >
bool CGAL::write_las_point_set |
( |
std::ostream & |
stream, |
|
|
CGAL::Point_set_3< Point, Vector > & |
point_set |
|
) |
| |
#include <CGAL/Point_set_3/IO.h>
- Parameters
-
stream | output stream. |
point_set | point set |
◆ write_off_point_set()
template<typename Point , typename Vector >
bool CGAL::write_off_point_set |
( |
std::ostream & |
stream, |
|
|
const CGAL::Point_set_3< Point, Vector > & |
point_set |
|
) |
| |
◆ write_ply_point_set()
template<typename Point , typename Vector >
bool CGAL::write_ply_point_set |
( |
std::ostream & |
stream, |
|
|
const CGAL::Point_set_3< Point, Vector > & |
point_set, |
|
|
const std::string & |
comments = std::string() |
|
) |
| |
#include <CGAL/Point_set_3/IO.h>
Writes a point set with properties in an output stream in PLY format.
If found, the normal map is inserted to the stream. All other properties with simple types are inserted in the stream.
If provided, the comments
string is included line by line in the header of the PLY stream (each line will be precedeed by "comment ").
- Parameters
-
stream | output stream. |
point_set | point set. |
comments | PLY comments. |
- Examples
- Point_set_3/point_set_read_ply.cpp.
◆ write_xyz_point_set()
template<typename Point , typename Vector >
bool CGAL::write_xyz_point_set |
( |
std::ostream & |
stream, |
|
|
const CGAL::Point_set_3< Point, Vector > & |
point_set |
|
) |
| |
#include <CGAL/Point_set_3/IO.h>
- Parameters
-
stream | output stream. |
point_set | point set |