pcl::visualization::Window Class Reference

`#include <pcl/visualization/window.h>`

## Classes

struct | ExitCallback
struct | ExitMainLoopTimerCallback

## Public Member Functions

| Window (const std::string &window_name="")
| Window (const Window &src)
Window & | operator= (const Window &src)
virtual | ~Window ()
void | spin ()
| Spin method. More...
void | spinOnce (int time=1, bool force_redraw=false)
| Spin once method. More...
bool | wasStopped () const
| Returns true when the user tried to close the window. More...
boost::signals2::connection | registerKeyboardCallback (void(*callback)(const pcl::visualization::KeyboardEvent &, void *), void *cookie=NULL)
| registering a callback function for keyboard events More...
template<typename T >
boost::signals2::connection | registerKeyboardCallback (void(T::*callback)(const pcl::visualization::KeyboardEvent &, void *), T &instance, void *cookie=NULL)
| registering a callback function for keyboard events More...
boost::signals2::connection | registerMouseCallback (void(*callback)(const pcl::visualization::MouseEvent &, void *), void *cookie=NULL)
template<typename T >
boost::signals2::connection | registerMouseCallback (void(T::*callback)(const pcl::visualization::MouseEvent &, void *), T &instance, void *cookie=NULL)
| registering a callback function for mouse events More...

## Protected Member Functions

void | resetStoppedFlag ()
| Set the stopped flag back to false. More...
boost::signals2::connection | registerMouseCallback (boost::function< void(const pcl::visualization::MouseEvent &)>)
| registering a callback function for mouse events More...
boost::signals2::connection | registerKeyboardCallback (boost::function< void(const pcl::visualization::KeyboardEvent &)>)
| registering a callback boost::function for keyboard events More...
void | emitMouseEvent (unsigned long event_id)
void | emitKeyboardEvent (unsigned long event_id)

## Static Protected Member Functions

static void | MouseCallback (vtkObject *, unsigned long eid, void *clientdata, void *calldata)
static void | KeyboardCallback (vtkObject *, unsigned long eid, void *clientdata, void *calldata)

## Protected Attributes

bool | stopped_
int | timer_id_
boost::signals2::signal< void(const pcl::visualization::MouseEvent &)> | mouse_signal_
boost::signals2::signal< void(const pcl::visualization::KeyboardEvent &)> | keyboard_signal_
vtkSmartPointer< vtkRenderWindow > | win_
vtkSmartPointer< vtkRenderWindowInteractor > | interactor_
vtkCallbackCommand * | mouse_command_
vtkCallbackCommand * | keyboard_command_
vtkSmartPointer< PCLVisualizerInteractorStyle > | style_
| The render window interactor style. More...
vtkSmartPointer< vtkRendererCollection > | rens_
| The collection of renderers used. More...
vtkSmartPointer< ExitMainLoopTimerCallback > | exit_main_loop_timer_callback_
vtkSmartPointer< ExitCallback > | exit_callback_

## Detailed Description

Definition at line 62 of file window.h.

## Constructor & Destructor Documentation

pcl::visualization::Window::Window | ( | const std::string & | window_name = `""` | ) |

pcl::visualization::Window::Window | ( | const Window & | src | ) |

virtual pcl::visualization::Window::~Window | ( |  | ) |

virtual

## Member Function Documentation

void pcl::visualization::Window::emitKeyboardEvent | ( | unsigned long | event_id | ) |

protected

void pcl::visualization::Window::emitMouseEvent | ( | unsigned long | event_id | ) |

protected

static void pcl::visualization::Window::KeyboardCallback | ( | vtkObject * | ,
|  | unsigned long | eid,
|  | void * | clientdata,
|  | void * | calldata
| ) |  |

static protected

static void pcl::visualization::Window::MouseCallback | ( | vtkObject * | ,
|  | unsigned long | eid,
|  | void * | clientdata,
|  | void * | calldata
| ) |  |

static protected

Window& pcl::visualization::Window::operator= | ( | const Window & | src | ) |

boost::signals2::connection pcl::visualization::Window::registerKeyboardCallback | ( | void(*)(const pcl::visualization::KeyboardEvent &, void *) | callback,
|  | void * | cookie = `NULL`
| ) |  |

inline

registering a callback function for keyboard events

Parameters

  callback | the function that will be registered as a callback for a keyboard event
  cookie | user data that is passed to the callback

Returns
  connection object that allows to disconnect the callback function.

Definition at line 94 of file window.h.

template<typename T >

