Range image visualizer class. More...
#include <pcl/visualization/range_image_visualizer.h>
Public Member Functions | |
RangeImageVisualizer (const std::string &name="Range Image") | |
Constructor. More... |
|
~RangeImageVisualizer () | |
Destructor. More... |
|
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. More... |
|
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. More... |
|
Public Member Functions inherited from pcl::visualization::ImageViewer | |
ImageViewer (const std::string &window_title="") | |
Constructor. More... |
|
virtual | ~ImageViewer () |
Destructor. More... |
|
void | setInteractorStyle (vtkInteractorObserver *style) |
Set up the interactor style. More... |
|
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. More... |
|
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). More... |
|
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. More... |
|
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). More... |
|
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. More... |
|
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). More... |
|
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. More... |
|
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). More... |
|
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. More... |
|
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). More... |
|
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. More... |
|
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). More... |
|
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. More... |
|
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). More... |
|
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. More... |
|
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). More... |
|
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. More... |
|
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). More... |
|
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. More... |
|
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). More... |
|
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. More... |
|
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). More... |
|
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. More... |
|
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). More... |
|
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. More... |
|
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. More... |
|
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). More... |
|
void | setWindowTitle (const std::string &name) |
Set the window title name. More... |
|
void | spin () |
Spin method. More... |
|
void | spinOnce (int time=1, bool force_redraw=true) |
Spin once method. More... |
|
boost::signals2::connection | registerKeyboardCallback (void(*callback)(const pcl::visualization::KeyboardEvent &, void *), void *cookie=nullptr) |
Register 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=nullptr) |
Register a callback function for keyboard events. More... |
|
boost::signals2::connection | registerKeyboardCallback (std::function< void(const pcl::visualization::KeyboardEvent &)> cb) |
Register a callback std::function for keyboard events. More... |
|
boost::signals2::connection | registerMouseCallback (void(*callback)(const pcl::visualization::MouseEvent &, void *), void *cookie=nullptr) |
Register a callback std::function for mouse events. More... |
|
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. More... |
|
boost::signals2::connection | registerMouseCallback (std::function< void(const pcl::visualization::MouseEvent &)> cb) |
Register a callback function for mouse events. More... |
|
void | setPosition (int x, int y) |
Set the position in screen coordinates. More... |
|
void | setSize (int xw, int yw) |
Set the window size in screen coordinates. More... |
|
int * | getSize () |
Return the window size in pixels. More... |
|
bool | wasStopped () const |
Returns true when the user tried to close the window. More... |
|
void | close () |
Stop the interaction and close the visualizaton window. More... |
|
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. More... |
|
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. More... |
|
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. More... |
|
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. More... |
|
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. More... |
|
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. More... |
|
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. More... |
|
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. More... |
|
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. More... |
|
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. More... |
|
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. More... |
|
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. More... |
|
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. More... |
|
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. More... |
|
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. More... |
|
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. More... |
|
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. More... |
|
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) More... |
|
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. More... |
|
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. More... |
|
bool | addLayer (const std::string &layer_id, int width, int height, double opacity=0.5) |
Add a new 2D rendering layer to the viewer. More... |
|
void | removeLayer (const std::string &layer_id) |
Remove a 2D layer given by its ID. More... |
|
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. More... |
|
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. More... |
|
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. More... |
|
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]). More... |
|
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]). More... |
|
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. More... |
|
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. More... |
|
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. More... |
|
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. More... |
|
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. More... |
|
void | resetStoppedFlag () |
Set the stopped flag back to false. More... |
|
void | emitMouseEvent (unsigned long event_id) |
Fire up a mouse event with a specified event ID. More... |
|
void | emitKeyboardEvent (unsigned long event_id) |
Fire up a keyboard event with a specified event ID. More... |
|
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) |
Range image visualizer class.
Definition at line 52 of file range_image_visualizer.h.
pcl::visualization::RangeImageVisualizer::RangeImageVisualizer | ( | const std::string & |
name = "Range Image"
|
) |
Constructor.
pcl::visualization::RangeImageVisualizer::~RangeImageVisualizer | ( | ) |
Destructor.
| 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 |
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 |
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 |
Same as above, but returning a new widget.
You are responsible for deleting it after usage!
| static |
Get a widget visualizing the given range image.
You are responsible for deleting it after usage!
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::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.
| protected |
Definition at line 110 of file range_image_visualizer.h.
© 2009–2012, Willow Garage, Inc.
© 2012–, Open Perception, Inc.
Licensed under the BSD License.
https://pointclouds.org/documentation/classpcl_1_1visualization_1_1_range_image_visualizer.html