/////////////////////////////////////////////////////////////////////////////////////
| 790 | |
| 791 | ////////////////////////////////////////////////////////////////////////////////////////// |
| 792 | void |
| 793 | pcl::visualization::ImageViewer::markPoint ( |
| 794 | std::size_t u, std::size_t v, Vector3ub fg_color, Vector3ub bg_color, double radius, |
| 795 | const std::string &layer_id, double opacity) |
| 796 | { |
| 797 | // Check to see if this ID entry already exists (has it been already added to the visualizer?) |
| 798 | auto am_it = std::find_if (layer_map_.begin (), layer_map_.end (), LayerComparator (layer_id)); |
| 799 | if (am_it == layer_map_.end ()) |
| 800 | { |
| 801 | PCL_DEBUG ("[pcl::visualization::ImageViewer::markPoint] No layer with ID='%s' found. Creating new one...\n", layer_id.c_str ()); |
| 802 | am_it = createLayer (layer_id, getSize ()[0] - 1, getSize ()[1] - 1, opacity, false); |
| 803 | } |
| 804 | |
| 805 | vtkSmartPointer<context_items::Point> point = vtkSmartPointer<context_items::Point>::New (); |
| 806 | point->setColors (fg_color[0], fg_color[1], fg_color[2]); |
| 807 | point->setOpacity (opacity); |
| 808 | |
| 809 | vtkSmartPointer<context_items::Disk> disk = vtkSmartPointer<context_items::Disk>::New (); |
| 810 | disk->setColors (bg_color[0], bg_color[1], bg_color[2]); |
| 811 | disk->setOpacity (opacity); |
| 812 | |
| 813 | point->set (static_cast<float> (u), static_cast<float> (v)); |
| 814 | disk->set (static_cast<float> (u), static_cast<float> (v), static_cast<float> (radius)); |
| 815 | |
| 816 | am_it->actor->GetScene ()->AddItem (disk); |
| 817 | am_it->actor->GetScene ()->AddItem (point); |
| 818 | } |
| 819 | |
| 820 | ////////////////////////////////////////////////////////////////////////////////////////// |
| 821 | void |
no test coverage detected