Go to the documentation of this file.
15 #include <boost/graph/graph_traits.hpp>
95 return (
x == Pt.
x &&
y == Pt.
y &&
z == Pt.
z);
186 return (
c0 == m_color.
c0 &&
c1 == m_color.
c1 &&
c2 == m_color.
c2);
198 return !(*
this == m_color);
209 template<
typename HalfedgeGraph,
typename Po
intMap,
typename VertexColorMap >
310 VertexColorMap *_v_cm,
311 const std::string &Input_File_Name,
312 const std::string &File_Name,
314 const int &NVertices,
315 const bool Is_normal_flipping_selected,
316 const bool Is_use_metric_selected,
317 const float &Metric_thread,
318 const bool Is_use_forget_metric_selected,
319 const int &Forget_value,
320 const bool Is_compression_selected,
321 const bool Is_adaptive_quantization_selected,
322 const bool Is_bijection_selected);
336 const int &Quantization_bit,
339 VertexColorMap *v_cm);
348 void Quantization(HalfedgeGraph &pMesh,
const PointMap *pm);
369 const int &Quantization_bit);
378 void Init(HalfedgeGraph &mesh);
380 #if 0 // TODO-elo-restore-if-needed
387 void Color_Quantization(HalfedgeGraph &pMesh);
410 const int &NVertices,
411 const bool Is_normal_flipping_selected,
412 const bool Is_use_metric_selected,
413 const float &Metric_thread,
414 const bool Is_use_forget_metric_selected,
415 const int &Forget_value);
433 const bool Is_normal_flipping_selected,
434 const bool Is_use_metric_selected,
435 const float &Metric_thread,
436 const bool Is_use_forget_metric_selected,
437 const int &Forget_value,
438 const int &Component_ID);
454 const bool Normal_flipping,
455 const bool Use_metric,
456 const float &Metric_thread,
457 const bool Use_forget_metric,
458 const int &Forget_value,
459 const int &Component_ID,
460 const PointMap *_pm);
486 VertexColorMap *_v_cm,
487 const int &NVertices,
488 const bool Is_normal_flipping_selected,
489 const bool Is_use_metric_selected,
490 const float &Metric_thread,
491 const bool Is_use_forget_metric_selected,
492 const int &Forget_value,
506 const int &Component_ID,
519 const int &Component_ID,
533 const int &Component_ID,
536 int &Number_of_vertices);
546 const int Component_ID,
547 VertexColorMap *_v_cm);
559 const int &Component_ID,
560 VertexColorMap *_v_cm);
576 const char *File_Name,
578 unsigned &Connectivity_size,
579 unsigned &Color_size,
580 unsigned &Total_size,
581 const PointMap *_pm);
583 #if 0 // TODO-elo-restore-if-needed
591 int Calculate_Connectivity_Rate(
void);
625 unsigned &Connectivity_size,
626 unsigned &Color_size,
627 const int &Num_color_base_mesh,
628 const PointMap *_pm);
645 VertexColorMap *_v_cm,
647 const std::string &Input_File_Name);
649 #if 0 // TODO-elo-restore-if-needed
656 void Decompression_From_File(HalfedgeGraph &pMesh);
666 #if 0 // TODO-elo-restore-if-needed
673 void Decompression_From_Sequence(HalfedgeGraph &pMesh, HalfedgeGraph &New_mesh);
681 void Decompression_Coarser_From_File(HalfedgeGraph &pMesh);
688 const VertexColorMap *_v_cm);
696 static void copy_mesh(
const HalfedgeGraph &_pMesh,
697 const VertexColorMap *_v_cm,
698 HalfedgeGraph &mesh_copy,
699 VertexColorMap *v_cm_copy );
706 const HalfedgeGraph &_pMesh,
707 const VertexColorMap *_v_cm,
708 std::vector< HalfedgeGraph * > *intermediate_meshes,
709 std::vector< VertexColorMap * >
710 *intermediate_vertexColorMaps );
720 HalfedgeGraph &_pMesh,
722 VertexColorMap *_v_cm,
724 std::vector< HalfedgeGraph * > *intermediate_meshes ,
725 std::vector< VertexColorMap * >
726 *intermediate_vertexColorMaps ,
727 int stop_level = -1 ,
728 bool do_write_intermediate_meshes =
false);
731 #if 0 // TODO-elo-restore-if-needed
738 void Decompression_Specific_Level_From_File(HalfedgeGraph &pMesh,
const int & WL);
745 void JCW_Decompression_From_File(HalfedgeGraph &pMesh);
753 void JCW_Decompression_Without_Extraction_From_File(HalfedgeGraph &pMesh);
762 void JCW_Decompression_From_Sequence(HalfedgeGraph &pMesh, HalfedgeGraph &New_mesh);
772 void JCW_Decompression_Without_Extraction_From_Sequence(HalfedgeGraph &pMesh, HalfedgeGraph &New_mesh);
780 QString Show_Text(
void);
795 VertexColorMap *_v_cm);
807 const int &Component_ID,
809 VertexColorMap *_v_cm);
821 const int &Component_ID,
823 VertexColorMap *_v_cm);
825 #if 0 // TODO-elo-restore-if-needed
837 double Calculate_Area(HalfedgeGraph & pMesh);
854 const int &_Component_ID,
855 const double &Mean_color,
856 const double &Mean_area);
869 const int &Component_ID,
895 #if 0 // TODO-elo-restore-if-needed
904 void Attibute_Seed_Gate_Flag(HalfedgeGraph &Original_mesh, HalfedgeGraph &New_mesh);
917 unsigned Adjust_value;
919 Adjust_value = 25 + 9 * 4;
926 #if 0 // TODO-elo-restore-if-needed
936 int GetResolutionChange(HalfedgeGraph *pMesh,
float Prec);
973 QString Joint_Compression_Watermarking(HalfedgeGraph &pMesh,
974 const char * Input_File_Name,
975 const char * Output_File_Name,
976 const int & Number_bins,
977 const int & Number_regions,
978 const int & Embedding_strength,
979 const char * Embedding_message,
980 const bool Is_complete_reversibility_selected,
981 const bool Is_divide_regions_selected,
982 const int & Thres_divide_regions,
984 const int & NVertices,
985 const bool Normal_flipping,
986 const bool Use_metric,
987 const float & Metric_thread,
988 const bool Use_forget_metric,
989 const int &Forget_value);
1006 int JCW_Decimation_For_Segmentation(HalfedgeGraph &pMesh,
const bool Normal_flipping,
const bool Use_metric,
const float &Metric_thread,
const bool Use_forget_metric,
const int &Forget_value,
const int & Component_ID);
1023 int JCW_Regulation_For_Segmentation(HalfedgeGraph &pMesh,
const bool Normal_flipping,
const bool Use_metric,
const float &Metric_thread,
const bool Use_forget_metric,
const int &Forget_value,
const int & Component_ID);
1037 void JCW_Un_Regulation_For_Insertion(HalfedgeGraph &pMesh,
const int & Component_ID, list<int> & FP_Connectivity, list<Point3d> & SP_Moved_Position, list<Point3d> & SP_Original_Position, list<Point_Int> & SP_Watermarked_Position, list<vector<int> > & JCW_ERROR);
1052 void JCW_Un_Decimation_For_Insertion(HalfedgeGraph &pMesh,
const int & Component_ID, list<int> & FP_Connectivity, list<Point3d> & SP_Moved_Position, list<Point3d> & SP_Original_Position, list<Point_Int> & SP_Watermarked_Position, list<vector<int> > & JCW_ERROR);
1076 Point3d JCW_Barycenter_Patch_After_Removal(
const Halfedge_handle & h,
const int & valence,
const int & Direction);
1089 Point3d JCW_Barycenter_Patch_Before_Removal(
const Halfedge_handle & h,
const int & valence,
const int & Direction);
1122 void JCW_Un_Regulation_For_Region_Detection(HalfedgeGraph & pMesh,
const int & Component_ID, list<int> & FP_connect, list<Point3d> & FP_Geo, list<int> & FP_RN);
1135 void JCW_Un_Decimation_For_Region_Detection(HalfedgeGraph & pMesh,
const int & Component_ID, list<int> & FP_connect, list<Point3d> & FP_Geo, list<int> & FP_RN);
1144 vector<double> JCW_Evaluate_Robustness(
void);
1152 void Set_Number_Bin(
const int & NB)
1163 int Get_Number_Bin(
void)
1175 void Set_Embedding_Level(
const int &EL)
1187 int Get_Embedding_Level(
void)
1198 void Set_Number_Region(
const int &NR)
1209 int Get_Number_Region(
void)
1220 void JCW_Calculate_Mesh_Center(HalfedgeGraph &pMesh);
1227 void JCW_Calculate_Radius(HalfedgeGraph &pMesh);
1236 void JCW_Expand_Mesh(HalfedgeGraph &pMesh);
1245 void JCW_Quantization(HalfedgeGraph &pMesh);
1254 void JCW_Generate_Regions_On_Base_Mesh(HalfedgeGraph &pMesh);
1268 void JCW_Region_Mass_Center_Insert_Watermark(HalfedgeGraph & pMesh, list<Point3d> & FP_Geometry, list<int> & FP_Region_Number, list<Point_Int> & SP_Watermarked_Position, list<Point3d> & SP_Moved_Position, list<Point3d> & SP_Original_Position, list<vector<int> > & JCW_ERROR);
1278 void JCW_Region_Mass_Center_Extract_Watermark(HalfedgeGraph & pMesh);
1287 void JCW_Code_Difference_Histogram_Shifting(HalfedgeGraph &pMesh,
const int & Component_ID);
1297 void JCW_Decode_Difference_Histogram_Shifting(HalfedgeGraph &pMesh,
const int & Component_ID);
1305 void Initialize_Spherical_Coordinates(HalfedgeGraph &pMesh);
1314 void Convert_To_Spherical(
const Point3d & Pt,
double * Spheric);
1324 void Convert_To_Cartesian(
const double * Spheric,
double * Cartesian);
1336 int JCW_Decompress_One_Level(HalfedgeGraph &pMesh,
const char* File_Name,
const int & Noise_mode);
1347 int JCW_Decompress_One_Level_Without_Extraction(HalfedgeGraph &pMesh,
const char* File_Name);
1359 int JCW_Divide_Big_Regions(HalfedgeGraph &pMesh,
const int & Thres_divide_regions);
1367 void JCW_Colorify_Regions(HalfedgeGraph & pMesh);
1373 void Read_Information_To_Hide(
const char * Embedding_message);
1381 QString Write_Information_To_Hide();
1388 void Clear_After_Compression();
1406 std::vector< std::list< int > >
1408 std::vector< std::list< Point_Int > >
1410 std::vector< std::list< int > >
1412 std::vector< std::list< int > >
1415 std::list< Point_Int >
1420 std::vector< std::list< int > >
1423 std::vector< std::list< int > >
1448 std::vector< std::list< int > >
1450 std::vector< std::list< int > >
1454 std::vector< std::list< int > >
1456 std::vector< std::list< int > >
1458 std::vector< std::list< int > >
1462 std::vector< std::list< Color_Unit > >
1464 std::list< Color_Unit >
1563 std::list< std::vector< int > >
1595 std::vector< float >
1597 std::vector< float >
1664 const HalfedgeGraph &mesh);
1674 int Find_Type(
const HalfedgeGraph &_pMesh,
1676 const int &valence);
1691 const int &valence);
1703 const PointMap *_pm,
1705 const unsigned &valence);
1717 const PointMap *_pm,
1749 const PointMap *_pm,
1752 const unsigned int &valence,
1753 const float &Threshold);
1768 const typename boost::graph_traits< HalfedgeGraph >::halfedge_descriptor
1770 const HalfedgeGraph &mesh,
1771 const PointMap *pm);
1785 const HalfedgeGraph &_pMesh);
1795 const HalfedgeGraph &_pMesh);
1806 const HalfedgeGraph &_pMesh);
1819 const HalfedgeGraph &_pMesh);
1831 const HalfedgeGraph &_pMesh,
1832 const PointMap *_pm);
1845 const HalfedgeGraph &_pMesh,
1846 const PointMap *_pm);
1860 const unsigned &valence,
1861 const unsigned &Vertex_number,
1862 const int &Component_ID,
1863 const PointMap *_pm);
1876 const unsigned int &valence,
1877 const HalfedgeGraph &_pMesh,
1878 const PointMap *_pm);
1893 const HalfedgeGraph &_pMesh,
1894 const PointMap *_pm);
1941 const HalfedgeGraph &_pMesh);
1955 int number_vertices);
2002 void compute_normals(
const HalfedgeGraph &_pMesh,
const PointMap *_pm);
2008 const PointMap *_pm);
2019 const HalfedgeGraph &_pMesh,
2020 const PointMap *_pm);
2026 const HalfedgeGraph &_pMesh);
2033 const HalfedgeGraph &_pMesh,
2034 const PointMap *_pm);
2041 const PointMap *_pm);
2052 const HalfedgeGraph &_pMesh,
2053 const PointMap *_pm);
2059 const HalfedgeGraph &_pMesh,
2060 const PointMap *_pm);
2066 const PointMap *_pm,
2067 const std::string &header = std::string());
2073 const VertexColorMap *_v_cm,
2074 const std::string &header = std::string());
2081 const PointMap *_pm);
2088 VertexColorMap *_v_cm,
2089 const std::vector< Point3d > &vlist,
2090 const std::vector< int > &flist,
2091 const std::vector< float > &clist,
2092 const std::vector< int > &Color_index_list);
2103 VertexColorMap *_v_cm);
Compression valence component.
double Volume(const Point3d &A, const Point3d &B, const Point3d &C, const Point3d &D, const HalfedgeGraph &_pMesh)
std::vector< std::list< int > > NumberSymbol
Number of symbols of each simplification step.
FEVV::Vertex_pmap< HalfedgeGraph, int > Vertex_Number
Struct of integer color components.
bool operator==(const Point_Int &Pt) const
Comparison operatior ==.
FEVV::Vertex_pmap< HalfedgeGraph, Color_Unit > vertex_color_int
void Calculate_Geometry_Color_Offset_Range(void)
Calculates the geometry color offset range. This function is needed since the coder/decoder deals onl...
std::vector< double > ComponentVolume
The volume of each component.
Point3d Barycenter_Patch_Before_Removal(const halfedge_descriptor &h, const HalfedgeGraph &_pMesh, const PointMap *_pm)
gives the position of the barycenter of the patch for regulation conquest.
bool IsOneColor
true if is one color
Color_Unit Get_Vertex_Color(const halfedge_descriptor &h, const HalfedgeGraph &_pMesh)
gets a color of front vertex of h.
bool Is_Geometric_Metric_Violated(const HalfedgeGraph &_pMesh, const PointMap *_pm, const halfedge_descriptor &h, const int &type, const unsigned int &valence, const float &Threshold)
Query if this object is geometric violated. Here, we define a geometric_metric to preserve maximum th...
int Decompress_Each_Step(HalfedgeGraph &_pMesh, PointMap *_pm, VertexColorMap *_v_cm)
Decompress the each step to visualize intermediate meshes.
GraphTraits::halfedge_descriptor halfedge_descriptor
Point_Int Frenet_Rotation(const Point_Int &Dist, const Vector &T1, const Vector &T2, const Vector &normal)
finds a bijection through a rotation transformation in 3D with only integer coordinates.
Point_Int()
Default constructor.
std::string vertex_to_string(const vertex_descriptor &v, const PointMap *_pm)
Vector Normal_Patch(const halfedge_descriptor &const_h, const unsigned int &valence, const HalfedgeGraph &_pMesh, const PointMap *_pm)
calculates a normal vector of a patch caused by a removal of a front vertex.
void Adaptive_Quantization(HalfedgeGraph &pMesh, PointMap *_pm, VertexColorMap *_v_cm, const int &NVertices, const bool Is_normal_flipping_selected, const bool Is_use_metric_selected, const float &Metric_thread, const bool Is_use_forget_metric_selected, const int &Forget_value, const int &Qbit)
Adaptive quantization which not only decimates a input mesh but also adapts quantization precision fo...
std::vector< float > Prog
void build_mesh(HalfedgeGraph &_pMesh, PointMap *_pm, VertexColorMap *_v_cm, const std::vector< Point3d > &vlist, const std::vector< int > &flist, const std::vector< float > &clist, const std::vector< int > &Color_index_list)
FEVV::Geometry_traits< HalfedgeGraph >::Point Point3d
bool Is_Border_Vertex(const halfedge_descriptor &h, const HalfedgeGraph &mesh)
Query if 'h' is border vertex.
Adaptive_Data_Model Color_2_Model
The statistical model used for color_2.
int m_EmbeddingStrength
Embedding strength for JCW.
void Remove_Last_Phase_Elements(const int &Component_ID)
When the last simplification operation has to be cancelled, we need to remove its elements in order n...
void DBG_print_mesh_vertexcolor(const HalfedgeGraph &_pMesh, const VertexColorMap *_v_cm, const std::string &header=std::string())
float C0_Min
The C0 minimum.
std::list< Color_Unit > InterVertexColor
The intermediate information vertex color.
std::vector< std::list< int > > AlphaRange
The range of alpha (Frenet coordinates) of each LoD.
void Diminush_Geometry_Quantization_Precision(HalfedgeGraph &pMesh, const int &Component_ID, PointMap *_pm)
Decreasing of quantization resolution based on the prediction of PENG. Opposite function is Augment_G...
std::vector< std::vector< float > > Region_Color
Color of each region.
FEVV::Face_pmap< HalfedgeGraph, int > facet_tag
int Number_Save_Over_bins
Number of empty bins to shift the current bins.
std::vector< float > Quantization_Step
The quantization step.
bool IsColored
true if is colored
int N_Inserted_Watermarks
Number of inserted watermarks.
int Estimate_Geometry_Quantization(double volume, double area, int number_vertices)
Estimate geometry quantization.
std::string File_name
Filename of the file.
std::list< std::vector< int > > m_JCW_Move_Error
Stock difference related to complete reversibility.
int GlobalCountOperation
The global count operation.
FEVV::Vertex_pmap< HalfedgeGraph, int > vertex_Region_Number
float OnlyColor[3]
The coordinates of color when there is only one color.
void Quantization(HalfedgeGraph &pMesh, const PointMap *pm)
std::vector< float > ymin
The ymin.
std::string edge_to_string(const halfedge_descriptor &h, const HalfedgeGraph &_pMesh, const PointMap *_pm)
unsigned Compressed_file_size
Size of the compressed file.
FEVV::Vertex_pmap< HalfedgeGraph, int > Vertex_Sign
void Augment_Geometry_Quantization_Precision(HalfedgeGraph &pMesh, Arithmetic_Codec &Decoder, const int &Component_ID, PointMap *_pm)
Refines quantization precision of mesh geometry.
int C2_Range
The C2 range.
std::vector< std::list< int > > NumberVertices
Number of vertices of each simplification step.
void Calculate_Edge_Color_Difference(HalfedgeGraph &pMesh, const int &Component_ID, double &Max_color, double &Mean_color, int &Number_of_vertices)
Calculates the edge color difference.
std::list< int > JCW_Connectivity
Stock connectivity information for JCW.
Adaptive_Data_Model Color_0_Model
The statistical model used for color_0.
std::vector< std::list< int > > GammaOffset
The offset of gamma.
Refer to Geometry_traits_documentation_dummy for further documentation on provided types and algorith...
std::list< int > InterConnectivity
The intermediate information of connectivity.
void Color_Initialization(HalfedgeGraph &pMesh, VertexColorMap *v_cm)
Color initialization.
void Un_Regulation(HalfedgeGraph &_pMesh, Arithmetic_Codec &Decoder, const int &Component_ID, PointMap *_pm, VertexColorMap *_v_cm)
Decoding of the regulation conquest.
std::vector< std::list< int > > GammaRange
The range of gamma (Frenet coordinates) of each LoD.
std::string Dec_File_Info
File name to write decompression information for IHM.
Color_Unit(int _c0, int _c1, int _c2)
std::vector< int > NumberChangeQuantization
Adaptive_Data_Model DM_JCW_MOVE_ERROR
void keep_intermediate_mesh(const HalfedgeGraph &_pMesh, const VertexColorMap *_v_cm, std::vector< HalfedgeGraph * > *intermediate_meshes, std::vector< VertexColorMap * > *intermediate_vertexColorMaps)
Store a copy of the current mesh and vertex color map to be able to display all levels of decompressi...
void Global_Initialization(HalfedgeGraph &pMesh, const int &Quantization_bit, const char *File_name, const PointMap *pm, VertexColorMap *v_cm)
Global initialization to select the input gate.
std::vector< unsigned > Qbit
The Quantization bits.
void compute_normals(const HalfedgeGraph &_pMesh, const PointMap *_pm)
double m_Rmax
Distance of nearst vertex from mesh center for JCW.
std::vector< float > Ratio
Stock information of ration regarding size of the input file.
void Get_Coefficient_Up_Quantization(const int &Correct_symbol, int coeff[3])
Gets a coefficient up quantization.
std::string Message
Message to be shown in the main window.
void Init(HalfedgeGraph &mesh)
Initialize all flags of verticeces and facets to FREE and give order to vertices (manifold property c...
std::vector< int > m_N_remained_vertices
Number of remained vertices in each region.
void Multiple_Components_Initialization(HalfedgeGraph &pMesh, const PointMap *pm, const int &Quantization_bit)
std::vector< std::list< int > > NumberQuantizationLayer
Number of quantization layers.
std::vector< float > zmax
The zmax.
typename Face_pmap_traits< MeshT, ValueT >::pmap_type Face_pmap
Adaptive_Data_Model Index_Model
The index model.
bool IsDecompress
true if is decompress
Vector Calculate_T1_T2(const halfedge_descriptor &h, const Vector &normal, Vector &T2, const HalfedgeGraph &_pMesh, const PointMap *_pm)
Calculates the base vectors of new coordinates system which is frenet system.
GraphTraits::vertex_iterator vertex_iterator
Adaptive_Data_Model Color_1_Model
The statistical model used for color_1.
void compute_vertex_normal(const vertex_descriptor &v, const HalfedgeGraph &_pMesh)
int m_NumberRegion
Number of regions for JCW.
bool operator!=(const Point_Int &Pt) const
Comparison operatior !=.
Compression_Valence_Component(void)
Default Constructor.
GraphTraits::face_descriptor face_descriptor
bool operator!=(const Color_Unit &m_color) const
Comparison operatior !=.
float C1_Min
The C1 minimum.
void init_vertex_attributes(const vertex_descriptor &v)
void Write_Base_Mesh(const HalfedgeGraph &pMesh, Arithmetic_Codec &Enc, unsigned &Connectivity_size, unsigned &Color_size, const int &Num_color_base_mesh, const PointMap *_pm)
Writes a base mesh.
void Un_Decimation_Conquest(HalfedgeGraph &pMesh, Arithmetic_Codec &Decoder, const int &Component_ID, PointMap *_pm, VertexColorMap *_v_cm)
Decoding of the decimation conquest.
FEVV::Vertex_pmap< HalfedgeGraph, int > vertex_Seed_Edge
~Compression_Valence_Component()
Destructor.
std::vector< int > m_N_treated_vertices
Number of treated vertices in each region.
void Recalculate_Component_Area(HalfedgeGraph &pMesh, const PointMap *_pm, const int &Component_ID, int &Number_facets)
Update the area of each component.
int C0_Range
The C0 range.
std::vector< int > m_Number_Vertices_Per_Regions
Number of vertices in each region.
bool Sequence
Decompression mode (sequence mode or file mode) for IHM.
FEVV::Vertex_pmap< HalfedgeGraph, int > Vertex_Flag
bool operator==(const Color_Unit &m_color) const
Comparison operatior ==.
FILE * Dec_Info
File to write information of decompression for IHM.
std::vector< std::list< Color_Unit > > VertexColor
Contain color error of all removed vertices.
FEVV::Face_pmap< HalfedgeGraph, Vector > facet_normal
int Process_level
Level of processed LoD for IHM.
void write_intermediate_mesh(HalfedgeGraph &_pMesh, const VertexColorMap *_v_cm)
Write intermediate mesh to file.
int Smallest_Gamma
The smallest gamma.
GraphTraits::face_iterator face_iterator
GraphTraits::vertex_descriptor vertex_descriptor
int Regulation(HalfedgeGraph &_pMesh, const bool Normal_flipping, const bool Use_metric, const float &Metric_thread, const bool Use_forget_metric, const int &Forget_value, const int &Component_ID, const PointMap *_pm)
Removal of a set of independent vertices.
void compute_normals_per_vertex(const HalfedgeGraph &_pMesh)
int m_NumberBin
Number of bins for JCW.
float C2_Min
The C2 minimum.
Point3d Barycenter_Patch_After_Removal(const halfedge_descriptor &h, const int &valence, const HalfedgeGraph &_pMesh, const PointMap *_pm)
gives the position of the barycenter of the patch for decimation conquest.
std::vector< std::list< int > > Connectivity
The information of connectivity to compress.
std::vector< int > NumberDecimation
To stock number of Decimation operation.
std::vector< double > ComponentArea
The area of each component.
const Point_Int operator-(const Point_Int &Pt) const
Negation operator.
bool v_inf_to_v(const vertex_descriptor &v1, const vertex_descriptor &v2, const PointMap *_pm)
bool Error_Projected_Surface(const HalfedgeGraph &_pMesh, const PointMap *_pm, const halfedge_descriptor &_h, const int &_Component_ID, const double &Mean_color, const double &Mean_area)
Calculate an error cause by a vertex removal and decide in order not to remove an important vertex.
Point_Int Inverse_Frenet_Rotation(const Point_Int &Frenet, const Vector &T1, const Vector &T2, const Vector &normal)
Inverse operation of frenet rotation. This permits to refind the original coordinates.
FEVV::Face_pmap< HalfedgeGraph, int > facet_Component_Number
int Current_level
The current level.
void Retriangulation(HalfedgeGraph &pMesh, const halfedge_descriptor &ch, const unsigned &valence, const unsigned &Vertex_number, const int &Component_ID, const PointMap *_pm)
Retriangulates the hole left by a removal of a vertex.
std::string halfedge_to_string(const halfedge_descriptor &h, const HalfedgeGraph &_pMesh, const PointMap *_pm)
boost::graph_traits< HalfedgeGraph > GraphTraits
std::vector< double > HighestLengthBB
The highest length bb.
std::vector< int > NumberColorQuantization
Number of color quantizations.
std::vector< std::list< int > > ListOperation
The list of operation.
std::vector< std::list< int > > NumberProcessedVertices
Number of processed vertices.
void Augment_Color_Quantization_Precision(HalfedgeGraph &_pMesh, Arithmetic_Codec &Decoder, const int &Component_ID, VertexColorMap *_v_cm)
Refine quantization precision of mesh color coordinates.
std::list< Point_Int > JCW_Geometry
Stock geometry information for JCW.
void Compression(HalfedgeGraph &pMesh, const char *File_Name, const int &Qbit, unsigned &Connectivity_size, unsigned &Color_size, unsigned &Total_size, const PointMap *_pm)
Compressions.
std::vector< std::list< int > > ColorChildcellIndex
the color childcell index
void DBG_print_mesh_geometry(const HalfedgeGraph &_pMesh, const PointMap *_pm, const std::string &header=std::string())
bool Is_Complete_Reversibility_Enabled
const Color_Unit operator+(const Color_Unit &m_color) const
Addition operator.
double m_Rmin
Distance of farthest vertex from mesh center for JCW.
bool Is_Bijection_Enabled
true if "bijection" option is seleted
typename Vertex_pmap_traits< MeshT, ValueT >::pmap_type Vertex_pmap
std::vector< std::list< Point_Int > > Geometry
The geometry information to compress.
bool Remove_Edges(HalfedgeGraph &_pMesh, const halfedge_descriptor &h, const int &type)
Remove edges to create a hole.
Color_Unit Get_Average_Vertex_Color_After_Removal(const halfedge_descriptor &h, const int &valence, const HalfedgeGraph &_pMesh)
Gets an average color of neighboring vertices ( After removal of front vertex of h)
std::vector< std::list< int > > AlphaOffset
The offset of alpha.
Vector Triangle_Normal(const HalfedgeGraph &_pMesh, const Point3d &P, const Point3d &Q, const Point3d &R)
Gives a normal vector of the triangle formed by three points P Q R in the counterclockwise way....
double m_Dist
Distance of each bin.
int Total_layer
The total number of layer.
const Color_Unit operator-(const Color_Unit &m_color) const
Negation operator.
std::vector< float > xmin
The xmin.
FEVV::Vertex_pmap< HalfedgeGraph, Vector > vertex_normal
unsigned calculate_current_decoded_size(void)
Vector Triangle_Normal(const HalfedgeGraph &_pMesh, const PointMap *_pm, const halfedge_descriptor &h)
Gives a normal vector of the triangle containing the halfedge_handle h.
int Visu_level
Level of visualized LoD for IHM.
const Point_Int operator+(const Point_Int &Pt) const
Addition operator.
std::vector< float > zmin
The zmin.
int Division_Threshold
Threshold of region division.
boost::graph_traits< MeshT >::vertex_descriptor vertex_descriptor
void print_vertex(const std::string &title, const vertex_descriptor &v, const PointMap *_pm)
EnrichedPolyhedron::Halfedge_handle Halfedge_handle
void Write_Info(HalfedgeGraph &pMesh)
Write information of each LoD at decompression in a file.
int Number_non_reversible_vertices
Color_Unit Get_Average_Vertex_Color_Lee(const halfedge_descriptor &h, const int &valence, const HalfedgeGraph &_pMesh)
Gets an average vertex color prediction using Lee's method.
bool Is_Division_Big_Regions_Enabled
int C1_Range
The C1 range.
EnrichedPolyhedron::Point_3 Point3d
Point_Int Change_Real_Int(const Point3d &pt, const int &Component_ID)
Change from real to int point(related to quantization bit)
bool Is_Manifold_Property_Violated(const HalfedgeGraph &_pMesh, const halfedge_descriptor &h, const int &type, const int &valence)
Query if removal of this vertex would violate the manifold_property or not.
void Diminush_Color_Quantization_Precision(HalfedgeGraph &pMesh, const int Component_ID, VertexColorMap *_v_cm)
Reduces quantization precision of color coordinates.
std::list< int > m_Watermarks
watermark
std::vector< int > ComponentNumberVertices
The number of vertices of each components.
int Get_Correct_Vector(int i, int j, int k)
ADAPTIVE_QUANTIZATION : gets symbols to correct Vector of under_quantization.
std::vector< std::list< int > > QuantizationCorrectVector
The quantization correct vector.
FEVV::Vertex_pmap< HalfedgeGraph, int > vertex_Q_Index
void Simplification(HalfedgeGraph &pMesh, const PointMap *_pm, const int &NVertices, const bool Is_normal_flipping_selected, const bool Is_use_metric_selected, const float &Metric_thread, const bool Is_use_forget_metric_selected, const int &Forget_value)
Mesh Simplification which applies iteratively decimation and regulation in pair.
bool IsCompressed
true if is compressed
Arithmetic_Codec Decoder
The arithmetic decoder.
std::vector< float > xmax
The xmax.
int Find_Type(const HalfedgeGraph &_pMesh, const halfedge_descriptor &h, const int &valence)
To find a correspondent type to retriangulate.
bool Is_Normal_Flipping_Occured(const HalfedgeGraph &_pMesh, const PointMap *_pm, const halfedge_descriptor &h, const unsigned &valence)
Query if removal of the front vertex can cause a normal flipping problem.
bool Possible_change_sequence
FEVV::Geometry_traits< HalfedgeGraph >::Vector Vector
GraphTraits::halfedge_iterator halfedge_iterator
std::list< Point_Int > InterGeometry
The intermediate information of geometry.
std::vector< int > ComponentOperations
The operations of each component.
unsigned Initial_file_size
Size of the initial file.
std::vector< double > m_Rad_decision
float Color_Quantization_Step
The color quantization step.
Point3d Change_Int_Real(const Point_Int &pt, const int &Component_ID)
Change from int to real point(related to quantization bit)
FEVV::Face_pmap< HalfedgeGraph, int > Facet_Flag
void print_halfedge(const std::string &title, const halfedge_descriptor &h, const HalfedgeGraph &_pMesh, const PointMap *_pm)
double m_VC[3]
Mesh center position for JCW.
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)...
double Area_Facet_Triangle(const typename boost::graph_traits< HalfedgeGraph >::halfedge_descriptor &h, const HalfedgeGraph &mesh, const PointMap *pm)
Gives an area of the triangle which contain the halfedge_handle h.
void compute_facet_normal(const face_descriptor &f, const HalfedgeGraph &_pMesh, const PointMap *_pm)
void truncate_colors(const HalfedgeGraph &_pMesh, VertexColorMap *_v_cm)
static void copy_mesh(const HalfedgeGraph &_pMesh, const VertexColorMap *_v_cm, HalfedgeGraph &mesh_copy, VertexColorMap *v_cm_copy)
Copy the current mesh and vertex-color map to a new mesh and vertex-color map. If v_cm_copy == nullpt...
std::list< int > m_N_Errors
Index of error related to complete reversibility.
void compute_normals_per_facet(const HalfedgeGraph &_pMesh, const PointMap *_pm)
FEVV::Vertex_pmap< HalfedgeGraph, int > vertex_Component_Number
std::vector< bool > IsClosed
The is closed. To know if the mesh is open or closed.
std::vector< float > ymax
The ymax.
std::string Main_Function(HalfedgeGraph &pMesh, PointMap *_pm, VertexColorMap *_v_cm, const std::string &Input_File_Name, const std::string &File_Name, const int &Qbit, const int &NVertices, const bool Is_normal_flipping_selected, const bool Is_use_metric_selected, const float &Metric_thread, const bool Is_use_forget_metric_selected, const int &Forget_value, const bool Is_compression_selected, const bool Is_adaptive_quantization_selected, const bool Is_bijection_selected)
Main function of compression.
int Decimation_Conquest(HalfedgeGraph &pMesh, const PointMap *_pm, const bool Is_normal_flipping_selected, const bool Is_use_metric_selected, const float &Metric_thread, const bool Is_use_forget_metric_selected, const int &Forget_value, const int &Component_ID)
Removal of a set of independent vertices.
std::vector< std::list< int > > ColorEncoderIndex
the color encoder index
unsigned Calculate_Current_File_Size(void)
Calculates the current file size. Measure bits used for decompression.
FEVV::Vertex_pmap< HalfedgeGraph, int > vertex_Removal_Order
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...
int Smallest_Alpha
The smallest alpha.