diff --git a/Surface_reconstruction_3/demo/Surface_reconstruction_3/poisson/PoissonDoc.cpp b/Surface_reconstruction_3/demo/Surface_reconstruction_3/poisson/PoissonDoc.cpp index 1078a499746..a34b88362f2 100644 --- a/Surface_reconstruction_3/demo/Surface_reconstruction_3/poisson/PoissonDoc.cpp +++ b/Surface_reconstruction_3/demo/Surface_reconstruction_3/poisson/PoissonDoc.cpp @@ -159,12 +159,12 @@ CPoissonDoc::CPoissonDoc() m_number_of_neighbours = 7; // Outliers removal - m_min_cameras_cone_angle = 0.5; // min angle of camera's cone (degrees) - m_threshold_percent_avg_knn_sq_dst = 5.0; // percentage of outliers to remove + m_min_cameras_cone_angle = 0.5; // min angle of camera's cone (degrees) + m_threshold_percent_avg_knn_sq_dst = 5.0; // percentage of outliers to remove // Point set simplification m_clustering_step = 0.004; // Grid's step for simplification by clustering - m_random_simplification_percentage = 50.0; // percentage of random points to remove + m_random_simplification_percentage = 50.0; // percentage of random points to remove } CPoissonDoc::~CPoissonDoc() @@ -303,7 +303,7 @@ BOOL CPoissonDoc::OnOpenDocument(LPCTSTR lpszPathName) prompt_message("Unable to read file"); return FALSE; } - + // Set options for Gyroviz file m_number_of_neighbours = 50; } @@ -320,7 +320,7 @@ BOOL CPoissonDoc::OnOpenDocument(LPCTSTR lpszPathName) prompt_message("Unable to read file"); return FALSE; } - + // Set options for Gyroviz file m_number_of_neighbours = 50; } @@ -486,9 +486,9 @@ void CPoissonDoc::update_status() selected_points.Format("%d selected",m_points.nb_selected_points()); // write message to cerr - std::cerr << "=> " << points << " (" << selected_points << "), " + std::cerr << "=> " << points << " (" << selected_points << "), " << (CGAL::Memory_sizer().virtual_size()>>20) << " Mb allocated, " - << "largest free block=" << (long(taucs_available_memory_size())>>20) << " Mb, " + << "largest free block=" << long(taucs_available_memory_size()/1048576.0) << " Mb, " << "#blocks over 100 Mb=" << CGAL::Peak_memory_sizer().count_free_memory_blocks(100*1048576) << std::endl; @@ -510,7 +510,7 @@ void CPoissonDoc::update_status() // write message to cerr std::cerr << "=> " << vertices << ", " << tets << ", " << (CGAL::Memory_sizer().virtual_size()>>20) << " Mb allocated, " - << "largest free block=" << (long(taucs_available_memory_size())>>20) << " Mb, " + << "largest free block=" << long(taucs_available_memory_size()/1048576.0) << " Mb, " << "#blocks over 100 Mb=" << CGAL::Peak_memory_sizer().count_free_memory_blocks(100*1048576) << std::endl; @@ -652,13 +652,13 @@ void CPoissonDoc::OnAlgorithmsOrientNormalsWithMST() BeginWaitCursor(); status_message("Orient Normals with MST..."); CGAL::Timer task_timer; task_timer.start(); - + CGAL::orient_normals_minimum_spanning_tree_3(m_points.begin(), m_points.end(), get(boost::vertex_index, m_points), get(CGAL::vertex_point, m_points), get(boost::vertex_normal, m_points), m_number_of_neighbours); - + // Select non-oriented normals m_points.select(m_points.begin(), m_points.end(), false); for (int i=0; idelaunay_refinement_shell(m_dr_shell_size,m_dr_sizing,m_dr_max_vertices); m_triangulation_refined = true; - status_message("Delaunay refinement in surface shell...done (%.2lf s, %d vertices inserted)", + status_message("Delaunay refinement in surface shell...done (%.2lf s, %d vertices inserted)", task_timer.time(), nb_vertices_added); update_status(); UpdateAllViews(NULL); @@ -994,7 +994,7 @@ void CPoissonDoc::OnAlgorithmsMarchingTetContouring() int nb = m_poisson_dt->marching_tet(std::back_inserter(triangles), m_contouring_value); m_contour.insert(m_contour.end(), triangles.begin(), triangles.end()); - status_message("Marching tet contouring...done (%d triangles, %.2lf s)", + status_message("Marching tet contouring...done (%d triangles, %.2lf s)", nb, task_timer.time()); update_status(); UpdateAllViews(NULL); @@ -1160,7 +1160,7 @@ void CPoissonDoc::OnAlgorithmsOutliersRemovalWrtCamerasConeAngle() CGAL::Timer task_timer; task_timer.start(); // Select points to delete - Point_set::iterator first_iterator_to_remove = + Point_set::iterator first_iterator_to_remove = remove_outliers_wrt_camera_cone_angle_3( m_points.begin(), m_points.end(), m_min_cameras_cone_angle*M_PI/180.0); @@ -1187,9 +1187,9 @@ void CPoissonDoc::OnOutliersRemovalWrtAvgKnnSqDist() BeginWaitCursor(); status_message("Remove outliers wrt average squared distance to knn..."); CGAL::Timer task_timer; task_timer.start(); - + // Select points to delete - Point_set::iterator first_iterator_to_remove = + Point_set::iterator first_iterator_to_remove = CGAL::remove_outliers_wrt_avg_knn_sq_distance_3( m_points.begin(), m_points.end(), m_number_of_neighbours, @@ -1243,7 +1243,7 @@ void CPoissonDoc::OnReconstructionApssReconstruction() // Create implicit function CGAL_TRACE_STREAM << " APSS_implicit_function(knn="<>20); //CGAL_TRACE(" Peak_memory_sizer: PeakWorkingSetSize=%ld Mb\n", pmc.PeakWorkingSetSize>>20); //CGAL_TRACE(" Peak_memory_sizer: PeakPagefileUsage=%ld Mb\n", pmc.PeakPagefileUsage>>20); - + // LS 10/2008: PeakPagefileUsage seems unreliable, thus we use an approximation: size_t memory_paged_out = (pmc.PagefileUsage>pmc.WorkingSetSize) ? (pmc.PagefileUsage-pmc.WorkingSetSize) : 0; size_t approximate_peak_virtual_size = pmc.PeakWorkingSetSize + memory_paged_out; //CGAL_TRACE(" Peak_memory_sizer: approximate_peak_virtual_size=%ld Mb\n", approximate_peak_virtual_size>>20); - + result = virtual_size ? approximate_peak_virtual_size : pmc.PeakWorkingSetSize; } @@ -86,7 +86,7 @@ private: #else // Not yet implemented - return 0; + return 0; #endif } }; diff --git a/Surface_reconstruction_3/include/CGAL/Poisson_implicit_function.h b/Surface_reconstruction_3/include/CGAL/Poisson_implicit_function.h index 7870330514d..e42a5ae73a7 100644 --- a/Surface_reconstruction_3/include/CGAL/Poisson_implicit_function.h +++ b/Surface_reconstruction_3/include/CGAL/Poisson_implicit_function.h @@ -647,9 +647,9 @@ public: long old_max_memory = CGAL::Peak_memory_sizer().peak_virtual_size(); - CGAL_TRACE(" %ld Mb allocated, largest free memory block=%ld Mb, #blocks over 100 Mb=%ld\n", + CGAL_TRACE(" %ld Mb allocated, largest free memory block=%ld Mb, #blocks over 100 Mb=%ld\n", long(CGAL::Memory_sizer().virtual_size())>>20, - long(taucs_available_memory_size())>>20, + long(taucs_available_memory_size()/1048576.0), long(CGAL::Peak_memory_sizer().count_free_memory_blocks(100*1048576))); CGAL_TRACE(" Create matrix\n"); @@ -690,9 +690,9 @@ public: *duration_solve = (clock() - time_init)/CLOCKS_PER_SEC; */ - CGAL_TRACE(" %ld Mb allocated, largest free memory block=%ld Mb, #blocks over 100 Mb=%ld\n", + CGAL_TRACE(" %ld Mb allocated, largest free memory block=%ld Mb, #blocks over 100 Mb=%ld\n", long(CGAL::Memory_sizer().virtual_size())>>20, - long(taucs_available_memory_size())>>20, + long(taucs_available_memory_size()/1048576.0), long(CGAL::Peak_memory_sizer().count_free_memory_blocks(100*1048576))); CGAL_TRACE(" Choleschy factorization\n"); @@ -707,10 +707,10 @@ public: if (max_memory > old_max_memory) CGAL_TRACE(" Max allocation = %ld Mb\n", max_memory>>20); - CGAL_TRACE(" %ld Mb allocated, largest free memory block=%ld Mb, #blocks over 100 Mb=%ld\n", + CGAL_TRACE(" %ld Mb allocated, largest free memory block=%ld Mb, #blocks over 100 Mb=%ld\n", long(CGAL::Memory_sizer().virtual_size())>>20, - long(taucs_available_memory_size())>>20, - CGAL::Peak_memory_sizer().count_free_memory_blocks(100*1048576)); + long(taucs_available_memory_size()/1048576.0), + long(CGAL::Peak_memory_sizer().count_free_memory_blocks(100*1048576))); CGAL_TRACE(" Direct solve by forward and backward substitution\n"); // Direct solve by forward and backward substitution @@ -741,9 +741,9 @@ public: if(!v->constrained()) v->f() = X[index++]; - CGAL_TRACE(" %ld Mb allocated, largest free memory block=%ld Mb, #blocks over 100 Mb=%ld\n", + CGAL_TRACE(" %ld Mb allocated, largest free memory block=%ld Mb, #blocks over 100 Mb=%ld\n", long(CGAL::Memory_sizer().virtual_size())>>20, - long(taucs_available_memory_size())>>20, + long(taucs_available_memory_size()/1048576.0), long(CGAL::Peak_memory_sizer().count_free_memory_blocks(100*1048576))); CGAL_TRACE("End of solve_poisson()\n");