PCLVisualizerInteractorStyle defines an unique, custom VTK based interactory style for PCL Visualizer applications. Besides defining the rendering style, we also create a list of custom actions that are triggered on different keys being pressed: More...
#include <interactor_style.h>
Public Member Functions | |
CloudActorMapPtr | getCloudActorMap () |
Get the cloud actor map pointer. | |
virtual void | Initialize () |
Initialization routine. Must be called before anything else. | |
PCLVisualizerInteractorStyle () | |
Empty constructor. | |
boost::signals2::connection | registerKeyboardCallback (boost::function< void(const pcl::visualization::KeyboardEvent &)> cb) |
Register a callback boost::function for keyboard events. | |
boost::signals2::connection | registerMouseCallback (boost::function< void(const pcl::visualization::MouseEvent &)> cb) |
Register a callback function for mouse events. | |
boost::signals2::connection | registerPointPickingCallback (boost::function< void(const pcl::visualization::PointPickingEvent &)> cb) |
Register a callback function for point picking events. | |
void | saveScreenshot (const std::string &file) |
Save the current rendered image to disk, as a PNG screenshot. | |
void | setCloudActorMap (const CloudActorMapPtr &actors) |
Pass a pointer to the actor map. | |
void | setKeyboardModifier (const InteractorKeyboardModifier &modifier) |
Change the default keyboard modified from ALT to a different special key. Allowed values are: | |
void | setRendererCollection (vtkSmartPointer< vtkRendererCollection > &rens) |
Pass a set of renderers to the interactor style. | |
vtkTypeMacro (PCLVisualizerInteractorStyle, vtkInteractorStyleTrackballCamera) | |
Static Public Member Functions | |
static PCLVisualizerInteractorStyle * | New () |
Protected Member Functions | |
virtual void | OnChar () |
Interactor style internal method. Gets called whenever a key is pressed. | |
virtual void | OnKeyDown () |
virtual void | OnKeyUp () |
virtual void | OnLeftButtonDown () |
virtual void | OnLeftButtonUp () |
virtual void | OnMiddleButtonDown () |
virtual void | OnMiddleButtonUp () |
virtual void | OnMouseMove () |
virtual void | OnMouseWheelBackward () |
virtual void | OnMouseWheelForward () |
virtual void | OnRightButtonDown () |
virtual void | OnRightButtonUp () |
virtual void | OnTimer () |
Interactor style internal method. Gets called periodically if a timer is set. | |
void | zoomIn () |
Interactor style internal method. Zoom in. | |
void | zoomOut () |
Interactor style internal method. Zoom out. | |
Protected Attributes | |
CloudActorMapPtr | actors_ |
Actor map stored internally. | |
vtkSmartPointer< vtkPolyData > | full_data_ |
vtkSmartPointer < vtkLegendScaleActor > | grid_actor_ |
Actor for 2D grid on screen. | |
bool | grid_enabled_ |
Set to true if the grid actor is enabled. | |
bool | init_ |
Set to true after initialization is complete. | |
boost::signals2::signal< void(const pcl::visualization::KeyboardEvent &)> | keyboard_signal_ |
vtkSmartPointer < vtkScalarBarActor > | lut_actor_ |
Actor for 2D lookup table on screen. | |
bool | lut_enabled_ |
Set to true if the LUT actor is enabled. | |
int | max_win_height_ |
The maximum resizeable window width/height. | |
int | max_win_width_ |
InteractorKeyboardModifier | modifier_ |
The keyboard modifier to use. Default: Alt. | |
vtkSmartPointer < PointPickingCallback > | mouse_callback_ |
A VTK Mouse Callback object, used for point picking. | |
boost::signals2::signal< void(const pcl::visualization::MouseEvent &)> | mouse_signal_ |
boost::signals2::signal< void(const pcl::visualization::PointPickingEvent &)> | point_picking_signal_ |
vtkSmartPointer < vtkRendererCollection > | rens_ |
Collection of vtkRenderers stored internally. | |
vtkSmartPointer< vtkPNGWriter > | snapshot_writer_ |
A PNG writer for screenshot captures. | |
bool | stereo_anaglyph_mask_default_ |
True if we're using red-blue colors for anaglyphic stereo, false if magenta-green. | |
vtkSmartPointer < vtkWindowToImageFilter > | wif_ |
Internal window to image filter. Needed by snapshot_writer_. | |
int | win_height_ |
The current window width/height. | |
int | win_pos_x_ |
The current window position x/y. | |
int | win_pos_y_ |
int | win_width_ |
Private Types | |
typedef boost::shared_ptr < CloudActorMap > | CloudActorMapPtr |
Friends | |
class | PointPickingCallback |
PCLVisualizerInteractorStyle defines an unique, custom VTK based interactory style for PCL Visualizer applications. Besides defining the rendering style, we also create a list of custom actions that are triggered on different keys being pressed:
Definition at line 96 of file interactor_style.h.
typedef boost::shared_ptr<CloudActorMap> pcl::visualization::PCLVisualizerInteractorStyle::CloudActorMapPtr [private] |
Definition at line 98 of file interactor_style.h.
Empty constructor.
Definition at line 104 of file interactor_style.h.
Get the cloud actor map pointer.
Definition at line 126 of file interactor_style.h.
void pcl::visualization::PCLVisualizerInteractorStyle::Initialize | ( | ) | [virtual] |
Initialization routine. Must be called before anything else.
Definition at line 56 of file interactor_style.cpp.
static PCLVisualizerInteractorStyle* pcl::visualization::PCLVisualizerInteractorStyle::New | ( | ) | [static] |
void pcl::visualization::PCLVisualizerInteractorStyle::OnChar | ( | ) | [protected, virtual] |
Interactor style internal method. Gets called whenever a key is pressed.
Definition at line 134 of file interactor_style.cpp.
void pcl::visualization::PCLVisualizerInteractorStyle::OnKeyDown | ( | ) | [protected, virtual] |
Definition at line 223 of file interactor_style.cpp.
void pcl::visualization::PCLVisualizerInteractorStyle::OnKeyUp | ( | ) | [protected, virtual] |
Definition at line 752 of file interactor_style.cpp.
void pcl::visualization::PCLVisualizerInteractorStyle::OnLeftButtonDown | ( | ) | [protected, virtual] |
Definition at line 772 of file interactor_style.cpp.
void pcl::visualization::PCLVisualizerInteractorStyle::OnLeftButtonUp | ( | ) | [protected, virtual] |
Definition at line 793 of file interactor_style.cpp.
void pcl::visualization::PCLVisualizerInteractorStyle::OnMiddleButtonDown | ( | ) | [protected, virtual] |
Definition at line 804 of file interactor_style.cpp.
void pcl::visualization::PCLVisualizerInteractorStyle::OnMiddleButtonUp | ( | ) | [protected, virtual] |
Definition at line 823 of file interactor_style.cpp.
void pcl::visualization::PCLVisualizerInteractorStyle::OnMouseMove | ( | ) | [protected, virtual] |
Definition at line 761 of file interactor_style.cpp.
void pcl::visualization::PCLVisualizerInteractorStyle::OnMouseWheelBackward | ( | ) | [protected, virtual] |
Definition at line 877 of file interactor_style.cpp.
void pcl::visualization::PCLVisualizerInteractorStyle::OnMouseWheelForward | ( | ) | [protected, virtual] |
Definition at line 864 of file interactor_style.cpp.
void pcl::visualization::PCLVisualizerInteractorStyle::OnRightButtonDown | ( | ) | [protected, virtual] |
Definition at line 834 of file interactor_style.cpp.
void pcl::visualization::PCLVisualizerInteractorStyle::OnRightButtonUp | ( | ) | [protected, virtual] |
Definition at line 853 of file interactor_style.cpp.
void pcl::visualization::PCLVisualizerInteractorStyle::OnTimer | ( | ) | [protected, virtual] |
Interactor style internal method. Gets called periodically if a timer is set.
Definition at line 890 of file interactor_style.cpp.
boost::signals2::connection pcl::visualization::PCLVisualizerInteractorStyle::registerKeyboardCallback | ( | boost::function< void(const pcl::visualization::KeyboardEvent &)> | cb | ) |
Register a callback boost::function for keyboard events.
[in] | cb | a boost function that will be registered as a callback for a keyboard event |
Definition at line 209 of file interactor_style.cpp.
boost::signals2::connection pcl::visualization::PCLVisualizerInteractorStyle::registerMouseCallback | ( | boost::function< void(const pcl::visualization::MouseEvent &)> | cb | ) |
Register a callback function for mouse events.
[in] | cb | a boost function that will be registered as a callback for a mouse event |
Definition at line 202 of file interactor_style.cpp.
boost::signals2::connection pcl::visualization::PCLVisualizerInteractorStyle::registerPointPickingCallback | ( | boost::function< void(const pcl::visualization::PointPickingEvent &)> | cb | ) |
Register a callback function for point picking events.
[in] | cb | a boost function that will be registered as a callback for a point picking event |
Definition at line 216 of file interactor_style.cpp.
void pcl::visualization::PCLVisualizerInteractorStyle::saveScreenshot | ( | const std::string & | file | ) |
Save the current rendered image to disk, as a PNG screenshot.
[in] | file | the name of the PNG file |
Definition at line 98 of file interactor_style.cpp.
void pcl::visualization::PCLVisualizerInteractorStyle::setCloudActorMap | ( | const CloudActorMapPtr & | actors | ) | [inline] |
Pass a pointer to the actor map.
[in] | actors | the actor map that will be used with this style |
Definition at line 122 of file interactor_style.h.
void pcl::visualization::PCLVisualizerInteractorStyle::setKeyboardModifier | ( | const InteractorKeyboardModifier & | modifier | ) | [inline] |
Change the default keyboard modified from ALT to a different special key. Allowed values are:
[in] | modifier | the new keyboard modifier |
Definition at line 169 of file interactor_style.h.
void pcl::visualization::PCLVisualizerInteractorStyle::setRendererCollection | ( | vtkSmartPointer< vtkRendererCollection > & | rens | ) | [inline] |
Pass a set of renderers to the interactor style.
[in] | rens | the vtkRendererCollection to use |
Definition at line 132 of file interactor_style.h.
pcl::visualization::PCLVisualizerInteractorStyle::vtkTypeMacro | ( | PCLVisualizerInteractorStyle | , |
vtkInteractorStyleTrackballCamera | |||
) |
void pcl::visualization::PCLVisualizerInteractorStyle::zoomIn | ( | ) | [protected] |
Interactor style internal method. Zoom in.
Definition at line 110 of file interactor_style.cpp.
void pcl::visualization::PCLVisualizerInteractorStyle::zoomOut | ( | ) | [protected] |
Interactor style internal method. Zoom out.
Definition at line 122 of file interactor_style.cpp.
friend class PointPickingCallback [friend] |
Definition at line 264 of file interactor_style.h.
Actor map stored internally.
Definition at line 182 of file interactor_style.h.
vtkSmartPointer<vtkPolyData> pcl::visualization::PCLVisualizerInteractorStyle::full_data_ [protected] |
Definition at line 265 of file interactor_style.h.
vtkSmartPointer<vtkLegendScaleActor> pcl::visualization::PCLVisualizerInteractorStyle::grid_actor_ [protected] |
Actor for 2D grid on screen.
Definition at line 196 of file interactor_style.h.
bool pcl::visualization::PCLVisualizerInteractorStyle::grid_enabled_ [protected] |
Set to true if the grid actor is enabled.
Definition at line 194 of file interactor_style.h.
bool pcl::visualization::PCLVisualizerInteractorStyle::init_ [protected] |
Set to true after initialization is complete.
Definition at line 176 of file interactor_style.h.
boost::signals2::signal<void (const pcl::visualization::KeyboardEvent&)> pcl::visualization::PCLVisualizerInteractorStyle::keyboard_signal_ [protected] |
Definition at line 209 of file interactor_style.h.
vtkSmartPointer<vtkScalarBarActor> pcl::visualization::PCLVisualizerInteractorStyle::lut_actor_ [protected] |
Actor for 2D lookup table on screen.
Definition at line 201 of file interactor_style.h.
bool pcl::visualization::PCLVisualizerInteractorStyle::lut_enabled_ [protected] |
Set to true if the LUT actor is enabled.
Definition at line 199 of file interactor_style.h.
The maximum resizeable window width/height.
Definition at line 191 of file interactor_style.h.
int pcl::visualization::PCLVisualizerInteractorStyle::max_win_width_ [protected] |
Definition at line 191 of file interactor_style.h.
The keyboard modifier to use. Default: Alt.
Definition at line 262 of file interactor_style.h.
vtkSmartPointer<PointPickingCallback> pcl::visualization::PCLVisualizerInteractorStyle::mouse_callback_ [protected] |
A VTK Mouse Callback object, used for point picking.
Definition at line 259 of file interactor_style.h.
boost::signals2::signal<void (const pcl::visualization::MouseEvent&)> pcl::visualization::PCLVisualizerInteractorStyle::mouse_signal_ [protected] |
Definition at line 208 of file interactor_style.h.
boost::signals2::signal<void (const pcl::visualization::PointPickingEvent&)> pcl::visualization::PCLVisualizerInteractorStyle::point_picking_signal_ [protected] |
Definition at line 210 of file interactor_style.h.
vtkSmartPointer<vtkRendererCollection> pcl::visualization::PCLVisualizerInteractorStyle::rens_ [protected] |
Collection of vtkRenderers stored internally.
Definition at line 179 of file interactor_style.h.
vtkSmartPointer<vtkPNGWriter> pcl::visualization::PCLVisualizerInteractorStyle::snapshot_writer_ [protected] |
A PNG writer for screenshot captures.
Definition at line 204 of file interactor_style.h.
True if we're using red-blue colors for anaglyphic stereo, false if magenta-green.
Definition at line 256 of file interactor_style.h.
vtkSmartPointer<vtkWindowToImageFilter> pcl::visualization::PCLVisualizerInteractorStyle::wif_ [protected] |
Internal window to image filter. Needed by snapshot_writer_.
Definition at line 206 of file interactor_style.h.
int pcl::visualization::PCLVisualizerInteractorStyle::win_height_ [protected] |
The current window width/height.
Definition at line 185 of file interactor_style.h.
int pcl::visualization::PCLVisualizerInteractorStyle::win_pos_x_ [protected] |
The current window position x/y.
Definition at line 188 of file interactor_style.h.
int pcl::visualization::PCLVisualizerInteractorStyle::win_pos_y_ [protected] |
Definition at line 188 of file interactor_style.h.
int pcl::visualization::PCLVisualizerInteractorStyle::win_width_ [protected] |
Definition at line 185 of file interactor_style.h.