| 487 | /// -------------------------| Definitions of helper functions|------------------------- |
| 488 | |
| 489 | void |
| 490 | printText (pcl::visualization::PCLVisualizer::Ptr viewer_arg) |
| 491 | { |
| 492 | std::string on_str = "ON"; |
| 493 | std::string off_str = "OFF"; |
| 494 | if (!viewer_arg->updateText ("Press (1-n) to show different elements (d) to disable this", 5, 72, 12, 1.0, 1.0, 1.0, "hud_text")) |
| 495 | viewer_arg->addText ("Press (1-n) to show different elements", 5, 72, 12, 1.0, 1.0, 1.0, "hud_text"); |
| 496 | |
| 497 | std::string temp = "(1) Supervoxel Normals, currently " + ( (show_normals) ? on_str : off_str); |
| 498 | if (!viewer_arg->updateText (temp, 5, 60, 10, 1.0, 1.0, 1.0, "normals_text")) |
| 499 | viewer_arg->addText (temp, 5, 60, 10, 1.0, 1.0, 1.0, "normals_text"); |
| 500 | |
| 501 | temp = "(2) Adjacency Graph, currently " + ( (show_adjacency) ? on_str : off_str) + "\n White: convex; Red: concave"; |
| 502 | if (!viewer_arg->updateText (temp, 5, 38, 10, 1.0, 1.0, 1.0, "graph_text")) |
| 503 | viewer_arg->addText (temp, 5, 38, 10, 1.0, 1.0, 1.0, "graph_text"); |
| 504 | |
| 505 | temp = "(3) Press to show " + ( (show_supervoxels) ? std::string ("SEGMENTATION") : std::string ("SUPERVOXELS")); |
| 506 | if (!viewer_arg->updateText (temp, 5, 26, 10, 1.0, 1.0, 1.0, "supervoxel_text")) |
| 507 | viewer_arg->addText (temp, 5, 26, 10, 1.0, 1.0, 1.0, "supervoxel_text"); |
| 508 | |
| 509 | temp = "(4/5) Press to increase/decrease normals scale, currently " + boost::str (boost::format ("%.3f") % normals_scale); |
| 510 | if (!viewer_arg->updateText (temp, 5, 14, 10, 1.0, 1.0, 1.0, "normals_scale_text")) |
| 511 | viewer_arg->addText (temp, 5, 14, 10, 1.0, 1.0, 1.0, "normals_scale_text"); |
| 512 | } |
| 513 | |
| 514 | void |
| 515 | removeText (pcl::visualization::PCLVisualizer::Ptr viewer_arg) |
no test coverage detected