CGAL 6.2 - Linear Cell Complex
Loading...
Searching...
No Matches
VTK IO Functions for LCC

High-level operations.

#include<CGAL/Linear_cell_complex/IO/VTK.h>

Functions

template<typename LCC , typename VertexScalarType , typename VolumeScalarType >
bool CGAL::IO::read_VTK (const char *filename, LCC &alcc, std::vector< VertexScalarType > *vertex_scalars=nullptr, std::vector< VolumeScalarType > *volume_scalars=nullptr)
 Reads a VTK legacy ASCII file and load it into a 3D linear cell complex.
 
template<typename LCC , typename VertexScalarType , typename VolumeScalarType >
bool CGAL::IO::write_VTK (const char *filename, const LCC &alcc, const std::vector< VertexScalarType > *vertex_scalars=nullptr, const std::vector< VolumeScalarType > *volume_scalars=nullptr)
 Writes a 3D Linear_cell_complex to a VTK legacy ASCII file.
 

Function Documentation

◆ read_VTK()

template<typename LCC , typename VertexScalarType , typename VolumeScalarType >
bool CGAL::IO::read_VTK ( const char *  filename,
LCC &  alcc,
std::vector< VertexScalarType > *  vertex_scalars = nullptr,
std::vector< VolumeScalarType > *  volume_scalars = nullptr 
)

#include <CGAL/Linear_cell_complex/IO/VTK.h>

Reads a VTK legacy ASCII file and load it into a 3D linear cell complex.

Template Parameters
LCCmust be a CGAL::Linear_cell_complex_for_combinatorial_map<3,3>
VertexScalarTypeType for vertex scalar data (default: float)
VolumeScalarTypeType for volume scalar data (default: float)
Parameters
filenamePath to the VTK file
alccThe linear cell complex to populate (will be cleared first)
vertex_scalarsOptional output vector to store per-vertex scalar values. If provided, will be resized to match number of vertices.
volume_scalarsOptional output vector to store per-volume scalar values. If provided, will be resized to match number of volumes.
Returns
true if loading was successful, false otherwise

◆ write_VTK()

template<typename LCC , typename VertexScalarType , typename VolumeScalarType >
bool CGAL::IO::write_VTK ( const char *  filename,
const LCC &  alcc,
const std::vector< VertexScalarType > *  vertex_scalars = nullptr,
const std::vector< VolumeScalarType > *  volume_scalars = nullptr 
)

#include <CGAL/Linear_cell_complex/IO/VTK.h>

Writes a 3D Linear_cell_complex to a VTK legacy ASCII file.

Template Parameters
LCCmust be a CGAL::Linear_cell_complex_for_combinatorial_map<3,3>
VertexScalarTypeType for vertex scalar data (default: float)
VolumeScalarTypeType for volume scalar data (default: float)
Parameters
filenamePath to the output VTK file
alccThe linear cell complex to export
vertex_scalarsOptional per-vertex scalar data. If provided, must have same size as number of vertex attributes in the LCC.
volume_scalarsOptional per-volume scalar data. If provided, must have same size as number of 3-cells in the LCC.
Returns
true if writing was successful, false otherwise
Examples
Linear_cell_complex/linear_cell_complex_3_vtk_io.cpp.