Point Cloud Library (PCL)  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions
pcl::visualization::RangeImageVisualizer Class Reference

Range image visualizer class. More...

#include <pcl/visualization/range_image_visualizer.h>

Inheritance diagram for pcl::visualization::RangeImageVisualizer:
Inheritance graph
[legend]
Collaboration diagram for pcl::visualization::RangeImageVisualizer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 RangeImageVisualizer (const std::string &name="Range Image")
 Constructor.
 ~RangeImageVisualizer ()
 Destructor.
void visualizeBorders (const pcl::RangeImage &range_image, float min_value, float max_value, bool grayscale, const pcl::PointCloud< pcl::BorderDescription > &border_descriptions)
 Visualize the given range image and the detected borders in it.
void showRangeImage (const pcl::RangeImage &range_image, float min_value=-std::numeric_limits< float >::infinity(), float max_value=std::numeric_limits< float >::infinity(), bool grayscale=false)
 Visualize a range image.
void showRGBImage (const unsigned char *data, unsigned width, unsigned height)
 Show a 2D image on screen.
void showRGBImage (const pcl::PointCloud< pcl::PointXYZRGB > &data)
 Show a 2D image on screen, obtained from the RGB channel of a PointXYZRGB-type point cloud.
void showFloatImage (const float *data, unsigned int width, unsigned int height, float min_value, float max_value, bool grayscale=false)
 Show a 2D image (float) on screen.
void showShortImage (const unsigned short *short_image, unsigned int width, unsigned int height, unsigned short min_value, unsigned short max_value, bool grayscale=false)
 Show a 2D image (unsigned short) on screen.
void showAngleImage (const float *data, unsigned width, unsigned height)
 Show a 2D image on screen representing angle data.
void showHalfAngleImage (const float *data, unsigned width, unsigned height)
 Show a 2D image on screen representing half angle data.
void markPoint (size_t u, size_t v, Vector3ub fg_color, Vector3ub bg_color=red_color, float radius=2)
 Sets the pixel at coordinates(u,v) to color while setting the neighborhood to another.
void setWindowTitle (const std::string &name)
 Set the window title name.
void spin ()
 Spin method.
void spinOnce (int time=1, bool force_redraw=false)
 Spin once method.
boost::signals2::connection registerKeyboardCallback (void(*callback)(const pcl::visualization::KeyboardEvent &, void *), void *cookie=NULL)
 Register a callback function for keyboard events.
template<typename T >
boost::signals2::connection registerKeyboardCallback (void(T::*callback)(const pcl::visualization::KeyboardEvent &, void *), T &instance, void *cookie=NULL)
 Register a callback function for keyboard 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 (void(*callback)(const pcl::visualization::MouseEvent &, void *), void *cookie=NULL)
 Register a callback boost::function for mouse events.
template<typename T >
boost::signals2::connection registerMouseCallback (void(T::*callback)(const pcl::visualization::MouseEvent &, void *), T &instance, void *cookie=NULL)
 Register a callback function for mouse events.
boost::signals2::connection registerMouseCallback (boost::function< void(const pcl::visualization::MouseEvent &)> cb)
 Register a callback function for mouse events.

Static Public Member Functions

static RangeImageVisualizergetRangeImageWidget (const pcl::RangeImage &range_image, float min_value, float max_value, bool grayscale, const std::string &name="Range image")
 Get a widget visualizing the given range image.
static RangeImageVisualizergetRangeImageBordersWidget (const pcl::RangeImage &range_image, float min_value, float max_value, bool grayscale, const pcl::PointCloud< pcl::BorderDescription > &border_descriptions, const std::string &name="Range image with borders")
 Same as above, but returning a new widget.
static RangeImageVisualizergetAnglesWidget (const pcl::RangeImage &range_image, float *angles_image, const std::string &name)
 Get a widget visualizing the given angle image (assuming values in (-PI, PI]).
static RangeImageVisualizergetHalfAnglesWidget (const pcl::RangeImage &range_image, float *angles_image, const std::string &name)
 Get a widget visualizing the given angle image (assuming values in (-PI/2, PI/2]).
static RangeImageVisualizergetInterestPointsWidget (const pcl::RangeImage &range_image, const float *interest_image, float min_value, float max_value, const pcl::PointCloud< pcl::InterestPoint > &interest_points, const std::string &name)
 Get a widget visualizing the interest values and extracted interest points.

Detailed Description

Range image visualizer class.

Author:
Bastian Steder

Definition at line 54 of file range_image_visualizer.h.


