#include <iostream>
#include <fstream>
#include <CGAL/HDVF/Cub_object_io.h>
#include <CGAL/HDVF/Cubical_chain_complex.h>
#include <CGAL/HDVF/Geometric_chain_complex_tools.h>
#include <CGAL/HDVF/Z2.h>
#include <CGAL/HDVF/Hdvf.h>
#include <CGAL/OSM/OSM.h>
typedef int CoefficientType;
int main(int argc, char **argv)
{
if (argc != 2)
{
std::cout << "usage: example_hdvf_cubical pgm_file" << std::endl;
}
else
{
const ComplexType::typeComplexCube primal_dual = ComplexType::PRIMAL;
const bool khalimsky_coords = (primal_dual == ComplexType::PRIMAL) ? true : false ;
mesh.
read_pgm(argv[1], khalimsky_coords);
ComplexType complex(mesh, primal_dual);
complex.print_complex();
hdvf.compute_perfect_hdvf();
hdvf.print_matrices();
hdvf.print_reduction();
hdvf_geometric_chain_complex_output_vtk(hdvf, complex, "res", true) ;
}
return 0;
}
The class Cub_object_io is an intermediate IO class, used to load binary volumes and produce cubical ...
Definition: Cub_object_io.h:44
bool read_pgm(const std::string &filename, bool khal=false)
Definition: Cub_object_io.h:97
void print_infos(size_t level=0) const
Definition: Cub_object_io.h:235
The class Cubical_chain_complex represents (topological) chain complexes associated to cubical comple...
Definition: Cubical_chain_complex.h:93
The class Hdvf implements homology and cohomology computation via homological discrete vector fields ...
Definition: Hdvf.h:86
const int OPT_FULL
HDVF option (compute full reduction).
Definition: Hdvf_core.h:42