Skip to content

Commit

Permalink
boost -> std thread, clean up bad merge
Browse files Browse the repository at this point in the history
  • Loading branch information
chambbj committed Jan 26, 2015
1 parent 0a11234 commit 963f3f8
Showing 1 changed file with 1 addition and 39 deletions.
40 changes: 1 addition & 39 deletions kernels/Kernel.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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<pcl::PointXYZ>::Ptr input_cloud(new pcl::PointCloud<pcl::PointXYZ>);
pclsupport::PDALtoPCD(const_cast<PointBuffer&>(*input_buffer), *input_cloud, input_bounds);
pcl::PointCloud<pcl::PointXYZ>::Ptr output_cloud(new pcl::PointCloud<pcl::PointXYZ>);
pclsupport::PDALtoPCD(const_cast<PointBuffer&>(*output_buffer), *output_cloud, output_bounds);
// Create PCLVisualizer
std::shared_ptr<pcl::visualization::PCLVisualizer> 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<pcl::PointXYZ> input_color(input_cloud, "z");
pcl::visualization::PointCloudColorHandlerGenericField<pcl::PointXYZ> 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<pcl::PointXYZ> (input_cloud, input_color, "cloud");
p->createViewPort(0.5, 0, 1, 1, viewport);
p->addPointCloud<pcl::PointXYZ> (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
}
*/
Expand Down

0 comments on commit 963f3f8

Please sign in to comment.