/////////////////////////////////////////////////////////////////////////////////////////
| 76 | |
| 77 | ////////////////////////////////////////////////////////////////////////////////////////////// |
| 78 | void |
| 79 | pcl::visualization::PCLVisualizerInteractorStyle::Initialize () |
| 80 | { |
| 81 | modifier_ = pcl::visualization::INTERACTOR_KB_MOD_ALT; |
| 82 | // Set windows size (width, height) to unknown (-1) |
| 83 | win_height_ = win_width_ = -1; |
| 84 | win_pos_x_ = win_pos_y_ = 0; |
| 85 | max_win_height_ = max_win_width_ = -1; |
| 86 | |
| 87 | // Grid is disabled by default |
| 88 | grid_enabled_ = false; |
| 89 | grid_actor_ = vtkSmartPointer<vtkLegendScaleActor>::New (); |
| 90 | |
| 91 | // LUT is disabled by default |
| 92 | lut_enabled_ = false; |
| 93 | lut_actor_ = vtkSmartPointer<vtkScalarBarActor>::New (); |
| 94 | lut_actor_->SetTitle (""); |
| 95 | lut_actor_->SetOrientationToHorizontal (); |
| 96 | lut_actor_->SetPosition (0.05, 0.01); |
| 97 | lut_actor_->SetWidth (0.9); |
| 98 | lut_actor_->SetHeight (0.1); |
| 99 | lut_actor_->SetNumberOfLabels (lut_actor_->GetNumberOfLabels () * 2); |
| 100 | vtkSmartPointer<vtkTextProperty> prop = lut_actor_->GetLabelTextProperty (); |
| 101 | prop->SetFontSize (10); |
| 102 | lut_actor_->SetLabelTextProperty (prop); |
| 103 | lut_actor_->SetTitleTextProperty (prop); |
| 104 | |
| 105 | // Create the image filter and PNG writer objects |
| 106 | wif_ = vtkSmartPointer<vtkWindowToImageFilter>::New (); |
| 107 | wif_->ReadFrontBufferOff (); |
| 108 | snapshot_writer_ = vtkSmartPointer<vtkPNGWriter>::New (); |
| 109 | snapshot_writer_->SetInputConnection (wif_->GetOutputPort ()); |
| 110 | |
| 111 | init_ = true; |
| 112 | |
| 113 | stereo_anaglyph_mask_default_ = true; |
| 114 | |
| 115 | // Start in orient mode |
| 116 | Superclass::CurrentMode = ORIENT_MODE; |
| 117 | |
| 118 | // Add our own mouse callback before any user callback. Used for accurate point picking. |
| 119 | mouse_callback_ = vtkSmartPointer<pcl::visualization::PointPickingCallback>::New (); |
| 120 | AddObserver (vtkCommand::LeftButtonPressEvent, mouse_callback_); |
| 121 | AddObserver (vtkCommand::LeftButtonReleaseEvent, mouse_callback_); |
| 122 | } |
| 123 | |
| 124 | ////////////////////////////////////////////////////////////////////////////////////////////// |
| 125 | void |
no test coverage detected