From 9c1df33aefd4f75f09c6ec26685896ae17ddea6f Mon Sep 17 00:00:00 2001 From: Paolo Cignoni cignoni Date: Tue, 13 Jan 2009 18:28:48 +0000 Subject: [PATCH] updated logging constants --- .../filter_colorize/meshcolorize.cpp | 16 +++++------ .../filter_meshing/meshfilter.cpp | 28 +++++++++---------- src/meshlabplugins/filter_mls/mlsplugin.cpp | 6 ++-- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/meshlabplugins/filter_colorize/meshcolorize.cpp b/src/meshlabplugins/filter_colorize/meshcolorize.cpp index e5a6a3a40..439632621 100644 --- a/src/meshlabplugins/filter_colorize/meshcolorize.cpp +++ b/src/meshlabplugins/filter_colorize/meshcolorize.cpp @@ -218,12 +218,12 @@ bool ExtraMeshColorizePlugin::applyFilter(QAction *filter, MeshModel &m, FilterP if(usePerc) { tri::UpdateColor::VertexQualityRamp(m.cm,PercLo,PercHi); - Log(GLLogStream::Info, "Quality Range: %f %f; Used (%f %f) percentile (%f %f) ",H.MinV(),H.MaxV(),PercLo,PercHi,par.getDynamicFloat("perc"),100-par.getDynamicFloat("perc")); + Log(GLLogStream::FILTER, "Quality Range: %f %f; Used (%f %f) percentile (%f %f) ",H.MinV(),H.MaxV(),PercLo,PercHi,par.getDynamicFloat("perc"),100-par.getDynamicFloat("perc")); } else { tri::UpdateColor::VertexQualityRamp(m.cm,RangeMin,RangeMax); - Log(GLLogStream::Info, "Quality Range: %f %f; Used (%f %f)",H.MinV(),H.MaxV(),RangeMin,RangeMax); + Log(GLLogStream::FILTER, "Quality Range: %f %f; Used (%f %f)",H.MinV(),H.MaxV(),RangeMin,RangeMax); } break; } @@ -235,23 +235,23 @@ bool ExtraMeshColorizePlugin::applyFilter(QAction *filter, MeshModel &m, FilterP } int delvert=tri::Clean::RemoveUnreferencedVertex(m.cm); - if(delvert) Log(GLLogStream::Info, "Pre-Curvature Cleaning: Removed %d unreferenced vertices",delvert); + if(delvert) Log(GLLogStream::FILTER, "Pre-Curvature Cleaning: Removed %d unreferenced vertices",delvert); tri::Allocator::CompactVertexVector(m.cm); tri::UpdateCurvature::MeanAndGaussian(m.cm); int curvType = par.getEnum("CurvatureType"); switch(curvType){ - case 0: tri::UpdateQuality::VertexFromMeanCurvature(m.cm); Log(GLLogStream::Info, "Computed Mean Curvature"); break; - case 1: tri::UpdateQuality::VertexFromGaussianCurvature(m.cm); Log(GLLogStream::Info, "Computed Gaussian Curvature"); break; - case 2: tri::UpdateQuality::VertexFromRMSCurvature(m.cm); Log(GLLogStream::Info, "Computed RMS Curvature"); break; - case 3: tri::UpdateQuality::VertexFromAbsoluteCurvature(m.cm); Log(GLLogStream::Info, "Computed ABS Curvature"); break; + case 0: tri::UpdateQuality::VertexFromMeanCurvature(m.cm); Log(GLLogStream::FILTER, "Computed Mean Curvature"); break; + case 1: tri::UpdateQuality::VertexFromGaussianCurvature(m.cm); Log(GLLogStream::FILTER, "Computed Gaussian Curvature"); break; + case 2: tri::UpdateQuality::VertexFromRMSCurvature(m.cm); Log(GLLogStream::FILTER, "Computed RMS Curvature"); break; + case 3: tri::UpdateQuality::VertexFromAbsoluteCurvature(m.cm); Log(GLLogStream::FILTER, "Computed ABS Curvature"); break; default : assert(0); } Histogramf H; tri::Stat::ComputePerVertexQualityHistogram(m.cm,H); tri::UpdateColor::VertexQualityRamp(m.cm,H.Percentile(0.1f),H.Percentile(0.9f)); - Log(GLLogStream::Info, "Curvature Range: %f %f (Used 90 percentile %f %f) ",H.MinV(),H.MaxV(),H.Percentile(0.1f),H.Percentile(0.9f)); + Log(GLLogStream::FILTER, "Curvature Range: %f %f (Used 90 percentile %f %f) ",H.MinV(),H.MaxV(),H.Percentile(0.1f),H.Percentile(0.9f)); break; } case CP_TRIANGLE_QUALITY: diff --git a/src/meshlabplugins/filter_meshing/meshfilter.cpp b/src/meshlabplugins/filter_meshing/meshfilter.cpp index 68979261f..be7dbebfe 100644 --- a/src/meshlabplugins/filter_meshing/meshfilter.cpp +++ b/src/meshlabplugins/filter_meshing/meshfilter.cpp @@ -192,7 +192,7 @@ const QString ExtraMeshFilterPlugin::filterName(FilterIDType filter) case FP_REMOVE_NON_MANIFOLD_FACE: return QString("Remove Non Manifold Faces"); case FP_REMOVE_NON_MANIFOLD_VERTEX: return QString("Remove Non Manifold Vertices"); case FP_NORMAL_EXTRAPOLATION: return QString("Compute normals for point sets"); - case FP_COMPUTE_PRINC_CURV_DIR: return QString("Compute curvature principal directions "); + case FP_COMPUTE_PRINC_CURV_DIR: return QString("Compute curvature principal directions"); case FP_CLOSE_HOLES: return QString("Close Holes"); @@ -433,26 +433,26 @@ bool ExtraMeshFilterPlugin::applyFilter(QAction *filter, MeshModel &m, FilterPar if(selected) delFaceNum=tri::Clean::RemoveFaceOutOfRangeEdgeSel(m.cm,0,threshold ); else delFaceNum=tri::Clean::RemoveFaceOutOfRangeEdgeSel(m.cm,0,threshold ); m.clearDataMask(MeshModel::MM_FACEFACETOPO | MeshModel::MM_FACEFLAGBORDER); - Log(GLLogStream::Info, "Removed %d faces with and edge longer than %f",delFaceNum,threshold); + Log(GLLogStream::FILTER, "Removed %d faces with and edge longer than %f",delFaceNum,threshold); } if(ID(filter) == (FP_REMOVE_FACES_BY_AREA) ) { int nullFaces=tri::Clean::RemoveFaceOutOfRangeArea(m.cm,0); - Log(GLLogStream::Info, "Removed %d null faces", nullFaces); + Log(GLLogStream::FILTER, "Removed %d null faces", nullFaces); m.clearDataMask(MeshModel::MM_FACEFACETOPO | MeshModel::MM_FACEFLAGBORDER); } if(ID(filter) == (FP_REMOVE_UNREFERENCED_VERTEX) ) { int delvert=tri::Clean::RemoveUnreferencedVertex(m.cm); - Log(GLLogStream::Info, "Removed %d unreferenced vertices",delvert); + Log(GLLogStream::FILTER, "Removed %d unreferenced vertices",delvert); } if(ID(filter) == (FP_REMOVE_DUPLICATED_VERTEX) ) { int delvert=tri::Clean::RemoveDuplicateVertex(m.cm); - Log(GLLogStream::Info, "Removed %d duplicated vertices", delvert); + Log(GLLogStream::FILTER, "Removed %d duplicated vertices", delvert); if (delvert != 0) vcg::tri::UpdateNormals::PerVertexNormalizedPerFace(m.cm); } @@ -461,8 +461,8 @@ bool ExtraMeshFilterPlugin::applyFilter(QAction *filter, MeshModel &m, FilterPar { int nonManif=tri::Clean::RemoveNonManifoldFace(m.cm); - if(nonManif) Log(GLLogStream::Info, "Removed %d Non Manifold Faces", nonManif); - else Log(GLLogStream::Info, "Mesh is two-manifold. Nothing done.", nonManif); + if(nonManif) Log(GLLogStream::FILTER, "Removed %d Non Manifold Faces", nonManif); + else Log(GLLogStream::FILTER, "Mesh is two-manifold. Nothing done.", nonManif); m.clearDataMask(MeshModel::MM_FACEFACETOPO | MeshModel::MM_FACEFLAGBORDER); } @@ -471,8 +471,8 @@ bool ExtraMeshFilterPlugin::applyFilter(QAction *filter, MeshModel &m, FilterPar { int nonManif=tri::Clean::RemoveNonManifoldVertex(m.cm); - if(nonManif) Log(GLLogStream::Info, "Removed %d Non Manifold Vertex", nonManif); - else Log(GLLogStream::Info, "Mesh is two-manifold. Nothing done.", nonManif); + if(nonManif) Log(GLLogStream::FILTER, "Removed %d Non Manifold Vertex", nonManif); + else Log(GLLogStream::FILTER, "Mesh is two-manifold. Nothing done.", nonManif); m.clearDataMask(MeshModel::MM_FACEFACETOPO | MeshModel::MM_FACEFLAGBORDER); } @@ -521,7 +521,7 @@ bool ExtraMeshFilterPlugin::applyFilter(QAction *filter, MeshModel &m, FilterPar } if (ID(filter) == (FP_TRANSFORM) ) { Matrix44f matrixPar= par.getMatrix44("Transform"); - Log(GLLogStream::Info, qPrintable(transformDialog->getLog()) ); + Log(GLLogStream::FILTER, qPrintable(transformDialog->getLog()) ); m.cm.Tr=matrixPar; } @@ -541,11 +541,11 @@ bool ExtraMeshFilterPlugin::applyFilter(QAction *filter, MeshModel &m, FilterPar if(par.getBool("AutoClean")) { int nullFaces=tri::Clean::RemoveFaceOutOfRangeArea(m.cm,0); - if(nullFaces) Log(GLLogStream::Info, "PostSimplification Cleaning: Removed %d null faces", nullFaces); + if(nullFaces) Log(GLLogStream::FILTER, "PostSimplification Cleaning: Removed %d null faces", nullFaces); int deldupvert=tri::Clean::RemoveDuplicateVertex(m.cm); - if(deldupvert) Log(GLLogStream::Info, "PostSimplification Cleaning: Removed %d duplicated vertices", deldupvert); + if(deldupvert) Log(GLLogStream::FILTER, "PostSimplification Cleaning: Removed %d duplicated vertices", deldupvert); int delvert=tri::Clean::RemoveUnreferencedVertex(m.cm); - if(delvert) Log(GLLogStream::Info, "PostSimplification Cleaning: Removed %d unreferenced vertices",delvert); + if(delvert) Log(GLLogStream::FILTER, "PostSimplification Cleaning: Removed %d unreferenced vertices",delvert); m.clearDataMask(MeshModel::MM_FACEFACETOPO | MeshModel::MM_FACEFLAGBORDER); tri::Allocator::CompactVertexVector(m.cm); tri::Allocator::CompactFaceVector(m.cm); @@ -587,7 +587,7 @@ bool ExtraMeshFilterPlugin::applyFilter(QAction *filter, MeshModel &m, FilterPar if(par.getBool("Autoclean")){ int delvert=tri::Clean::RemoveUnreferencedVertex(m.cm); - Log(GLLogStream::Info, "Removed %d unreferenced vertices",delvert); + Log(GLLogStream::FILTER, "Removed %d unreferenced vertices",delvert); } switch(par.getEnum("Method")){ diff --git a/src/meshlabplugins/filter_mls/mlsplugin.cpp b/src/meshlabplugins/filter_mls/mlsplugin.cpp index 6a75a40fb..e97536072 100644 --- a/src/meshlabplugins/filter_mls/mlsplugin.cpp +++ b/src/meshlabplugins/filter_mls/mlsplugin.cpp @@ -387,8 +387,8 @@ bool MlsPlugin::applyFilter(QAction* filter, MeshDocument& md, FilterParameterSe if(md.mm()->cm.fn > 0) { // if we start from a mesh, and it has unreferenced vertices // normals are undefined on that vertices. - int delvert=tri::Clean::RemoveUnreferencedVertex(md.mm()->cm); - if(delvert) Log(GLLogStream::Info, "Pre-MLS Cleaning: Removed %d unreferenced vertices",delvert); + int delvert=tri::Clean::RemoveUnreferencedVertex(md.mm()->cm); + if(delvert) Log(GLLogStream::FILTER, "Pre-MLS Cleaning: Removed %d unreferenced vertices",delvert); } tri::Allocator::CompactVertexVector(md.mm()->cm); @@ -398,7 +398,7 @@ bool MlsPlugin::applyFilter(QAction* filter, MeshDocument& md, FilterParameterSe md.mm()->updateDataMask(MeshModel::MM_VERTRADIUS); APSS mls(md.mm()->cm); mls.computeVertexRaddi(); - Log(GLLogStream::Info, "Mesh has no per vertex radius. Computed and added using default neighbourhood"); + Log(GLLogStream::FILTER, "Mesh has no per vertex radius. Computed and added using default neighbourhood"); } MeshModel* pPoints = 0;