Constructor & Destructor Documentation

pcl::visualization::RangeImageVisualizer::RangeImageVisualizer ( const std::string &  name = "Range Image")

Constructor.

Destructor.


Member Function Documentation

static RangeImageVisualizer* pcl::visualization::RangeImageVisualizer::getAnglesWidget ( const pcl::RangeImage range_image,
float *  angles_image,
const std::string &  name 
) [static]

Get a widget visualizing the given angle image (assuming values in (-PI, PI]).

-PI and PI will return the same color You are responsible for deleting it after usage!

static RangeImageVisualizer* pcl::visualization::RangeImageVisualizer::getHalfAnglesWidget ( const pcl::RangeImage range_image,
float *  angles_image,
const std::string &  name 
) [static]

Get a widget visualizing the given angle image (assuming values in (-PI/2, PI/2]).

-PI/2 and PI/2 will return the same color You are responsible for deleting it after usage!

static RangeImageVisualizer* pcl::visualization::RangeImageVisualizer::getInterestPointsWidget ( const pcl::RangeImage range_image,
const float *  interest_image,
float  min_value,
float  max_value,
const pcl::PointCloud< pcl::InterestPoint > &  interest_points,
const std::string &  name 
) [static]

Get a widget visualizing the interest values and extracted interest points.

The interest points will be marked green. You are responsible for deleting it after usage!

static RangeImageVisualizer* pcl::visualization::RangeImageVisualizer::getRangeImageBordersWidget ( const pcl::RangeImage range_image,
float  min_value,
float  max_value,
bool  grayscale,
const pcl::PointCloud< pcl::BorderDescription > &  border_descriptions,
const std::string &  name = "Range image with borders" 
) [static]

Same as above, but returning a new widget.

You are responsible for deleting it after usage!

static RangeImageVisualizer* pcl::visualization::RangeImageVisualizer::getRangeImageWidget ( const pcl::RangeImage range_image,
float  min_value,
float  max_value,
bool  grayscale,
const std::string &  name = "Range image" 
) [static]

Get a widget visualizing the given range image.

You are responsible for deleting it after usage!

void pcl::visualization::ImageViewer::markPoint ( size_t  u,
size_t  v,
Vector3ub  fg_color,
Vector3ub  bg_color = red_color,
float  radius = 2 
) [inherited]

Sets the pixel at coordinates(u,v) to color while setting the neighborhood to another.

Parameters:
[in]uthe u/x coordinate of the pixel
[in]vthe v/y coordinate of the pixel
[in]fg_colorthe pixel color
[in]bg_colorthe neighborhood color
[in]radiusthe circle radius around the pixel
boost::signals2::connection pcl::visualization::ImageViewer::registerKeyboardCallback ( void(*)(const pcl::visualization::KeyboardEvent &, void *)  callback,
void *  cookie = NULL 
) [inline, inherited]

Register a callback function for keyboard events.

Parameters:
[in]callbackthe function that will be registered as a callback for a keyboard event
[in]cookieuser data that is passed to the callback
Returns:
a connection object that allows to disconnect the callback function.

Definition at line 168 of file image_viewer.h.

template<typename T >
boost::signals2::connection pcl::visualization::ImageViewer::registerKeyboardCallback ( void(T::*)(const pcl::visualization::KeyboardEvent &, void *)  callback,
T &  instance,
void *  cookie = NULL 
) [inline, inherited]

Register a callback function for keyboard events.

Parameters:
[in]callbackthe member function that will be registered as a callback for a keyboard event
[in]instanceinstance to the class that implements the callback function
[in]cookieuser data that is passed to the callback
Returns:
a connection object that allows to disconnect the callback function.

Definition at line 181 of file image_viewer.h.

boost::signals2::connection pcl::visualization::ImageViewer::registerKeyboardCallback ( boost::function< void(const pcl::visualization::KeyboardEvent &)>  cb) [inherited]

Register a callback boost::function for keyboard events.

Parameters:
[in]cbthe boost function that will be registered as a callback for a keyboard event
Returns:
a connection object that allows to disconnect the callback function.
boost::signals2::connection pcl::visualization::ImageViewer::registerMouseCallback ( void(*)(const pcl::visualization::MouseEvent &, void *)  callback,
void *  cookie = NULL 
) [inline, inherited]

Register a callback boost::function for mouse events.

Parameters:
[in]callbackthe function that will be registered as a callback for a mouse event
[in]cookieuser data that is passed to the callback
Returns:
a connection object that allows to disconnect the callback function.

