MCPcopy Create free account
hub / github.com/PointCloudLibrary/pcl / Initialize

Method Initialize

visualization/src/interactor_style.cpp:78–122  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

76
77//////////////////////////////////////////////////////////////////////////////////////////////
78void
79pcl::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//////////////////////////////////////////////////////////////////////////////////////////////
125void

Callers 14

createInteractorMethod · 0.45
setupInteractorMethod · 0.45
setupStyleMethod · 0.45
WindowMethod · 0.45
displayMethod · 0.45
spinOnceMethod · 0.45
ImageViewerMethod · 0.45
plotMethod · 0.45
spinOnceMethod · 0.45
renderOnceMethod · 0.45
startInteractorMethod · 0.45
createActorMethod · 0.45

Calls 3

NewFunction · 0.85
SetWidthMethod · 0.80
SetHeightMethod · 0.80

Tested by

no test coverage detected