boost::signals2::connection pcl::visualization::Window::registerKeyboardCallback | ( | void(T::*)(const pcl::visualization::KeyboardEvent &, void *) | callback,
|  | T & | instance,
|  | void * | cookie = `NULL`
| ) |  |

inline

registering a callback function for keyboard events

Parameters

  callback | the member function that will be registered as a callback for a keyboard event
  instance | instance to the class that implements the callback function
  cookie | user data that is passed to the callback

Returns
  connection object that allows to disconnect the callback function.

Definition at line 108 of file window.h.

boost::signals2::connection pcl::visualization::Window::registerKeyboardCallback | ( | boost::function< void(const pcl::visualization::KeyboardEvent &)> |  | ) |

protected

registering a callback boost::function for keyboard events

Returns
  connection object that allows to disconnect the callback function.

boost::signals2::connection pcl::visualization::Window::registerMouseCallback | ( | void(*)(const pcl::visualization::MouseEvent &, void *) | callback,
|  | void * | cookie = `NULL`
| ) |  |

inline

Parameters

  callback | the function that will be registered as a callback for a mouse event
  cookie | user data that is passed to the callback

Returns
  connection object that allows to disconnect the callback function.

Definition at line 121 of file window.h.

template<typename T >

boost::signals2::connection pcl::visualization::Window::registerMouseCallback | ( | void(T::*)(const pcl::visualization::MouseEvent &, void *) | callback,
|  | T & | instance,
|  | void * | cookie = `NULL`
| ) |  |

inline

registering a callback function for mouse events

Parameters

  callback | the member function that will be registered as a callback for a mouse event
  instance | instance to the class that implements the callback function
  cookie | user data that is passed to the callback

Returns
  connection object that allows to disconnect the callback function.

Definition at line 135 of file window.h.

boost::signals2::connection pcl::visualization::Window::registerMouseCallback | ( | boost::function< void(const pcl::visualization::MouseEvent &)> |  | ) |

protected

registering a callback function for mouse events

Returns
  connection object that allows to disconnect the callback function.

void pcl::visualization::Window::resetStoppedFlag | ( |  | ) |

inline protected

Set the stopped flag back to false.

Definition at line 145 of file window.h.

void pcl::visualization::Window::spin | ( |  | ) |

Spin method.

Calls the interactor and runs an internal loop.

void pcl::visualization::Window::spinOnce | ( | int | time = `1`,
|  | bool | force_redraw = `false`
| ) |  |

Spin once method.

Calls the interactor and updates the screen once.

Parameters

  time | - How long (in ms) should the visualization loop be allowed to run.
  force_redraw | - if false it might return without doing anything if the interactor's framerate does not require a redraw yet.

bool pcl::visualization::Window::wasStopped | ( |  | ) | const

inline

Returns true when the user tried to close the window.

Definition at line 85 of file window.h.

## Member Data Documentation

vtkSmartPointer<ExitCallback> pcl::visualization::Window::exit_callback_

protected

Definition at line 227 of file window.h.

vtkSmartPointer<ExitMainLoopTimerCallback> pcl::visualization::Window::exit_main_loop_timer_callback_

protected

Definition at line 226 of file window.h.

vtkSmartPointer<vtkRenderWindowInteractor> pcl::visualization::Window::interactor_

protected

Definition at line 219 of file window.h.

vtkCallbackCommand* pcl::visualization::Window::keyboard_command_

protected

Definition at line 221 of file window.h.

boost::signals2::signal<void (const pcl::visualization::KeyboardEvent&)> pcl::visualization::Window::keyboard_signal_

protected

Definition at line 216 of file window.h.

vtkCallbackCommand* pcl::visualization::Window::mouse_command_

protected

Definition at line 220 of file window.h.

boost::signals2::signal<void (const pcl::visualization::MouseEvent&)> pcl::visualization::Window::mouse_signal_

protected

Definition at line 215 of file window.h.

vtkSmartPointer<vtkRendererCollection> pcl::visualization::Window::rens_

protected

The collection of renderers used.

Definition at line 225 of file window.h.

bool pcl::visualization::Window::stopped_

protected

Definition at line 211 of file window.h.

vtkSmartPointer<PCLVisualizerInteractorStyle> pcl::visualization::Window::style_

protected

The render window interactor style.

Definition at line 223 of file window.h.

int pcl::visualization::Window::timer_id_

protected

Definition at line 212 of file window.h.

vtkSmartPointer<vtkRenderWindow> pcl::visualization::Window::win_

protected

Definition at line 218 of file window.h.

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

- /build/pcl-6_P28C/pcl-1.7.2/visualization/include/pcl/visualization/window.h