Definition at line 200 of file image_viewer.h.

template<typename T >
boost::signals2::connection pcl::visualization::ImageViewer::registerMouseCallback ( void(T::*)(const pcl::visualization::MouseEvent &, void *)  callback,
T &  instance,
void *  cookie = NULL 
) [inline, inherited]

Register a callback function for mouse events.

Parameters:
[in]callbackthe member function that will be registered as a callback for a mouse event
[in]instanceinstance to the class that implements the callback function
[in]cookieuser data that is passed to the callback
Returns:
a connection object that allows to disconnect the callback function.

Definition at line 213 of file image_viewer.h.

boost::signals2::connection pcl::visualization::ImageViewer::registerMouseCallback ( boost::function< void(const pcl::visualization::MouseEvent &)>  cb) [inherited]

Register a callback function for mouse events.

Parameters:
[in]cbthe boost function that will be registered as a callback for a mouse event
Returns:
a connection object that allows to disconnect the callback function.
void pcl::visualization::ImageViewer::setWindowTitle ( const std::string &  name) [inline, inherited]

Set the window title name.

Parameters:
[in]namethe window title

Definition at line 145 of file image_viewer.h.

void pcl::visualization::ImageViewer::showAngleImage ( const float *  data,
unsigned  width,
unsigned  height 
) [inherited]

Show a 2D image on screen representing angle data.

Parameters:
[in]datathe input data representing the image
[in]widththe width of the image
[in]heightthe height of the image
void pcl::visualization::ImageViewer::showFloatImage ( const float *  data,
unsigned int  width,
unsigned int  height,
float  min_value,
float  max_value,
bool  grayscale = false 
) [inherited]

Show a 2D image (float) on screen.

Parameters:
[in]datathe input data representing the image in float format
[in]widththe width of the image
[in]heightthe height of the image
[in]min_valuefilter all values in the image to be larger than this minimum value
[in]max_valuefilter all values in the image to be smaller than this maximum value
[in]grayscaleshow data as grayscale (true) or not (false). Default: false
void pcl::visualization::ImageViewer::showHalfAngleImage ( const float *  data,
unsigned  width,
unsigned  height 
) [inherited]

Show a 2D image on screen representing half angle data.

Parameters:
[in]datathe input data representing the image
[in]widththe width of the image
[in]heightthe height of the image
void pcl::visualization::RangeImageVisualizer::showRangeImage ( const pcl::RangeImage range_image,
float  min_value = -std::numeric_limits< float >::infinity(),
float  max_value = std::numeric_limits< float >::infinity(),
bool  grayscale = false 
)

Visualize a range image.

void pcl::visualization::ImageViewer::showRGBImage ( const unsigned char *  data,
unsigned  width,
unsigned  height 
) [inherited]

Show a 2D image on screen.

Parameters:
[in]datathe input data representing the image
[in]widththe width of the image
[in]heightthe height of the image

Show a 2D image on screen, obtained from the RGB channel of a PointXYZRGB-type point cloud.

Parameters:
[in]datathe input data representing the PointXYZRGB point cloud
void pcl::visualization::ImageViewer::showShortImage ( const unsigned short *  short_image,
unsigned int  width,
unsigned int  height,
unsigned short  min_value,
unsigned short  max_value,
bool  grayscale = false 
) [inherited]

Show a 2D image (unsigned short) on screen.

Parameters:
[in]short_imagethe input data representing the image in unsigned short format
[in]widththe width of the image
[in]heightthe height of the image
[in]min_valuefilter all values in the image to be larger than this minimum value
[in]max_valuefilter all values in the image to be smaller than this maximum value
[in]grayscaleshow data as grayscale (true) or not (false). Default: false

Spin method.

Calls the interactor and runs an internal loop.

void pcl::visualization::ImageViewer::spinOnce ( int  time = 1,
bool  force_redraw = false 
) [inherited]

Spin once method.

Calls the interactor and updates the screen once.

Parameters:
[in]time- How long (in ms) should the visualization loop be allowed to run.
[in]force_redraw- if false it might return without doing anything if the interactor's framerate does not require a redraw yet.
void pcl::visualization::RangeImageVisualizer::visualizeBorders ( const pcl::RangeImage range_image,
float  min_value,
float  max_value,
bool  grayscale,
const pcl::PointCloud< pcl::BorderDescription > &  border_descriptions 
)

Visualize the given range image and the detected borders in it.

Borders on the obstacles are marked green, borders on the background are marked bright blue.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines