Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Friends
pcl::visualization::PCLVisualizerInteractorStyle Class Reference

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>

List of all members.

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 registerAreaPickingCallback (boost::function< void(const pcl::visualization::AreaPickingEvent &)> cb)
 Register a callback function for area picking events.
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.
void setUseVbos (const bool use_vbos)
 Pass a pointer to the actor map.
 vtkTypeMacro (PCLVisualizerInteractorStyle, vtkInteractorStyleRubberBandPick)
virtual ~PCLVisualizerInteractorStyle ()
 Empty destructor.

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.
boost::signals2::signal< void(const
pcl::visualization::AreaPickingEvent &)> 
area_picking_signal_
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_
vtkSmartPointer< vtkPointPicker > point_picker_
 Stores the point picker when switching to an area picker.
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.
bool use_vbos_
 The maximum resizeable window width/height.
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

Detailed Description

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:

Author:
Radu B. Rusu

Definition at line 105 of file interactor_style.h.


Member Typedef Documentation

Definition at line 107 of file interactor_style.h.


Constructor & Destructor Documentation

Empty constructor.

Definition at line 113 of file interactor_style.h.

Empty destructor.

Definition at line 122 of file interactor_style.h.


Member Function Documentation

Get the cloud actor map pointer.

Definition at line 139 of file interactor_style.h.

Initialization routine. Must be called before anything else.

Definition at line 73 of file interactor_style.cpp.

Interactor style internal method. Gets called whenever a key is pressed.

Definition at line 155 of file interactor_style.cpp.

Definition at line 252 of file interactor_style.cpp.

Definition at line 849 of file interactor_style.cpp.

Definition at line 869 of file interactor_style.cpp.

Definition at line 890 of file interactor_style.cpp.

Definition at line 901 of file interactor_style.cpp.

Definition at line 920 of file interactor_style.cpp.

Definition at line 858 of file interactor_style.cpp.

Definition at line 993 of file interactor_style.cpp.

Definition at line 961 of file interactor_style.cpp.

Definition at line 931 of file interactor_style.cpp.

Definition at line 950 of file interactor_style.cpp.

Interactor style internal method. Gets called periodically if a timer is set.

Definition at line 1025 of file interactor_style.cpp.

Register a callback function for area picking events.

Parameters:
[in]cba boost function that will be registered as a callback for a area picking event
Returns:
a connection object that allows to disconnect the callback function.

Definition at line 245 of file interactor_style.cpp.

Register a callback boost::function for keyboard events.

Parameters:
[in]cba boost function that will be registered as a callback for a keyboard event
Returns:
a connection object that allows to disconnect the callback function.

Definition at line 231 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.

Parameters:
[in]cba boost function that will be registered as a callback for a mouse event
Returns:
a connection object that allows to disconnect the callback function.

Definition at line 224 of file interactor_style.cpp.

Register a callback function for point picking events.

Parameters:
[in]cba boost function that will be registered as a callback for a point picking event
Returns:
a connection object that allows to disconnect the callback function.

Definition at line 238 of file interactor_style.cpp.

Save the current rendered image to disk, as a PNG screenshot.

Parameters:
[in]filethe name of the PNG file

Definition at line 119 of file interactor_style.cpp.

Pass a pointer to the actor map.

Parameters:
[in]actorsthe actor map that will be used with this style

Definition at line 135 of file interactor_style.h.

Change the default keyboard modified from ALT to a different special key. Allowed values are:

  • INTERACTOR_KB_MOD_ALT
  • INTERACTOR_KB_MOD_CTRL
  • INTERACTOR_KB_MOD_SHIFT
    Parameters:
    [in]modifierthe new keyboard modifier

Definition at line 195 of file interactor_style.h.

void pcl::visualization::PCLVisualizerInteractorStyle::setRendererCollection ( vtkSmartPointer< vtkRendererCollection > &  rens) [inline]

Pass a set of renderers to the interactor style.

Parameters:
[in]rensthe vtkRendererCollection to use

Definition at line 145 of file interactor_style.h.

void pcl::visualization::PCLVisualizerInteractorStyle::setUseVbos ( const bool  use_vbos) [inline]

Pass a pointer to the actor map.

Parameters:
[in]actorsthe actor map that will be used with this style

Definition at line 151 of file interactor_style.h.

Interactor style internal method. Zoom in.

Definition at line 131 of file interactor_style.cpp.

Interactor style internal method. Zoom out.

Definition at line 143 of file interactor_style.cpp.


Friends And Related Function Documentation

friend class PointPickingCallback [friend]

Definition at line 296 of file interactor_style.h.


Member Data Documentation

Actor map stored internally.

Definition at line 208 of file interactor_style.h.

Definition at line 242 of file interactor_style.h.

vtkSmartPointer<vtkLegendScaleActor> pcl::visualization::PCLVisualizerInteractorStyle::grid_actor_ [protected]

Actor for 2D grid on screen.

Definition at line 225 of file interactor_style.h.

Set to true if the grid actor is enabled.

Definition at line 223 of file interactor_style.h.

Set to true after initialization is complete.

Definition at line 202 of file interactor_style.h.

Definition at line 240 of file interactor_style.h.

vtkSmartPointer<vtkScalarBarActor> pcl::visualization::PCLVisualizerInteractorStyle::lut_actor_ [protected]

Actor for 2D lookup table on screen.

Definition at line 230 of file interactor_style.h.

Set to true if the LUT actor is enabled.

Definition at line 228 of file interactor_style.h.

The maximum resizeable window width/height.

Definition at line 217 of file interactor_style.h.

Definition at line 217 of file interactor_style.h.

The keyboard modifier to use. Default: Alt.

Definition at line 294 of file interactor_style.h.

A VTK Mouse Callback object, used for point picking.

Definition at line 291 of file interactor_style.h.

Definition at line 239 of file interactor_style.h.

vtkSmartPointer<vtkPointPicker> pcl::visualization::PCLVisualizerInteractorStyle::point_picker_ [protected]

Stores the point picker when switching to an area picker.

Definition at line 237 of file interactor_style.h.

Definition at line 241 of file interactor_style.h.

vtkSmartPointer<vtkRendererCollection> pcl::visualization::PCLVisualizerInteractorStyle::rens_ [protected]

Collection of vtkRenderers stored internally.

Definition at line 205 of file interactor_style.h.

vtkSmartPointer<vtkPNGWriter> pcl::visualization::PCLVisualizerInteractorStyle::snapshot_writer_ [protected]

A PNG writer for screenshot captures.

Definition at line 233 of file interactor_style.h.

True if we're using red-blue colors for anaglyphic stereo, false if magenta-green.

Definition at line 288 of file interactor_style.h.

The maximum resizeable window width/height.

Definition at line 220 of file interactor_style.h.

vtkSmartPointer<vtkWindowToImageFilter> pcl::visualization::PCLVisualizerInteractorStyle::wif_ [protected]

Internal window to image filter. Needed by snapshot_writer_.

Definition at line 235 of file interactor_style.h.

The current window width/height.

Definition at line 211 of file interactor_style.h.

The current window position x/y.

Definition at line 214 of file interactor_style.h.

Definition at line 214 of file interactor_style.h.

Definition at line 211 of file interactor_style.h.


The documentation for this class was generated from the following files:


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:47:19