Point Cloud Library (PCL)
1.11.1-dev
|
43 #include <pcl/visualization/common/actor_map.h>
44 #include <pcl/visualization/common/ren_win_interact_map.h>
45 #include <pcl/visualization/keyboard_event.h>
46 #include <pcl/visualization/mouse_event.h>
47 #include <pcl/visualization/point_picking_event.h>
48 #include <pcl/visualization/area_picking_event.h>
50 #include <boost/signals2/signal.hpp>
52 #include <vtkInteractorStyleRubberBandPick.h>
54 class vtkRendererCollection;
55 class vtkLegendScaleActor;
56 class vtkScalarBarActor;
58 class vtkWindowToImageFilter;
63 namespace visualization
116 init_ (), win_height_ (), win_width_ (), win_pos_x_ (), win_pos_y_ (),
117 max_win_height_ (), max_win_width_ (), use_vbos_ (false), grid_enabled_ (), lut_enabled_ (),
118 stereo_anaglyph_mask_default_ (),
119 modifier_ (), camera_saved_ (), lut_actor_id_ (
"")
170 boost::signals2::connection
177 boost::signals2::connection
184 boost::signals2::connection
191 boost::signals2::connection
198 saveScreenshot (
const std::string &file);
204 saveCameraParameters (
const std::string &file);
208 getCameraParameters (
Camera &camera,
int viewport = 0)
const;
214 loadCameraParameters (
const std::string &file);
223 setCameraParameters (
const Eigen::Matrix3f &intrinsics,
const Eigen::Matrix4f &extrinsics,
int viewport = 0);
230 setCameraParameters (
const Camera &camera,
int viewport = 0);
245 return (camera_file_);
258 modifier_ = modifier;
314 OnKeyDown ()
override;
320 OnMouseMove ()
override;
322 OnLeftButtonDown ()
override;
324 OnLeftButtonUp ()
override;
326 OnMiddleButtonDown ()
override;
328 OnMiddleButtonUp ()
override;
330 OnRightButtonDown ()
override;
332 OnRightButtonUp ()
override;
334 OnMouseWheelForward ()
override;
336 OnMouseWheelBackward ()
override;
357 getCameraParameters (
const std::vector<std::string> &camera);
393 std::string lut_actor_id_;
399 updateLookUpTableDisplay (
bool add_lut =
false);
431 void OnKeyDown ()
override;
434 void OnTimer ()
override;
bool camera_saved_
A pcl::visualization::Camera is saved or not.
void setRendererCollection(vtkSmartPointer< vtkRendererCollection > &rens)
Pass a set of renderers to the interactor style.
static PCLHistogramVisualizerInteractorStyle * New()
vtkSmartPointer< vtkScalarBarActor > lut_actor_
Actor for 2D lookup table on screen.
boost::signals2::signal< void(const pcl::visualization::MouseEvent &)> mouse_signal_
shared_ptr< ShapeActorMap > ShapeActorMapPtr
InteractorKeyboardModifier modifier_
The keyboard modifier to use.
void setShapeActorMap(const ShapeActorMapPtr &actors)
Pass a pointer to the shape actor map.
void setRenderWindow(const vtkSmartPointer< vtkRenderWindow > &win)
Set render window.
void setCloudActorMap(const CloudActorMapPtr &actors)
Pass a pointer to the cloud actor map.
void setUseVbos(const bool use_vbos)
Use Vertex Buffer Objects renderers.
PCLHistogramVisualizerInteractorStyle()
Empty constructor.
InteractorKeyboardModifier
A list of potential keyboard modifiers for pcl::visualization::PCLVisualizerInteractorStyle::PCLVisua...
PCLVisualizerInteractorStyle()
Empty constructor.
Camera camera_
A pcl::visualization::Camera for camera parameter saving/restoring.
std::string camera_file_
Camera file for camera parameter saving/restoring.
PCLVisualizerInteractorStyle defines an unique, custom VTK based interactory style for PCL Visualizer...
pcl::visualization::CloudActorMapPtr CloudActorMapPtr
bool stereo_anaglyph_mask_default_
True if we're using red-blue colors for anaglyphic stereo, false if magenta-green.
bool grid_enabled_
Set to true if the grid actor is enabled.
ShapeActorMapPtr shape_actors_
Shape map stored internally.
boost::signals2::signal< void(const pcl::visualization::PointPickingEvent &)> point_picking_signal_
void setRenWinInteractMap(const RenWinInteractMap &wins)
Pass a map of render/window/interactors to the interactor style.
vtkSmartPointer< vtkPointPicker > point_picker_
Stores the point picker when switching to an area picker.
vtkSmartPointer< vtkLegendScaleActor > grid_actor_
Actor for 2D grid on screen.
shared_ptr< CloudActorMap > CloudActorMapPtr
vtkSmartPointer< vtkWindowToImageFilter > wif_
Internal window to image filter.
vtkSmartPointer< PointPickingCallback > mouse_callback_
A VTK Mouse Callback object, used for point picking.
bool lut_enabled_
Set to true if the LUT actor is enabled.
boost::signals2::signal< void(const pcl::visualization::AreaPickingEvent &)> area_picking_signal_
CloudActorMapPtr getCloudActorMap()
Get the cloud actor map pointer.
std::map< std::string, RenWinInteract > RenWinInteractMap
void setCameraFile(const std::string file)
Set camera file for camera parameter saving/restoring.
CloudActorMapPtr cloud_actors_
Cloud actor map stored internally.
vtkSmartPointer< vtkPNGWriter > snapshot_writer_
A PNG writer for screenshot captures.
void Initialize()
Initialization routine.
Camera class holds a set of camera parameters together with the window pos/size.
bool use_vbos_
Boolean that holds whether or not to use the vtkVertexBufferObjectMapper.
/brief Class representing 3D area picking events.
vtkSmartPointer< vtkRendererCollection > rens_
Collection of vtkRenderers stored internally.
/brief Class representing 3D point picking events.
boost::signals2::signal< void(const pcl::visualization::KeyboardEvent &)> keyboard_signal_
PCL histogram visualizer interactory style class.
PCL Visualizer main class.
ShapeActorMapPtr getShapeActorMap()
Get the cloud actor map pointer.
@ INTERACTOR_KB_MOD_SHIFT
bool init_
Set to true after initialization is complete.
void setKeyboardModifier(const InteractorKeyboardModifier &modifier)
Change the default keyboard modified from ALT to a different special key.
vtkSmartPointer< vtkRenderWindow > win_
The render window.
/brief Class representing key hit/release events
std::string getCameraFile() const
Get camera file for camera parameter saving/restoring.
~PCLVisualizerInteractorStyle()
Empty destructor.