Go to the documentation of this file.
30 template<
typename MeshT >
38 std::cout <<
"test_automatic_progressive_compression_decompression_ld needs an input mesh filename." << std::endl;
46 std::string input_file_path = argv[1];
47 std::string output_file_path_save_preprocess =
"";
48 std::string output_file_path_decomp =
"";
49 std::string measurepath =
typeid(m).name();
50 if (measurepath.find(
"Surface_mesh") != std::string::npos)
52 measurepath =
"Surface_mesh_";
54 else if (measurepath.find(
"Polyhedron_3") != std::string::npos)
56 measurepath =
"Polyhedron_3_";
58 else if (measurepath.find(
"Linear_cell_complex") != std::string::npos)
62 else if (measurepath.find(
"AIF") != std::string::npos)
68 measurepath =
"Other_mesh_type_";
72 output_file_path_save_preprocess =
"progressive_compression_" + compressed_mesh_binary_file +
"_original_mesh_after_preprocess.off";
73 output_file_path_decomp =
"progressive_decompression_" + compressed_mesh_binary_file +
"_output.off";
74 compressed_mesh_binary_file = compressed_mesh_binary_file +
".bin";
78 output_file_path_save_preprocess = argv[2];
82 output_file_path_decomp = argv[3];
86 std::cout <<
"test_automatic_progressive_compression_decompression needs at maximum 3 input parameters: input mesh filename, output filename for the preprocessed mesh, and an output filename for the decompressed mesh." << std::endl;
99 FEVV::Filters::VKEPT_POSITION::MIDPOINT,
139 auto pm =
get(boost::vertex_point, m);
153 FEVV::Filters::BATCH_CONDITION::ALL_EDGES,
155 compressed_mesh_binary_file,
159 output_file_path_save_preprocess);
169 auto pm_decomp =
get(boost::vertex_point, m_decomp);
181 compressed_mesh_binary_file,
192 output_file_path_decomp, m_decomp, pmaps_bag_decomp_without_material);
196 output_file_path_decomp,
203 std::cout <<
"meshes are equal!" << std::endl;
208 std::cout <<
"meshes are not equal" << std::endl;
void put_property_map(PropertyT p, const MeshT &, PMapsContainer &pmaps, const typename PMap_traits< PropertyT, MeshT >::pmap_type &pmap)
void set_mesh_and_properties(const MeshT &m, FEVV::PMapsContainer &pmaps_bag, typename FEVV::PMap_traits< FEVV::vertex_color_t, MeshT >::pmap_type &v_cm, typename FEVV::PMap_traits< FEVV::edge_color_t, MeshT >::pmap_type &e_cm, typename FEVV::PMap_traits< FEVV::vertex_normal_t, MeshT >::pmap_type &v_nm)
Function to extract or create property map associated with a property map bag (for generic processing...
Refer to Geometry_traits_documentation_dummy for further documentation on provided types and algorith...
bool are_meshes_equal(std::string filename_a, std::string filename_b, bool verbose)
std::map< std::string, boost::any > PMapsContainer
std::string get_file_name(const std::string &file_name)
void read_mesh(const std::string &filename, FEVV::CGALPointSet &g, PMapsContainer &pmaps, bool=false)
Load mesh from file.
int test_automatic_progressive_compression_decompression(int argc, const char **argv)
Compresses then decompresses a mesh.
void write_mesh(const std::string &filename, FEVV::CGALPointSet &g, PMapsContainer &pmaps)
Write mesh to file.
boost::property_map< FEVV::DataStructures::AIF::AIFMesh, boost::vertex_index_t >::const_type get(const boost::vertex_index_t &, const FEVV::DataStructures::AIF::AIFMesh &)
Returns the vertex index property map of the mesh.
void progressive_compression_filter(HalfedgeGraph &g, PointMap &pm, FEVV::Filters::Uniform_quantization< HalfedgeGraph, PointMap > &pq, VertexColorMap &v_cm, EdgeColorMap &e_cm, const GeometryTraits >, FEVV::Filters::Error_metric< HalfedgeGraph, PointMap > *EM, const FEVV::Filters::Kept_position< HalfedgeGraph, PointMap > *KP, FEVV::Filters::Predictor< HalfedgeGraph, PointMap > *predict, int nb_q_bits, int nb_max_batches, int nb_min_vertices, FEVV::Filters::BATCH_CONDITION batch_condition, draco::EncoderBuffer &buffer, const std::string &measure_path, bool preprocess=true, bool dequantiz=false, bool save_preprocess=false, const std::string &output_file_path_save_preprocess="", bool allow_duplicates=false)
Takes a mesh g, applies batches of simplification until either the number of max batches or the minim...
This class represents an AIF structure. AIF structure can deal with both manifold and non-manifold su...
void progressive_decompression_filter(HalfedgeGraph &g, PointMap &pm, VertexColorMap &v_cm, const GeometryTraits &, draco::DecoderBuffer &buffer, bool dequantize=true, unsigned int nb_max_batches=10000)
Takes a buffer as an input, will decode the compression settings, the coarse mesh and refine the mesh...
Parameters contains the compression parameters except the stopping criteria.
@ QEM_3D
do not use a local metric (not implemented in this release)