Biomedical Image Analysis Library
The Biomedical Image Analysis Library is a poweful tool for developers, physicians, researchers, engineers, and so on.
tool.h
Go to the documentation of this file.
1 #ifndef TOOL_H
2 #define TOOL_H
3 
4 #include "guiimage.h"
5 #include "imageviewer.h"
6 
7 #include <QPointF>
8 #include <QString>
9 
10 class Tool : public QObject {
11  Q_OBJECT
12 protected:
15  bool m_visible;
16  bool m_hasLabel = false;
17 
18 public:
19  Tool( GuiImage *guiImage, ImageViewer *viewer );
20 
21  virtual int type( ) = 0;
22  virtual void mouseReleased( QPointF pt, Qt::MouseButtons buttons, size_t axis ) = 0;
23  virtual void mouseClicked( QPointF pt, Qt::MouseButtons buttons, size_t axis ) = 0;
24  virtual void mouseDragged( QPointF pt, Qt::MouseButtons buttons, size_t axis ) = 0;
25  virtual void mouseMoved( QPointF pt, size_t axis ) = 0;
26  virtual void sliceChanged( size_t axis, size_t slice ) = 0;
27  void setVisible( bool value );
28  virtual QPixmap getLabel( size_t axis );
29 
30  bool visible( ) const;
31  bool hasLabel( ) const;
32 
33 protected:
34  void setHasLabel( bool sHasLabel );
35 };
36 
37 #endif /* TOOL_H */
GuiImage * guiImage
Definition: tool.h:13
Definition: tool.h:10
virtual void sliceChanged(size_t axis, size_t slice)=0
ImageViewer * viewer
Definition: tool.h:14
The GuiImage class is a bridge to the Bial::Image data structure to the QImage data structure...
Definition: guiimage.h:20
void setVisible(bool value)
Definition: tool.cpp:14
virtual void mouseDragged(QPointF pt, Qt::MouseButtons buttons, size_t axis)=0
virtual void mouseReleased(QPointF pt, Qt::MouseButtons buttons, size_t axis)=0
virtual QPixmap getLabel(size_t axis)
Definition: tool.cpp:18
virtual int type()=0
void setHasLabel(bool sHasLabel)
Definition: tool.cpp:7
Tool(GuiImage *guiImage, ImageViewer *viewer)
Definition: tool.cpp:11
virtual void mouseClicked(QPointF pt, Qt::MouseButtons buttons, size_t axis)=0
bool visible() const
Definition: tool.cpp:23
bool hasLabel() const
Definition: tool.cpp:3
bool m_visible
Definition: tool.h:15
virtual void mouseMoved(QPointF pt, size_t axis)=0
bool m_hasLabel
Definition: tool.h:16