47 #ifndef _MIRA_VISUALIZATION2DBASIC_H_ 48 #define _MIRA_VISUALIZATION2DBASIC_H_ 50 #include <QGraphicsScene> 51 #include <QGraphicsItem> 93 template <
typename Reflector>
110 virtual QGraphicsItem*
setupScene(QGraphicsScene* mgr) = 0;
121 mItem->setVisible(enabled);
136 MIRA_THROW(TransformerBase::XTransform,
"Data has no frame for transforming it into the views camera frame");
140 d =
getAuthority().template getTransform<RigidTransform2f>(
146 d =
getAuthority().template getTransform<RigidTransform2f>(
void reflect(Reflector &r)
Definition: Visualization2DBasic.h:94
void setName(const std::string &name)
Sets the name of this visualization.
Definition: Visualization.h:157
void setEnabled(bool enabled)
Changes the enabled-state and therefore the visibility of this visualization.
Definition: Visualization2DBasic.h:118
virtual QGraphicsScene * getSceneManager()=0
std::string mDataFrameID
Definition: Visualization2DBasic.h:191
virtual ~Visualization2DBasic()
Definition: Visualization2DBasic.h:89
virtual Authority & getAuthority()
Return the authority as reference.
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
virtual IVisualization2DSite * getSite()
Returns a pointer to the IVisualization2DSite interface that was set in the init() method...
#define MIRA_REFLECT_BASE(reflector, BaseClass)
Macro that can be used to reflect the base class easily.
Definition: ReflectorInterface.h:912
void channelProperty(Reflector &r, const std::string &name, ChannelProperty< T > &channel, const std::string &comment, OptionalMode optional=REQUIRED)
Special property-method that should be called within the reflect method to specify a ChannelProperty...
Definition: Visualization.h:249
void channelChangedCallback()
Definition: Visualization2DBasic.h:160
Abstract base class for all 2D visualization that are used by Visualization2DView.
Definition: Visualization2D.h:120
An object that allows read access to data of a channel.
Definition: ChannelReadWrite.h:440
virtual void update(Duration dt)
This method can be implemented in the derived Visualization classes.
Definition: Visualization2DBasic.h:132
Declaration of helper functions related to Qt.
#define MIRA_THROW(ex, msg)
Macro for throwing an exception.
Definition: Exception.h:82
The data structure that is returned by getDataConnection.
Definition: Visualization.h:183
Wrapper class for boost::posix_time::ptime for adding more functionality to it.
Definition: Time.h:416
void dataChangedCallback(ChannelRead< T > data)
Definition: Visualization2DBasic.h:154
QGraphicsItem * mItem
Definition: Visualization2DBasic.h:194
virtual void setupScene(IVisualization2DSite *site)
Must be implemented in derived classes.
Definition: Visualization2DBasic.h:101
Use this class to represent time durations.
Definition: Time.h:104
virtual void setEnabled(bool enabled)
Changes the enabled-state and therefore the visibility of this visualization.
Definition: Visualization.h:149
ChannelProperty< T > mDataChannel
Definition: Visualization2DBasic.h:188
std::string mChannelDisplayName
Definition: Visualization2DBasic.h:189
Inherit from this class if you want to implement a simple 2D visualization.
Definition: Visualization2DBasic.h:73
Definition: Visualization2D.h:64
Time mDataTimestamp
Definition: Visualization2DBasic.h:192
virtual DataConnection getDataConnection()
Returns information about the direct data connection for this visualization.
Definition: Visualization2DBasic.h:126
The concrete typed ChannelProperty template class.
Definition: ChannelProperty.h:214
MIRA_GUI_WIDGETS_EXPORT void setTransform(QGraphicsItem *item, const RigidTransform2f &t)
Applies a transform (translation and rotation) to a graphics scene item.
static Time now() static Time eternity()
Returns the current utc based time.
Definition: Time.h:479
Declaration of Visualization2D and related classes.
virtual void channelChanged()
Overwrite this method to get notified when the connected channel changes.
Definition: Visualization2DBasic.h:172
Visualization2DBasic(const std::string channelDisplayName="Channel")
Constructor taking a name of the visualized channel.
Definition: Visualization2DBasic.h:80
virtual void dataChanged(ChannelRead< T > data)
Overwrite this method to listen on channel callbacks.
Definition: Visualization2DBasic.h:177
virtual QGraphicsItem * getItem()
Must be implemented in derived classes to return a pointer to the QGraphicsItem used for drawing...
Definition: Visualization2DBasic.h:112
virtual void onDataChanged(ChannelRead< T > data)
Definition: Visualization2DBasic.h:184