CGAL 6.1 - Homological Discrete Vector Fields
Loading...
Searching...
No Matches
CGAL::HDVF::Cub_object_io Class Reference

#include <CGAL/HDVF/Cub_object_io.h>

Definition

The class Cub_object_io is an intermediate IO class, used to load binary volumes and produce cubical complexes.

Examples
HDVF/example_hdvf_cubical.cpp, HDVF/main_dual_hdvf.cpp, HDVF/main_hdvf.cpp, and HDVF/main_per_hdvf.cpp.

Public Member Functions

 Cub_object_io ()
 
 Cub_object_io (int d, const std::vector< IOCubCellType > &vcubs, bool khal=false)
 Constructor from a vector of cells.
 
 Cub_object_io (const Cub_object_io &m)
 
void clear_cubs ()
 
void add_cub (const IOCubCellType &c)
 
void frame ()
 
bool read_pgm (const std::string &filename, bool khal=false)
 
bool write_pgm (const std::string &filename)
 
bool read_cub (const std::string &filename, bool khalimsky=false)
 
bool write_cub (const std::string &filename)
 
void print_infos (size_t level=0) const
 

Public Attributes

int dim = 0
 
vector< size_t > ncubs
 
vector< size_t > N
 
std::vector< IOCubCellTypecubs
 
bool khalimsky
 

Constructor & Destructor Documentation

◆ Cub_object_io()

CGAL::HDVF::Cub_object_io::Cub_object_io ( int  d,
const std::vector< IOCubCellType > &  vcubs,
bool  khal = false 
)

Constructor from a vector of cells.

Cells coordinates are given in Khalimsky coordinates if the boolean khal is true, and as integer indices of voxels otherwise.