Loading...
Searching...
No Matches
pcl::visualization::RangeImageVisualizer Class Reference
Module visualization

Range image visualizer class. More...

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

Inheritance diagram for pcl::visualization::RangeImageVisualizer:

## Public Member Functions

| RangeImageVisualizer (const std::string &name="Range Image")
| Constructor.
| ~RangeImageVisualizer () override
| 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.
Public Member Functions inherited from pcl::visualization::ImageViewer
| ImageViewer (const std::string &window_title="")
| Constructor.
virtual | ~ImageViewer ()
| Destructor.
void | setInteractorStyle (vtkInteractorObserver *style)
| Set up the interactor style.
void | showMonoImage (const unsigned char *data, unsigned width, unsigned height, const std::string &layer_id="mono_image", double opacity=1.0)
| Show a monochrome 2D image on screen.
void | addMonoImage (const unsigned char *data, unsigned width, unsigned height, const std::string &layer_id="mono_image", double opacity=1.0)
| Add a monochrome 2D image layer, but do not render it (use spin/spinOnce to update).
void | showMonoImage (const pcl::PointCloud< pcl::Intensity >::ConstPtr &cloud, const std::string &layer_id="mono_image", double opacity=1.0)
| Show a monochrome 2D image on screen.
void | addMonoImage (const pcl::PointCloud< pcl::Intensity >::ConstPtr &cloud, const std::string &layer_id="mono_image", double opacity=1.0)
| Add a monochrome 2D image layer, but do not render it (use spin/spinOnce to update).
void | showMonoImage (const pcl::PointCloud< pcl::Intensity > &cloud, const std::string &layer_id="mono_image", double opacity=1.0)
| Show a monochrome 2D image on screen.
void | addMonoImage (const pcl::PointCloud< pcl::Intensity > &cloud, const std::string &layer_id="mono_image", double opacity=1.0)
| Add a monochrome 2D image layer, but do not render it (use spin/spinOnce to update).
void | showMonoImage (const pcl::PointCloud< pcl::Intensity8u >::ConstPtr &cloud, const std::string &layer_id="mono_image", double opacity=1.0)
| Show a monochrome 2D image on screen.
void | addMonoImage (const pcl::PointCloud< pcl::Intensity8u >::ConstPtr &cloud, const std::string &layer_id="mono_image", double opacity=1.0)
| Add a monochrome 2D image layer, but do not render it (use spin/spinOnce to update).
void | showMonoImage (const pcl::PointCloud< pcl::Intensity8u > &cloud, const std::string &layer_id="mono_image", double opacity=1.0)
| Show a monochrome 2D image on screen.
void | addMonoImage (const pcl::PointCloud< pcl::Intensity8u > &cloud, const std::string &layer_id="mono_image", double opacity=1.0)
| Add a monochrome 2D image layer, but do not render it (use spin/spinOnce to update).
void | showRGBImage (const unsigned char *data, unsigned width, unsigned height, const std::string &layer_id="rgb_image", double opacity=1.0)
| Show a 2D RGB image on screen.
void | addRGBImage (const unsigned char *data, unsigned width, unsigned height, const std::string &layer_id="rgb_image", double opacity=1.0, bool autoresize=true)
| Add an RGB 2D image layer, but do not render it (use spin/spinOnce to update).
template<typename T>
void | showRGBImage (const typename pcl::PointCloud< T >::ConstPtr &cloud, const std::string &layer_id="rgb_image", double opacity=1.0)
| Show a 2D image on screen, obtained from the RGB channel of a point cloud.
template<typename T>
void | addRGBImage (const typename pcl::PointCloud< T >::ConstPtr &cloud, const std::string &layer_id="rgb_image", double opacity=1.0)
| Add an RGB 2D image layer, but do not render it (use spin/spinOnce to update).
template<typename T>
void | showRGBImage (const pcl::PointCloud< T > &cloud, const std::string &layer_id="rgb_image", double opacity=1.0)
| Show a 2D image on screen, obtained from the RGB channel of a point cloud.
template<typename T>
void | addRGBImage (const pcl::PointCloud< T > &cloud, const std::string &layer_id="rgb_image", double opacity=1.0)
| Add an RGB 2D image layer, but do not render it (use spin/spinOnce to update).
void | showFloatImage (const float *data, unsigned int width, unsigned int height, float min_value=std::numeric_limits< float >::min(), float max_value=std::numeric_limits< float >::max(), bool grayscale=false, const std::string &layer_id="float_image", double opacity=1.0)
| Show a 2D image (float) on screen.
void | addFloatImage (const float *data, unsigned int width, unsigned int height, float min_value=std::numeric_limits< float >::min(), float max_value=std::numeric_limits< float >::max(), bool grayscale=false, const std::string &layer_id="float_image", double opacity=1.0)
| Add a float 2D image layer, but do not render it (use spin/spinOnce to update).
void | showShortImage (const unsigned short *short_image, unsigned int width, unsigned int height, unsigned short min_value=std::numeric_limits< unsigned short >::min(), unsigned short max_value=std::numeric_limits< unsigned short >::max(), bool grayscale=false, const std::string &layer_id="short_image", double opacity=1.0)
| Show a 2D image (unsigned short) on screen.
void | addShortImage (const unsigned short *short_image, unsigned int width, unsigned int height, unsigned short min_value=std::numeric_limits< unsigned short >::min(), unsigned short max_value=std::numeric_limits< unsigned short >::max(), bool grayscale=false, const std::string &layer_id="short_image", double opacity=1.0)
| Add a short 2D image layer, but do not render it (use spin/spinOnce to update).
void | showAngleImage (const float *data, unsigned width, unsigned height, const std::string &layer_id="angle_image", double opacity=1.0)
| Show a 2D image on screen representing angle data.
void | addAngleImage (const float *data, unsigned width, unsigned height, const std::string &layer_id="angle_image", double opacity=1.0)
| Add an angle 2D image layer, but do not render it (use spin/spinOnce to update).
void | showHalfAngleImage (const float *data, unsigned width, unsigned height, const std::string &layer_id="half_angle_image", double opacity=1.0)
| Show a 2D image on screen representing half angle data.
void | addHalfAngleImage (const float *data, unsigned width, unsigned height, const std::string &layer_id="half_angle_image", double opacity=1.0)
| Add a half angle 2D image layer, but do not render it (use spin/spinOnce to update).
void | markPoint (std::size_t u, std::size_t v, Vector3ub fg_color, Vector3ub bg_color=red_color, double radius=3.0, const std::string &layer_id="points", double opacity=1.0)
| Sets the pixel at coordinates(u,v) to color while setting the neighborhood to another.
void | markPoints (const std::vector< int > &uv, Vector3ub fg_color, Vector3ub bg_color=red_color, double size=3.0, const std::string &layer_id="markers", double opacity=1.0)
| Sets the pixel at coordinates(u,v) to color while setting the neighborhood to another.
void | markPoints (const std::vector< float > &uv, Vector3ub fg_color, Vector3ub bg_color=red_color, double size=3.0, const std::string &layer_id="markers", double opacity=1.0)
| Sets the pixel at coordinates(u,v) to color while setting the neighborhood to another (float coordinates version).
void | setWindowTitle (const std::string &name)
| Set the window title name.
void | spin ()
| Spin method.
void | spinOnce (int time=1, bool force_redraw=true)
| Spin once method.
boost::signals2::connection | registerKeyboardCallback (void(*callback)(const pcl::visualization::KeyboardEvent &, void *), void *cookie=nullptr)
| 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=nullptr)
| Register a callback function for keyboard events.
boost::signals2::connection | registerKeyboardCallback (std::function< void(const pcl::visualization::KeyboardEvent &)> cb)
| Register a callback std::function for keyboard events.
boost::signals2::connection | registerMouseCallback (void(*callback)(const pcl::visualization::MouseEvent &, void *), void *cookie=nullptr)
| Register a callback std::function for mouse events.
template<typename T>
boost::signals2::connection | registerMouseCallback (void(T::*callback)(const pcl::visualization::MouseEvent &, void *), T &instance, void *cookie=nullptr)
| Register a callback function for mouse events.
boost::signals2::connection | registerMouseCallback (std::function< void(const pcl::visualization::MouseEvent &)> cb)
| Register a callback function for mouse events.
void | setPosition (int x, int y)
| Set the position in screen coordinates.
void | setSize (int xw, int yw)
| Set the window size in screen coordinates.
int * | getSize ()
| Return the window size in pixels.
bool | wasStopped () const
| Returns true when the user tried to close the window.
void | close ()
| Stop the interaction and close the visualization window.
bool | addCircle (unsigned int x, unsigned int y, double radius, const std::string &layer_id="circles", double opacity=1.0)
| Add a circle shape from a point and a radius.
bool | addCircle (unsigned int x, unsigned int y, double radius, double r, double g, double b, const std::string &layer_id="circles", double opacity=1.0)
| Add a circle shape from a point and a radius.
bool | addRectangle (const pcl::PointXY &min_pt, const pcl::PointXY &max_pt, const std::string &layer_id="rectangles", double opacity=1.0)
| Add a 2D box and color its edges with a given color.
bool | addRectangle (const pcl::PointXY &min_pt, const pcl::PointXY &max_pt, double r, double g, double b, const std::string &layer_id="rectangles", double opacity=1.0)
| Add a 2D box and color its edges with a given color.
bool | addRectangle (unsigned int x_min, unsigned int x_max, unsigned int y_min, unsigned int y_max, const std::string &layer_id="rectangles", double opacity=1.0)
| Add a 2D box and color its edges with a given color.
bool | addRectangle (unsigned int x_min, unsigned int x_max, unsigned int y_min, unsigned int y_max, double r, double g, double b, const std::string &layer_id="rectangles", double opacity=1.0)
| Add a 2D box and color its edges with a given color.
template<typename T>
bool | addRectangle (const typename pcl::PointCloud< T >::ConstPtr &image, const T &min_pt, const T &max_pt, const std::string &layer_id="rectangles", double opacity=1.0)
| Add a 2D box and color its edges with a given color.
template<typename T>
bool | addRectangle (const typename pcl::PointCloud< T >::ConstPtr &image, const T &min_pt, const T &max_pt, double r, double g, double b, const std::string &layer_id="rectangles", double opacity=1.0)
| Add a 2D box and color its edges with a given color.
template<typename T>
bool | addRectangle (const typename pcl::PointCloud< T >::ConstPtr &image, const pcl::PointCloud< T > &mask, double r, double g, double b, const std::string &layer_id="rectangles", double opacity=1.0)
| Add a 2D box that contains a given image mask and color its edges.
template<typename T>
bool | addRectangle (const typename pcl::PointCloud< T >::ConstPtr &image, const pcl::PointCloud< T > &mask, const std::string &layer_id="image_mask", double opacity=1.0)
| Add a 2D box that contains a given image mask and color its edges in red.
bool | addFilledRectangle (unsigned int x_min, unsigned int x_max, unsigned int y_min, unsigned int y_max, const std::string &layer_id="boxes", double opacity=0.5)
| Add a 2D box and fill it in with a given color.
bool | addFilledRectangle (unsigned int x_min, unsigned int x_max, unsigned int y_min, unsigned int y_max, double r, double g, double b, const std::string &layer_id="boxes", double opacity=0.5)
| Add a 2D box and fill it in with a given color.
bool | addLine (unsigned int x_min, unsigned int y_min, unsigned int x_max, unsigned int y_max, double r, double g, double b, const std::string &layer_id="line", double opacity=1.0)
| Add a 2D line with a given color.
bool | addLine (unsigned int x_min, unsigned int y_min, unsigned int x_max, unsigned int y_max, const std::string &layer_id="line", double opacity=1.0)
| Add a 2D line with a given color.
bool | addText (unsigned int x, unsigned int y, const std::string &text, double r, double g, double b, const std::string &layer_id="line", double opacity=1.0)
| Add a 2D text with a given color.
bool | addText (unsigned int x, unsigned int y, const std::string &text, const std::string &layer_id="line", double opacity=1.0)
| Add a 2D text with a given color.
template<typename T>
bool | addMask (const typename pcl::PointCloud< T >::ConstPtr &image, const pcl::PointCloud< T > &mask, double r, double g, double b, const std::string &layer_id="image_mask", double opacity=0.5)
| Add a generic 2D mask to an image.
template<typename T>
bool | addMask (const typename pcl::PointCloud< T >::ConstPtr &image, const pcl::PointCloud< T > &mask, const std::string &layer_id="image_mask", double opacity=0.5)
| Add a generic 2D mask to an image (colored in red).
template<typename T>
bool | addPlanarPolygon (const typename pcl::PointCloud< T >::ConstPtr &image, const pcl::PlanarPolygon< T > &polygon, double r, double g, double b, const std::string &layer_id="planar_polygon", double opacity=1.0)
| Add a generic 2D planar polygon to an image.
template<typename T>
bool | addPlanarPolygon (const typename pcl::PointCloud< T >::ConstPtr &image, const pcl::PlanarPolygon< T > &polygon, const std::string &layer_id="planar_polygon", double opacity=1.0)
| Add a generic 2D planar polygon to an image.
bool | addLayer (const std::string &layer_id, int width, int height, double opacity=0.5)
| Add a new 2D rendering layer to the viewer.
void | removeLayer (const std::string &layer_id)
| Remove a 2D layer given by its ID.
template<typename PointT>
bool | showCorrespondences (const pcl::PointCloud< PointT > &source_img, const pcl::PointCloud< PointT > &target_img, const pcl::Correspondences &correspondences, int nth=1, const std::string &layer_id="correspondences")
| Add the specified correspondences to the display.

