MEPP2 Project
decompression_valence.h
Go to the documentation of this file.
1 // Copyright (c) 2012-2019 University of Lyon and CNRS (France).
2 // All rights reserved.
3 //
4 // This file is part of MEPP2; you can redistribute it and/or modify
5 // it under the terms of the GNU Lesser General Public License as
6 // published by the Free Software Foundation; either version 3 of
7 // the License, or (at your option) any later version.
8 //
9 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
10 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11 #pragma once
12 
14 
15 namespace FEVV {
16 namespace Filters {
17 
18 
54 template< typename HalfedgeGraph,
55  typename PointMap,
56  typename VertexColorMap,
57  typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph > >
58 std::string
60  HalfedgeGraph &g,
61  PointMap *pm,
62  VertexColorMap *v_cm,
63  const std::string &input_filename,
64  bool &has_color, /* output value : has color flag */
65  bool do_write_info,
66  std::vector< HalfedgeGraph * > *intermediate_meshes, /* nullptr allowed */
67  std::vector< VertexColorMap * >
68  *intermediate_vertex_color_maps, /* nullptr allowed */
69  int stop_level, /* decompression level to stop at */
70  bool do_write_intermediate_meshes,
71  const GeometryTraits &/*gt*/)
72 {
74  compr_valence_component;
75 
76  compr_valence_component.Decompress_Init(g, /* mesh */
77  pm, /* point map */
78  v_cm, /* vertex color map */
79  has_color,
80  input_filename);
81 
82  std::string result = compr_valence_component.Decompression_All_From_File(
83  g, /* mesh */
84  pm, /* point map */
85  v_cm, /* vertex color map */
86  do_write_info,
87  intermediate_meshes,
88  intermediate_vertex_color_maps,
89  stop_level,
90  do_write_intermediate_meshes);
91 
92  return result;
93 }
94 
95 
129 template< typename HalfedgeGraph,
130  typename PointMap,
131  typename VertexColorMap,
132  typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph > >
133 std::string
135  HalfedgeGraph &g,
136  PointMap *pm,
137  VertexColorMap *v_cm,
138  const std::string &input_filename,
139  bool &has_color, /* output value : has color flag */
140  bool do_write_info = false,
141  std::vector< HalfedgeGraph * > *intermediate_meshes =
142  nullptr, /* optional */
143  std::vector< VertexColorMap * > *intermediate_vertex_color_maps =
144  nullptr, /* optional */
145  int stop_level = -1, /* decompression level to stop at */
146  bool do_write_intermediate_meshes = false)
147 {
148  GeometryTraits gt(g);
149  return decompression_valence< HalfedgeGraph,
150  PointMap,
151  VertexColorMap,
152  GeometryTraits >(g,
153  pm,
154  v_cm,
155  input_filename,
156  has_color,
157  do_write_info,
158  intermediate_meshes,
159  intermediate_vertex_color_maps,
160  stop_level,
161  do_write_intermediate_meshes,
162  gt);
163 }
164 
165 
166 } // namespace Filters
167 } // namespace FEVV
Compression_Valence_Component
Compression valence component.
Definition: Compression_Valence_Component.h:211
FEVV::Geometry_traits< HalfedgeGraph >
Compression_Valence_Component.h
FEVV
Interfaces for plugins These interfaces will be used for different plugins.
Definition: Assert.h:16
FEVV::Filters::decompression_valence
std::string decompression_valence(HalfedgeGraph &g, PointMap *pm, VertexColorMap *v_cm, const std::string &input_filename, bool &has_color, bool do_write_info, std::vector< HalfedgeGraph * > *intermediate_meshes, std::vector< VertexColorMap * > *intermediate_vertex_color_maps, int stop_level, bool do_write_intermediate_meshes, const GeometryTraits &)
Uncompress a mesh compressed with Compression Valence algorithm.
Definition: decompression_valence.h:59
Compression_Valence_Component::Decompress_Init
void Decompress_Init(HalfedgeGraph &pMesh, PointMap *_pm, VertexColorMap *_v_cm, bool &has_color, const std::string &Input_File_Name)
Initialize the Decompression by loading the base mesh into pMesh. aka decompress the first (simplest)...
Definition: Compression_Valence_Component.inl:5471
Compression_Valence_Component::Decompression_All_From_File
std::string Decompression_All_From_File(HalfedgeGraph &_pMesh, PointMap *_pm, VertexColorMap *_v_cm, bool do_write_info, std::vector< HalfedgeGraph * > *intermediate_meshes, std::vector< VertexColorMap * > *intermediate_vertexColorMaps, int stop_level=-1, bool do_write_intermediate_meshes=false)
Decompression of all LoDs from file, or until a specified level. The finest LoD is visualized without...
Definition: Compression_Valence_Component.inl:6584