image_display.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012, Willow Garage, Inc.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * * Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  * * Neither the name of the Willow Garage, Inc. nor the names of its
14  * contributors may be used to endorse or promote products derived from
15  * this software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27  * POSSIBILITY OF SUCH DAMAGE.
28  */
29 
30 #ifndef RVIZ_IMAGE_DISPLAY_H
31 #define RVIZ_IMAGE_DISPLAY_H
32 
33 #ifndef Q_MOC_RUN // See: https://bugreports.qt-project.org/browse/QTBUG-22829
34 #include <QObject>
35 
36 #include <OgreMaterial.h>
37 #include <OgreRenderTargetListener.h>
38 #include <OgreSharedPtr.h>
39 
42 #include "rviz/image/mouse_click.h"
43 #include "rviz/render_panel.h"
44 
48 #endif
49 
50 
51 namespace Ogre
52 {
53 class SceneNode;
54 class Rectangle2D;
55 } // namespace Ogre
56 
57 namespace rviz
58 {
64 {
65  Q_OBJECT
66 public:
67  ImageDisplay();
68  ~ImageDisplay() override;
69 
70  // Overrides from Display
71  void onInitialize() override;
72  void update(float wall_dt, float ros_dt) override;
73  void reset() override;
74 
75 public Q_SLOTS:
76  virtual void updateNormalizeOptions();
77 
78 protected:
79  // overrides from Display
80  void onEnable() override;
81  void onDisable() override;
82 
83  /* This is called by incomingMessage(). */
84  void processMessage(const sensor_msgs::Image::ConstPtr& msg) override;
85  void updateTopic() override;
86 
87  Ogre::SceneManager* img_scene_manager_;
88 
90 
92 
93 private:
94  Ogre::SceneNode* img_scene_node_;
95  Ogre::Rectangle2D* screen_rect_;
96  Ogre::MaterialPtr material_;
97 
103 
105 };
106 
107 } // namespace rviz
108 
109 #endif
Ogre
Definition: axes_display.h:35
rviz::ImageDisplay::img_scene_manager_
Ogre::SceneManager * img_scene_manager_
Definition: image_display.h:87
rviz::ImageDisplay::~ImageDisplay
~ImageDisplay() override
Definition: image_display.cpp:146
rviz::ROSImageTexture
Definition: ros_image_texture.h:58
int_property.h
rviz::BoolProperty
Property specialized to provide getter for booleans.
Definition: bool_property.h:38
rviz::ImageDisplay::processMessage
void processMessage(const sensor_msgs::Image::ConstPtr &msg) override
Implement this to process the contents of a message.
Definition: image_display.cpp:246
rviz::ImageDisplay
Definition: image_display.h:63
float_property.h
rviz::ImageDisplay::updateNormalizeOptions
virtual void updateNormalizeOptions()
Definition: image_display.cpp:173
bool_property.h
rviz::ImageDisplay::reset
void reset() override
Called to tell the display to clear its state.
Definition: image_display.cpp:238
rviz::ImageDisplay::median_buffer_size_property_
IntProperty * median_buffer_size_property_
Definition: image_display.h:101
rviz::FloatProperty
Property specialized to enforce floating point max/min.
Definition: float_property.h:37
rviz::ImageDisplay::min_property_
FloatProperty * min_property_
Definition: image_display.h:99
rviz::ImageDisplay::got_float_image_
bool got_float_image_
Definition: image_display.h:102
rviz::ImageDisplay::mouse_click_
MouseClick * mouse_click_
Definition: image_display.h:104
rviz
Definition: add_display_dialog.cpp:54
rviz::ImageDisplay::texture_
ROSImageTexture texture_
Definition: image_display.h:89
rviz::ImageDisplay::normalize_property_
BoolProperty * normalize_property_
Definition: image_display.h:98
rviz::ImageDisplay::material_
Ogre::MaterialPtr material_
Definition: image_display.h:96
rviz::ImageDisplay::render_panel_
RenderPanel * render_panel_
Definition: image_display.h:91
rviz::ImageDisplayBase
Display subclass for subscribing and displaying to image messages.
Definition: image_display_base.h:63
render_panel.h
rviz::ImageDisplay::updateTopic
void updateTopic() override
Update topic and resubscribe.
Definition: image_display.cpp:261
mouse_click.h
rviz::ImageDisplay::img_scene_node_
Ogre::SceneNode * img_scene_node_
Definition: image_display.h:94
rviz::ImageDisplay::onEnable
void onEnable() override
Derived classes override this to do the actual work of enabling themselves.
Definition: image_display.cpp:156
rviz::ImageDisplay::onDisable
void onDisable() override
Derived classes override this to do the actual work of disabling themselves.
Definition: image_display.cpp:164
rviz::RenderPanel
Definition: render_panel.h:74
rviz::ImageDisplay::ImageDisplay
ImageDisplay()
Definition: image_display.cpp:58
image_display_base.h
rviz::MouseClick
Class for capturing mouse clicks.
Definition: mouse_click.h:34
rviz::ImageDisplay::update
void update(float wall_dt, float ros_dt) override
Called periodically by the visualization manager.
Definition: image_display.cpp:196
rviz::ImageDisplay::onInitialize
void onInitialize() override
Override this function to do subclass-specific initialization.
Definition: image_display.cpp:78
ros_image_texture.h
rviz::IntProperty
Property specialized to provide max/min enforcement for integers.
Definition: int_property.h:37
rviz::ImageDisplay::screen_rect_
Ogre::Rectangle2D * screen_rect_
Definition: image_display.h:95
rviz::ImageDisplay::max_property_
FloatProperty * max_property_
Definition: image_display.h:100


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall
autogenerated on Fri Aug 2 2024 08:43:09