## Static Public Member Functions

static RangeImageVisualizer * | getRangeImageWidget (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 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")
| Same as above, but returning a new widget.
static RangeImageVisualizer * | getAnglesWidget (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 RangeImageVisualizer * | getHalfAnglesWidget (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 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)
| Get a widget visualizing the interest values and extracted interest points.

## Protected Attributes

std::string | name_

## Additional Inherited Members

Public Types inherited from pcl::visualization::ImageViewer
using | Ptr = shared_ptr<ImageViewer>
using | ConstPtr = shared_ptr<const ImageViewer>
Protected Member Functions inherited from pcl::visualization::ImageViewer
void | render ()
| Trigger a render call.
void | convertIntensityCloudToUChar (const pcl::PointCloud< pcl::Intensity > &cloud, boost::shared_array< unsigned char > data)
| Convert the Intensity information in a PointCloud<Intensity> to an unsigned char array.
void | convertIntensityCloud8uToUChar (const pcl::PointCloud< pcl::Intensity8u > &cloud, boost::shared_array< unsigned char > data)
| Convert the Intensity8u information in a PointCloud<Intensity8u> to an unsigned char array.
template<typename T>
void | convertRGBCloudToUChar (const pcl::PointCloud< T > &cloud, boost::shared_array< unsigned char > &data)
| Convert the RGB information in a PointCloud<T> to an unsigned char array.
void | resetStoppedFlag ()
| Set the stopped flag back to false.
void | emitMouseEvent (unsigned long event_id)
| Fire up a mouse event with a specified event ID.
void | emitKeyboardEvent (unsigned long event_id)
| Fire up a keyboard event with a specified event ID.
Static Protected Member Functions inherited from pcl::visualization::ImageViewer
static void | MouseCallback (vtkObject *, unsigned long eid, void *clientdata, void *calldata)
static void | KeyboardCallback (vtkObject *, unsigned long eid, void *clientdata, void *calldata)

## Detailed Description

Range image visualizer class.

Author
  Bastian Steder

Definition at line 52 of file range_image_visualizer.h.

## Constructor & Destructor Documentation

## RangeImageVisualizer()

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

Constructor.

Referenced by getAnglesWidget(), getHalfAnglesWidget(), getInterestPointsWidget(), getRangeImageBordersWidget(), and getRangeImageWidget().

## ~RangeImageVisualizer()

pcl::visualization::RangeImageVisualizer::~RangeImageVisualizer | ( |  | ) |

override

Destructor.

## Member Function Documentation

## getAnglesWidget()

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!

References RangeImageVisualizer().

## getHalfAnglesWidget()

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!

References RangeImageVisualizer().

## getInterestPointsWidget()

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!

References RangeImageVisualizer().

## getRangeImageBordersWidget()

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!

References RangeImageVisualizer().

## getRangeImageWidget()

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!

References RangeImageVisualizer().

## showRangeImage()

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.

## visualizeBorders()

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.

## Member Data Documentation

## name_

std::string pcl::visualization::RangeImageVisualizer::name_

protected

Definition at line 110 of file range_image_visualizer.h.

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

- pcl/visualization/range_image_visualizer.h