diff --git a/kernels/Kernel.cpp b/kernels/Kernel.cpp index 4ba219807b..e4b6d0ca83 100644 --- a/kernels/Kernel.cpp +++ b/kernels/Kernel.cpp @@ -368,7 +368,6 @@ void Kernel::visualize(PointBufferPtr buffer) const void Kernel::visualize(PointBufferPtr input_buffer, PointBufferPtr output_buffer) const { #ifdef PDAL_HAVE_PCL_VISUALIZE -<<<<<<< HEAD int viewport = 0; // Determine XYZ bounds @@ -402,45 +401,8 @@ void Kernel::visualize(PointBufferPtr input_buffer, PointBufferPtr output_buffer while (!p->wasStopped()) { p->spinOnce(100); - boost::this_thread::sleep(boost::posix_time::microseconds(100000)); + std::this_thread::sleep_for(std::chrono::microseconds(100000)); } -======= - int viewport = 0; - - // Determine XYZ bounds - BOX3D const& input_bounds = input_buffer->calculateBounds(); - BOX3D const& output_bounds = output_buffer->calculateBounds(); - - // Convert PointBuffer to a PCL PointCloud - pcl::PointCloud::Ptr input_cloud(new pcl::PointCloud); - pclsupport::PDALtoPCD(const_cast(*input_buffer), *input_cloud, input_bounds); - pcl::PointCloud::Ptr output_cloud(new pcl::PointCloud); - pclsupport::PDALtoPCD(const_cast(*output_buffer), *output_cloud, output_bounds); - - // Create PCLVisualizer - std::shared_ptr p(new pcl::visualization::PCLVisualizer("3D Viewer")); - - // Set background to black - p->setBackgroundColor(0, 0, 0); - - // Use Z dimension to colorize points - pcl::visualization::PointCloudColorHandlerGenericField input_color(input_cloud, "z"); - pcl::visualization::PointCloudColorHandlerGenericField output_color(output_cloud, "z"); - - // Add point cloud to the viewer with the Z dimension color handler - p->createViewPort(0, 0, 0.5, 1, viewport); - p->addPointCloud (input_cloud, input_color, "cloud"); - p->createViewPort(0.5, 0, 1, 1, viewport); - p->addPointCloud (output_cloud, output_color, "cloud1"); - - p->resetCamera(); - - while (!p->wasStopped()) - { - p->spinOnce(100); - boost::this_thread::sleep(boost::posix_time::microseconds(100000)); - } ->>>>>>> d54925e... port over visualization fix from master #endif } */