Skip to content

Commit

Permalink
Merge pull request #1769 from wkentaro/tools-mesh-sampling-no-vis-result
Browse files Browse the repository at this point in the history
Option for no blocking with visualization on mesh_sampling
  • Loading branch information
jspricke authored Dec 2, 2016
2 parents c7dfc30 + de28f7c commit 491cc0f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/mesh_sampling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ printHelp (int, char **argv)
" -leaf_size X = the XYZ leaf size for the VoxelGrid -- for data reduction (default: ");
print_value ("%f", default_leaf_size);
print_info (" m)\n");
print_info (
" -no_vis_result = flag to stop visualizing the generated pcd\n");
}

/* ---[ */
Expand All @@ -172,6 +174,7 @@ main (int argc, char **argv)
parse_argument (argc, argv, "-n_samples", SAMPLE_POINTS_);
float leaf_size = default_leaf_size;
parse_argument (argc, argv, "-leaf_size", leaf_size);
bool vis_result = ! find_switch (argc, argv, "-no_vis_result");

// Parse the command line arguments for .ply and PCD files
std::vector<int> pcd_file_indices = parse_file_extension_argument (argc, argv, ".pcd");
Expand Down Expand Up @@ -218,7 +221,6 @@ main (int argc, char **argv)
polydata1 = triangleMapper->GetInput();

bool INTER_VIS = false;
bool VIS = true;

if (INTER_VIS)
{
Expand Down Expand Up @@ -246,7 +248,7 @@ main (int argc, char **argv)
pcl::PointCloud<pcl::PointXYZ>::Ptr res(new pcl::PointCloud<pcl::PointXYZ>);
grid_.filter (*res);

if (VIS)
if (vis_result)
{
visualization::PCLVisualizer vis3 ("VOXELIZED SAMPLES CLOUD");
vis3.addPointCloud (res);
Expand Down

0 comments on commit 491cc0f

Please sign in to comment.