![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
ImageViewer is a class for 2D image visualization. More...
#include <image_viewer.h>


Classes | |
| struct | ExitCallback |
| struct | ExitMainLoopTimerCallback |
| struct | Layer |
| Internal structure describing a layer. More... | |
| struct | LayerComparator |
Public Types | |
| using | Ptr = shared_ptr< ImageViewer > |
| using | ConstPtr = shared_ptr< const ImageViewer > |
Public Member Functions | |
| ImageViewer (const std::string &window_title="") | |
| Constructor. More... | |
| virtual | ~ImageViewer () |
| Destructor. More... | |
| void | setInteractorStyle (vtkInteractorObserver *style) |
| Set up the interactor style. By default the interactor style is set to vtkInteractorStyleImage you can use this to set it to another type. 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. Calls the interactor and runs an internal loop. More... | |
| void | spinOnce (int time=1, bool force_redraw=true) |
| Spin once method. Calls the interactor and updates the screen once. 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... | |
Protected Types | |
| using | LayerMap = std::vector< Layer > |
Protected Member Functions | |
| 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... | |
| LayerMap::iterator | createLayer (const std::string &layer_id, int width, int height, double opacity=0.5, bool fill_box=true) |
| Add a new 2D rendering layer to the viewer. More... | |
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 | |
| boost::signals2::signal< void(const pcl::visualization::MouseEvent &)> | mouse_signal_ |
| boost::signals2::signal< void(const pcl::visualization::KeyboardEvent &)> | keyboard_signal_ |
| vtkSmartPointer< vtkRenderWindowInteractor > | interactor_ |
| vtkSmartPointer< vtkCallbackCommand > | mouse_command_ |
| vtkSmartPointer< vtkCallbackCommand > | keyboard_command_ |
| vtkSmartPointer< ExitMainLoopTimerCallback > | exit_main_loop_timer_callback_ |
| Callback object enabling us to leave the main loop, when a timer fires. More... | |
| vtkSmartPointer< ExitCallback > | exit_callback_ |
| vtkSmartPointer< vtkImageViewer > | image_viewer_ |
| The ImageViewer widget. More... | |
| vtkSmartPointer< vtkRenderWindow > | win_ |
| The render window. More... | |
| vtkSmartPointer< vtkRenderer > | ren_ |
| The renderer. More... | |
| vtkSmartPointer< vtkImageSlice > | slice_ |
| Global prop. This is the actual "actor". More... | |
| vtkSmartPointer< ImageViewerInteractorStyle > | interactor_style_ |
| The interactor style. More... | |
| boost::shared_array< unsigned char > | data_ |
| The data array representing the image. Used internally. More... | |
| std::size_t | data_size_ |
| The data array (representing the image) size. Used internally. More... | |
| bool | stopped_ |
| Set to false if the interaction loop is running. More... | |
| int | timer_id_ |
| Global timer ID. Used in destructor only. More... | |
| LayerMap | layer_map_ |
| Internal list with different 2D layers shapes. More... | |
| vtkSmartPointer< vtkImageFlip > | algo_ |
| Image reslice, used for flipping the image. More... | |
| std::vector< unsigned char * > | image_data_ |
| Internal data array. Used everytime add***Image is called. Cleared, everytime the render loop is executed. More... | |
ImageViewer is a class for 2D image visualization.
Features include:
Simple usage example:
Definition at line 83 of file image_viewer.h.
| using pcl::visualization::ImageViewer::ConstPtr = shared_ptr<const ImageViewer> |
Definition at line 86 of file image_viewer.h.
|
protected |
Definition at line 1070 of file image_viewer.h.
| using pcl::visualization::ImageViewer::Ptr = shared_ptr<ImageViewer> |
Definition at line 85 of file image_viewer.h.
| pcl::visualization::ImageViewer::ImageViewer | ( | const std::string & | window_title = "" | ) |
Constructor.
| [in] | window_title | the title of the window |
Definition at line 28 of file image_viewer.cpp.
References algo_, exit_callback_, exit_main_loop_timer_callback_, interactor_, interactor_style_, keyboard_command_, KeyboardCallback(), mouse_command_, MouseCallback(), ren_, resetStoppedFlag(), slice_, vtkRenderWindowInteractorFixNew(), and win_.
|
virtual |
Destructor.
Definition at line 99 of file image_viewer.cpp.
| void pcl::visualization::ImageViewer::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).
| [in] | data | the input data representing the image |
| [in] | width | the width of the image |
| [in] | height | the height of the image |
| [in] | layer_id | the name of the layer (default: "image") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
Definition at line 279 of file image_viewer.cpp.
| bool pcl::visualization::ImageViewer::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.
| [in] | x | the x coordinate of the circle center |
| [in] | y | the y coordinate of the circle center |
| [in] | radius | the radius of the circle |
| [in] | layer_id | the 2D layer ID where we want the extra information to be drawn. |
| [in] | opacity | the opacity of the layer: 0 for invisible, 1 for opaque. (default: 1.0) |
Definition at line 629 of file image_viewer.cpp.
| bool pcl::visualization::ImageViewer::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.
| [in] | x | the x coordinate of the circle center |
| [in] | y | the y coordinate of the circle center |
| [in] | radius | the radius of the circle |
| [in] | r | the red channel of the color that the sphere should be rendered with (0.0 -> 1.0) |
| [in] | g | the green channel of the color that the sphere should be rendered with (0.0 -> 1.0) |
| [in] | b | the blue channel of the color that the sphere should be rendered with (0.0 -> 1.0) |
| [in] | layer_id | the 2D layer ID where we want the extra information to be drawn. |
| [in] | opacity | the opacity of the layer: 0 for invisible, 1 for opaque. (default: 1.0) |
Definition at line 594 of file image_viewer.cpp.
| bool pcl::visualization::ImageViewer::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.
| [in] | x_min | the X min coordinate |
| [in] | x_max | the X max coordinate |
| [in] | y_min | the Y min coordinate |
| [in] | y_max | the Y max coordinate |
| [in] | layer_id | the 2D layer ID where we want the extra information to be drawn. |
| [in] | opacity | the opacity of the layer: 0 for invisible, 1 for opaque. (default: 0.5) |
Definition at line 676 of file image_viewer.cpp.
| bool pcl::visualization::ImageViewer::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.
| [in] | x_min | the X min coordinate |
| [in] | x_max | the X max coordinate |
| [in] | y_min | the Y min coordinate |
| [in] | y_max | the Y max coordinate |
| [in] | r | the red channel of the color that the box should be rendered with (0.0 -> 1.0) |
| [in] | g | the green channel of the color that the box should be rendered with (0.0 -> 1.0) |
| [in] | b | the blue channel of the color that the box should be rendered with (0.0 -> 1.0) |
| [in] | layer_id | the 2D layer ID where we want the extra information to be drawn. |
| [in] | opacity | the opacity of the layer: 0 for invisible, 1 for opaque. (default: 0.5) |
Definition at line 638 of file image_viewer.cpp.
| void pcl::visualization::ImageViewer::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).
| [in] | data | the input data representing the image in float format |
| [in] | width | the width of the image |
| [in] | height | the height of the image |
| [in] | min_value | filter all values in the image to be larger than this minimum value |
| [in] | max_value | filter all values in the image to be smaller than this maximum value |
| [in] | grayscale | show data as grayscale (true) or not (false). Default: false |
| [in] | layer_id | the name of the layer (default: "image") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
Definition at line 249 of file image_viewer.cpp.
| void pcl::visualization::ImageViewer::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).
| [in] | data | the input data representing the image |
| [in] | width | the width of the image |
| [in] | height | the height of the image |
| [in] | layer_id | the name of the layer (default: "image") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
Definition at line 302 of file image_viewer.cpp.
| bool pcl::visualization::ImageViewer::addLayer | ( | const std::string & | layer_id, |
| int | width, | ||
| int | height, | ||
| double | opacity = 0.5 |
||
| ) |
Add a new 2D rendering layer to the viewer.
| [in] | layer_id | the name of the layer |
| [in] | width | the width of the layer |
| [in] | height | the height of the layer |
| [in] | opacity | the opacity of the layer: 0 for invisible, 1 for opaque. (default: 0.5) |
Definition at line 555 of file image_viewer.cpp.
| bool pcl::visualization::ImageViewer::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.
| [in] | x_min | the X min coordinate |
| [in] | y_min | the Y min coordinate |
| [in] | x_max | the X max coordinate |
| [in] | y_max | the Y max coordinate |
| [in] | layer_id | the 2D layer ID where we want the extra information to be drawn. |
| [in] | opacity | the opacity of the layer: 0 for invisible, 1 for opaque. (default: 1.0) |
Definition at line 812 of file image_viewer.cpp.
| bool pcl::visualization::ImageViewer::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.
| [in] | x_min | the X min coordinate |
| [in] | y_min | the Y min coordinate |
| [in] | x_max | the X max coordinate |
| [in] | y_max | the Y max coordinate |
| [in] | r | the red channel of the color that the line should be rendered with (0.0 -> 1.0) |
| [in] | g | the green channel of the color that the line should be rendered with (0.0 -> 1.0) |
| [in] | b | the blue channel of the color that the line should be rendered with (0.0 -> 1.0) |
| [in] | layer_id | the 2D layer ID where we want the extra information to be drawn. |
| [in] | opacity | the opacity of the layer: 0 for invisible, 1 for opaque. (default: 1.0) |
Definition at line 776 of file image_viewer.cpp.
| bool pcl::visualization::ImageViewer::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)
| [in] | image | the organized point cloud dataset containing the image data |
| [in] | mask | the point data representing the mask that we want to draw |
| [in] | layer_id | the 2D layer ID where we want the extra information to be drawn. |
| [in] | opacity | the opacity of the layer: 0 for invisible, 1 for opaque. (default: 0.5) |
Definition at line 142 of file image_viewer.hpp.
References image.
| bool pcl::visualization::ImageViewer::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.
| [in] | image | the organized point cloud dataset containing the image data |
| [in] | mask | the point data representing the mask that we want to draw |
| [in] | r | the red channel of the color that the mask should be rendered with |
| [in] | g | the green channel of the color that the mask should be rendered with |
| [in] | b | the blue channel of the color that the mask should be rendered with |
| [in] | layer_id | the 2D layer ID where we want the extra information to be drawn. |
| [in] | opacity | the opacity of the layer: 0 for invisible, 1 for opaque. (default: 0.5) |
Definition at line 98 of file image_viewer.hpp.
| void pcl::visualization::ImageViewer::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).
| [in] | cloud | the input data representing the RGB point cloud |
| [in] | layer_id | the name of the layer (default: "image") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
Definition at line 199 of file image_viewer.cpp.
|
inline |
Add a monochrome 2D image layer, but do not render it (use spin/spinOnce to update).
| [in] | cloud | the input data representing the grayscale point cloud |
| [in] | layer_id | the name of the layer (default: "image") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
Definition at line 147 of file image_viewer.h.
| void pcl::visualization::ImageViewer::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).
| [in] | cloud | the input data representing the RGB point cloud |
| [in] | layer_id | the name of the layer (default: "image") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
Definition at line 224 of file image_viewer.cpp.
|
inline |
Add a monochrome 2D image layer, but do not render it (use spin/spinOnce to update).
| [in] | cloud | the input data representing the grayscale point cloud |
| [in] | layer_id | the name of the layer (default: "image") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
Definition at line 190 of file image_viewer.h.
| void pcl::visualization::ImageViewer::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).
| [in] | data | the input data representing the image |
| [in] | width | the width of the image |
| [in] | height | the height of the image |
| [in] | layer_id | the name of the layer (default: "image") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
Definition at line 152 of file image_viewer.cpp.
| bool pcl::visualization::ImageViewer::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.
| [in] | image | the organized point cloud dataset containing the image data |
| [in] | polygon | the point data representing the polygon that we want to draw. A line will be drawn from each point to the next in the dataset. |
| [in] | layer_id | the 2D layer ID where we want the extra information to be drawn. |
| [in] | opacity | the opacity of the layer: 0 for invisible, 1 for opaque. (default: 1.0) |
Definition at line 200 of file image_viewer.hpp.
References image.
| bool pcl::visualization::ImageViewer::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.
| [in] | image | the organized point cloud dataset containing the image data |
| [in] | polygon | the point data representing the polygon that we want to draw. A line will be drawn from each point to the next in the dataset. |
| [in] | r | the red channel of the color that the polygon should be rendered with |
| [in] | g | the green channel of the color that the polygon should be rendered with |
| [in] | b | the blue channel of the color that the polygon should be rendered with |
| [in] | layer_id | the 2D layer ID where we want the extra information to be drawn. |
| [in] | opacity | the opacity of the layer: 0 for invisible, 1 for opaque. (default: 1.0) |
Definition at line 152 of file image_viewer.hpp.
| bool pcl::visualization::ImageViewer::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.
| [in] | min_pt | the X,Y min coordinate |
| [in] | max_pt | the X,Y max coordinate |
| [in] | layer_id | the 2D layer ID where we want the extra information to be drawn. |
| [in] | opacity | the opacity of the layer: 0 for invisible, 1 for opaque. (default: 1.0) |
Definition at line 768 of file image_viewer.cpp.
| bool pcl::visualization::ImageViewer::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.
| [in] | min_pt | the X,Y min coordinate |
| [in] | max_pt | the X,Y max coordinate |
| [in] | r | the red channel of the color that the box should be rendered with (0.0 -> 1.0) |
| [in] | g | the green channel of the color that the box should be rendered with (0.0 -> 1.0) |
| [in] | b | the blue channel of the color that the box should be rendered with (0.0 -> 1.0) |
| [in] | layer_id | the 2D layer ID where we want the extra information to be drawn. |
| [in] | opacity | the opacity of the layer: 0 for invisible, 1 for opaque. (default: 1.0) |
Definition at line 735 of file image_viewer.cpp.
| bool pcl::visualization::ImageViewer::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.
| [in] | image | the organized point cloud dataset containing the image data |
| [in] | mask | the point data representing the mask that we want to draw |
| [in] | layer_id | the 2D layer ID where we want the extra information to be drawn. |
| [in] | opacity | the opacity of the layer: 0 for invisible, 1 for opaque. (default: 1.0) |
Definition at line 343 of file image_viewer.hpp.
References image.
| bool pcl::visualization::ImageViewer::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.
| [in] | image | the organized point cloud dataset containing the image data |
| [in] | mask | the point data representing the mask that we want to draw |
| [in] | r | the red channel of the color that the mask should be rendered with |
| [in] | g | the green channel of the color that the mask should be rendered with |
| [in] | b | the blue channel of the color that the mask should be rendered with |
| [in] | layer_id | the 2D layer ID where we want the extra information to be drawn. |
| [in] | opacity | the opacity of the layer: 0 for invisible, 1 for opaque. (default: 1.0) |
Definition at line 291 of file image_viewer.hpp.
| bool pcl::visualization::ImageViewer::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.
| [in] | image | the organized point cloud dataset containing the image data |
| [in] | min_pt | the X,Y min coordinate |
| [in] | max_pt | the X,Y max coordinate |
| [in] | layer_id | the 2D layer ID where we want the extra information to be drawn. |
| [in] | opacity | the opacity of the layer: 0 for invisible, 1 for opaque. (default: 1.0) |
Definition at line 280 of file image_viewer.hpp.
References image.
| bool pcl::visualization::ImageViewer::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.
| [in] | image | the organized point cloud dataset containing the image data |
| [in] | min_pt | the X,Y min coordinate |
| [in] | max_pt | the X,Y max coordinate |
| [in] | r | the red channel of the color that the box should be rendered with (0.0 -> 1.0) |
| [in] | g | the green channel of the color that the box should be rendered with (0.0 -> 1.0) |
| [in] | b | the blue channel of the color that the box should be rendered with (0.0 -> 1.0) |
| [in] | layer_id | the 2D layer ID where we want the extra information to be drawn. |
| [in] | opacity | the opacity of the layer: 0 for invisible, 1 for opaque. (default: 1.0) |
Definition at line 210 of file image_viewer.hpp.
| bool pcl::visualization::ImageViewer::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.
| [in] | x_min | the X min coordinate |
| [in] | x_max | the X max coordinate |
| [in] | y_min | the Y min coordinate |
| [in] | y_max | the Y max coordinate |
| [in] | layer_id | the 2D layer ID where we want the extra information to be drawn. |
| [in] | opacity | the opacity of the layer: 0 for invisible, 1 for opaque. (default: 1.0) |
Definition at line 724 of file image_viewer.cpp.
| bool pcl::visualization::ImageViewer::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.
| [in] | x_min | the X min coordinate |
| [in] | x_max | the X max coordinate |
| [in] | y_min | the Y min coordinate |
| [in] | y_max | the Y max coordinate |
| [in] | r | the red channel of the color that the box should be rendered with (0.0 -> 1.0) |
| [in] | g | the green channel of the color that the box should be rendered with (0.0 -> 1.0) |
| [in] | b | the blue channel of the color that the box should be rendered with (0.0 -> 1.0) |
| [in] | layer_id | the 2D layer ID where we want the extra information to be drawn. |
| [in] | opacity | the opacity of the layer: 0 for invisible, 1 for opaque. (default: 1.0) |
Definition at line 688 of file image_viewer.cpp.
| void pcl::visualization::ImageViewer::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).
| [in] | cloud | the input data representing the RGB point cloud |
| [in] | layer_id | the name of the layer (default: "image") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
Definition at line 71 of file image_viewer.hpp.
|
inline |
Add an RGB 2D image layer, but do not render it (use spin/spinOnce to update).
| [in] | cloud | the input data representing the RGB point cloud |
| [in] | layer_id | the name of the layer (default: "image") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
Definition at line 261 of file image_viewer.h.
| void pcl::visualization::ImageViewer::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).
| [in] | data | the input data representing the image |
| [in] | width | the width of the image |
| [in] | height | the height of the image |
| [in] | layer_id | the name of the layer (default: "image") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
| [in] | autoresize | flag to enable window to adapt to image size (default true) |
Definition at line 104 of file image_viewer.cpp.
| void pcl::visualization::ImageViewer::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).
| [in] | short_image | the input data representing the image in unsigned short format |
| [in] | width | the width of the image |
| [in] | height | the height of the image |
| [in] | min_value | filter all values in the image to be larger than this minimum value |
| [in] | max_value | filter all values in the image to be smaller than this maximum value |
| [in] | grayscale | show data as grayscale (true) or not (false). Default: false |
| [in] | layer_id | the name of the layer (default: "image") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
Definition at line 326 of file image_viewer.cpp.
| bool pcl::visualization::ImageViewer::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.
| [in] | x | the X coordinate |
| [in] | y | the Y coordinate |
| [in] | text | the text string to be displayed |
| [in] | layer_id | the 2D layer ID where we want the extra information to be drawn. |
| [in] | opacity | the opacity of the layer: 0 for invisible, 1 for opaque. (default: 1.0) |
Definition at line 857 of file image_viewer.cpp.
| bool pcl::visualization::ImageViewer::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.
| [in] | x | the X coordinate |
| [in] | y | the Y coordinate |
| [in] | text | the text string to be displayed |
| [in] | r | the red channel of the color that the line should be rendered with (0.0 -> 1.0) |
| [in] | g | the green channel of the color that the line should be rendered with (0.0 -> 1.0) |
| [in] | b | the blue channel of the color that the line should be rendered with (0.0 -> 1.0) |
| [in] | layer_id | the 2D layer ID where we want the extra information to be drawn. |
| [in] | opacity | the opacity of the layer: 0 for invisible, 1 for opaque. (default: 1.0) |
Definition at line 823 of file image_viewer.cpp.
|
inline |
Stop the interaction and close the visualizaton window.
Definition at line 584 of file image_viewer.h.
|
protected |
Convert the Intensity8u information in a PointCloud<Intensity8u> to an unsigned char array.
| [in] | cloud | the input cloud containing the grayscale intensity information |
| [out] | data | a boost shared array of unsigned char type |
Definition at line 969 of file image_viewer.cpp.
References data.
|
protected |
Convert the Intensity information in a PointCloud<Intensity> to an unsigned char array.
| [in] | cloud | the input cloud containing the grayscale intensity information |
| [out] | data | a boost shared array of unsigned char type |
Definition at line 959 of file image_viewer.cpp.
References data.
|
protected |
Convert the RGB information in a PointCloud<T> to an unsigned char array.
| [in] | cloud | the input cloud containing the RGB information |
| [out] | data | a boost shared array of unsigned char type |
Definition at line 56 of file image_viewer.hpp.
References data.
|
protected |
Add a new 2D rendering layer to the viewer.
| [in] | layer_id | the name of the layer |
| [in] | width | the width of the layer |
| [in] | height | the height of the layer |
| [in] | opacity | the opacity of the layer: 0 for invisible, 1 for opaque. (default: 0.5) |
| [in] | fill_box | set to true to fill in the image with one black box before starting |
Definition at line 528 of file image_viewer.cpp.
References pcl::visualization::ImageViewer::Layer::actor, height, pcl::visualization::ImageViewer::Layer::layer_name, and width.
|
protected |
Fire up a keyboard event with a specified event ID.
| [in] | event_id | the id of the event |
Definition at line 499 of file image_viewer.cpp.
References event.
Referenced by KeyboardCallback().
|
protected |
Fire up a mouse event with a specified event ID.
| [in] | event_id | the id of the event |
Definition at line 427 of file image_viewer.cpp.
Referenced by MouseCallback().
| int * pcl::visualization::ImageViewer::getSize | ( | ) |
Return the window size in pixels.
Definition at line 1061 of file image_viewer.cpp.
Referenced by PclUtils::ImageVis::addText().
|
staticprotected |
Definition at line 518 of file image_viewer.cpp.
References emitKeyboardEvent().
Referenced by ImageViewer().
| void pcl::visualization::ImageViewer::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.
| [in] | u | the u/x coordinate of the pixel |
| [in] | v | the v/y coordinate of the pixel |
| [in] | fg_color | the pixel color |
| [in] | bg_color | the neighborhood color |
| [in] | radius | the circle radius around the pixel |
| [in] | layer_id | the name of the layer (default: "points") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
Definition at line 866 of file image_viewer.cpp.
| void pcl::visualization::ImageViewer::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).
| [in] | uv | the u/x, v/y coordinate of the pixels to be marked |
| [in] | fg_color | the pixel color |
| [in] | bg_color | the neighborhood color |
| [in] | size | edge of the square surrounding each pixel |
| [in] | layer_id | the name of the layer (default: "markers") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
Definition at line 920 of file image_viewer.cpp.
| void pcl::visualization::ImageViewer::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.
| [in] | uv | the u/x, v/y coordinate of the pixels to be marked |
| [in] | fg_color | the pixel color |
| [in] | bg_color | the neighborhood color |
| [in] | size | edge of the square surrounding each pixel |
| [in] | layer_id | the name of the layer (default: "markers") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
Definition at line 905 of file image_viewer.cpp.
|
staticprotected |
Definition at line 509 of file image_viewer.cpp.
References emitMouseEvent().
Referenced by ImageViewer().
| boost::signals2::connection pcl::visualization::ImageViewer::registerKeyboardCallback | ( | std::function< void(const pcl::visualization::KeyboardEvent &)> | cb | ) |
Register a callback std::function for keyboard events.
| [in] | cb | the boost function that will be registered as a callback for a keyboard event |
Definition at line 413 of file image_viewer.cpp.
References callback.
|
inline |
Register a callback function for keyboard events.
| [in] | callback | the function that will be registered as a callback for a keyboard event |
| [in] | cookie | user data that is passed to the callback |
Definition at line 488 of file image_viewer.h.
References e.
|
inline |
Register a callback function for keyboard events.
| [in] | callback | the member function that will be registered as a callback for a keyboard event |
| [in] | instance | instance to the class that implements the callback function |
| [in] | cookie | user data that is passed to the callback |
Definition at line 505 of file image_viewer.h.
| boost::signals2::connection pcl::visualization::ImageViewer::registerMouseCallback | ( | std::function< void(const pcl::visualization::MouseEvent &)> | cb | ) |
Register a callback function for mouse events.
| [in] | cb | the boost function that will be registered as a callback for a mouse event |
Definition at line 385 of file image_viewer.cpp.
References callback.
|
inline |
Register a callback std::function for mouse events.
| [in] | callback | the function that will be registered as a callback for a mouse event |
| [in] | cookie | user data that is passed to the callback |
Definition at line 530 of file image_viewer.h.
References e.
Referenced by PclUtils::ImageVis::enable2Dviewer().
|
inline |
Register a callback function for mouse events.
| [in] | callback | the member function that will be registered as a callback for a mouse event |
| [in] | instance | instance to the class that implements the callback function |
| [in] | cookie | user data that is passed to the callback |
Definition at line 547 of file image_viewer.h.
| void pcl::visualization::ImageViewer::removeLayer | ( | const std::string & | layer_id | ) |
Remove a 2D layer given by its ID.
| [in] | layer_id | the name of the layer |
Definition at line 577 of file image_viewer.cpp.
Referenced by PclUtils::ImageVis::removeLayer().
|
protected |
Trigger a render call.
Definition at line 952 of file image_viewer.cpp.
Referenced by PclUtils::ImageVis::setRender().
|
inlineprotected |
Set the stopped flag back to false.
Definition at line 1010 of file image_viewer.h.
Referenced by ImageViewer(), and PclUtils::ImageVis::setRenderWindowInteractor().
|
inline |
Set up the interactor style. By default the interactor style is set to vtkInteractorStyleImage you can use this to set it to another type.
| [in] | style | user set interactor style. |
Definition at line 100 of file image_viewer.h.
| void pcl::visualization::ImageViewer::setPosition | ( | int | x, |
| int | y | ||
| ) |
Set the position in screen coordinates.
| [in] | x | where to move the window to (X) |
| [in] | y | where to move the window to (Y) |
Definition at line 1056 of file image_viewer.cpp.
| void pcl::visualization::ImageViewer::setSize | ( | int | xw, |
| int | yw | ||
| ) |
Set the window size in screen coordinates.
| [in] | xw | window size in horizontal (pixels) |
| [in] | yw | window size in vertical (pixels) |
Definition at line 1064 of file image_viewer.cpp.
| void pcl::visualization::ImageViewer::setWindowTitle | ( | const std::string & | name | ) |
Set the window title name.
| [in] | name | the window title |
Definition at line 1051 of file image_viewer.cpp.
References name.
| void pcl::visualization::ImageViewer::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.
| [in] | data | the input data representing the image |
| [in] | width | the width of the image |
| [in] | height | the height of the image |
| [in] | layer_id | the name of the layer (default: "image") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
Definition at line 291 of file image_viewer.cpp.
| bool pcl::visualization::ImageViewer::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.
| [in] | source_img | The source RGB image |
| [in] | target_img | The target RGB image |
| [in] | correspondences | The list of correspondences to display. |
| [in] | nth | display only the Nth correspondence (e.g., skip the rest) |
| [in] | layer_id | the layer id (default: "correspondences") |
Definition at line 353 of file image_viewer.hpp.
References data, G3Point::getRandomColors(), and image.
| void pcl::visualization::ImageViewer::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.
| [in] | data | the input data representing the image in float format |
| [in] | width | the width of the image |
| [in] | height | the height of the image |
| [in] | min_value | filter all values in the image to be larger than this minimum value |
| [in] | max_value | filter all values in the image to be smaller than this maximum value |
| [in] | grayscale | show data as grayscale (true) or not (false). Default: false |
| [in] | layer_id | the name of the layer (default: "image") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
Definition at line 264 of file image_viewer.cpp.
| void pcl::visualization::ImageViewer::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.
| [in] | data | the input data representing the image |
| [in] | width | the width of the image |
| [in] | height | the height of the image |
| [in] | layer_id | the name of the layer (default: "image") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
Definition at line 315 of file image_viewer.cpp.
| void pcl::visualization::ImageViewer::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.
| [in] | cloud | the input data representing the grayscale point cloud |
| [in] | layer_id | the name of the layer (default: "image") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
Definition at line 215 of file image_viewer.cpp.
|
inline |
Show a monochrome 2D image on screen.
| [in] | cloud | the input data representing the grayscale point cloud |
| [in] | layer_id | the name of the layer (default: "image") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
Definition at line 134 of file image_viewer.h.
| void pcl::visualization::ImageViewer::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.
| [in] | cloud | the input data representing the grayscale point cloud |
| [in] | layer_id | the name of the layer (default: "image") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
Definition at line 240 of file image_viewer.cpp.
|
inline |
Show a monochrome 2D image on screen.
| [in] | cloud | the input data representing the grayscale point cloud |
| [in] | layer_id | the name of the layer (default: "image") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
Definition at line 177 of file image_viewer.h.
| void pcl::visualization::ImageViewer::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.
| [in] | data | the input data representing the image |
| [in] | width | the width of the image |
| [in] | height | the height of the image |
| [in] | layer_id | the name of the layer (default: "image") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
Definition at line 188 of file image_viewer.cpp.
| void pcl::visualization::ImageViewer::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.
| [in] | cloud | the input data representing the RGB point cloud |
| [in] | layer_id | the name of the layer (default: "image") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
Definition at line 88 of file image_viewer.hpp.
|
inline |
Show a 2D image on screen, obtained from the RGB channel of a point cloud.
| [in] | cloud | the input data representing the RGB point cloud |
| [in] | layer_id | the name of the layer (default: "image") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
Definition at line 249 of file image_viewer.h.
| void pcl::visualization::ImageViewer::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.
| [in] | data | the input data representing the image |
| [in] | width | the width of the image |
| [in] | height | the height of the image |
| [in] | layer_id | the name of the layer (default: "image") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
Definition at line 141 of file image_viewer.cpp.
| void pcl::visualization::ImageViewer::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.
| [in] | short_image | the input data representing the image in unsigned short format |
| [in] | width | the width of the image |
| [in] | height | the height of the image |
| [in] | min_value | filter all values in the image to be larger than this minimum value |
| [in] | max_value | filter all values in the image to be smaller than this maximum value |
| [in] | grayscale | show data as grayscale (true) or not (false). Default: false |
| [in] | layer_id | the name of the layer (default: "image") |
| [in] | opacity | the opacity of the layer (default: 1.0) |
Definition at line 342 of file image_viewer.cpp.
| void pcl::visualization::ImageViewer::spin | ( | ) |
Spin method. Calls the interactor and runs an internal loop.
Definition at line 357 of file image_viewer.cpp.
| void pcl::visualization::ImageViewer::spinOnce | ( | int | time = 1, |
| bool | force_redraw = true |
||
| ) |
Spin once method. Calls the interactor and updates the screen once.
| [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. |
Definition at line 366 of file image_viewer.cpp.
|
inline |
Returns true when the user tried to close the window.
Definition at line 581 of file image_viewer.h.
|
protected |
Image reslice, used for flipping the image.
Definition at line 1134 of file image_viewer.h.
Referenced by ImageViewer().
|
protected |
The data array representing the image. Used internally.
Definition at line 1116 of file image_viewer.h.
|
protected |
The data array (representing the image) size. Used internally.
Definition at line 1119 of file image_viewer.h.
|
protected |
Definition at line 1098 of file image_viewer.h.
Referenced by ImageViewer(), and PclUtils::ImageVis::setRenderWindowInteractor().
|
protected |
Callback object enabling us to leave the main loop, when a timer fires.
Definition at line 1097 of file image_viewer.h.
Referenced by ImageViewer(), and PclUtils::ImageVis::setRenderWindowInteractor().
|
protected |
Internal data array. Used everytime add***Image is called. Cleared, everytime the render loop is executed.
Definition at line 1139 of file image_viewer.h.
|
protected |
The ImageViewer widget.
Definition at line 1101 of file image_viewer.h.
Referenced by PclUtils::ImageVis::createLayer().
|
protected |
Definition at line 1091 of file image_viewer.h.
Referenced by PclUtils::ImageVis::getRenderWindowInteractor(), ImageViewer(), PclUtils::ImageVis::removeLayer(), and PclUtils::ImageVis::setRenderWindowInteractor().
|
protected |
The interactor style.
Definition at line 1113 of file image_viewer.h.
Referenced by PclUtils::ImageVis::addText(), and ImageViewer().
|
protected |
Definition at line 1093 of file image_viewer.h.
Referenced by ImageViewer().
|
protected |
Definition at line 1089 of file image_viewer.h.
|
protected |
Internal list with different 2D layers shapes.
Definition at line 1131 of file image_viewer.h.
Referenced by PclUtils::ImageVis::addText(), PclUtils::ImageVis::contains(), PclUtils::ImageVis::createLayer(), PclUtils::ImageVis::getLayer(), and PclUtils::ImageVis::pickItem().
|
protected |
Definition at line 1092 of file image_viewer.h.
Referenced by ImageViewer().
|
protected |
Definition at line 1087 of file image_viewer.h.
|
protected |
The renderer.
Definition at line 1107 of file image_viewer.h.
Referenced by PclUtils::ImageVis::addRGBImage(), PclUtils::ImageVis::addText(), PclUtils::ImageVis::createLayer(), PclUtils::ImageVis::getRender(), ImageViewer(), PclUtils::ImageVis::removeLayer(), and PclUtils::ImageVis::setRender().
|
protected |
Global prop. This is the actual "actor".
Definition at line 1110 of file image_viewer.h.
Referenced by PclUtils::ImageVis::addRGBImage(), ImageViewer(), and PclUtils::ImageVis::setRender().
|
protected |
Set to false if the interaction loop is running.
Definition at line 1122 of file image_viewer.h.
|
protected |
Global timer ID. Used in destructor only.
Definition at line 1125 of file image_viewer.h.
Referenced by PclUtils::ImageVis::setRenderWindowInteractor().
|
protected |
The render window.
Definition at line 1104 of file image_viewer.h.
Referenced by PclUtils::ImageVis::addRGBImage(), PclUtils::ImageVis::changeOpacity(), PclUtils::ImageVis::getRenderWindow(), ImageViewer(), and PclUtils::ImageVis::setRenderWindow().