Biomedical Image Analysis Library
The Biomedical Image Analysis Library is a poweful tool for developers, physicians, researchers, engineers, and so on.
segmentationtool.h
Go to the documentation of this file.
1 #ifndef SEGMENTATIONTOOL_H
2 #define SEGMENTATIONTOOL_H
3 
4 #include "Common.hpp"
5 #include "tool.h"
6 
7 class SegmentationTool : public Tool {
8 private:
9  Bial::Image< int > seeds;
10  Bial::Image< int > mask;
11 
12  Bial::Point3D lastPoint;
13  bool drawing;
14  int drawType;
15  double alpha;
16  double beta;
17  bool seedsVisible;
18  bool maskVisible;
19  QTime timer;
20  int thickness;
21  std::array< QPixmap, 4 > pixmaps;
22  std::array< bool, 4 > needUpdate;
23 
24 public:
25  enum { Type = 1 };
27  static const int supportedFormats = ( ( int ) Modality::BW2D | ( int ) Modality::BW3D );
28 
29  /* Tool interface */
30 public:
31  int type( );
32  void mouseReleased( QPointF pt, Qt::MouseButtons buttons, size_t axis );
33  void mouseClicked( QPointF pt, Qt::MouseButtons buttons, size_t axis );
34  void mouseDragged( QPointF pt, Qt::MouseButtons buttons, size_t axis );
35  void mouseMoved( QPointF pt, size_t axis );
36  void sliceChanged( size_t axis, size_t slice );
37  QPixmap getLabel( size_t axis );
38 
39  void drawSeed( Bial::Point3D last, Bial::Point3D actual );
40  void setDrawType( int type );
41  void clearSeeds( );
42  Bial::Image< int > segmentationOGS( double alpha, double beta );
43 
44  double getAlpha( ) const;
45  void setAlpha( double value );
46  double getBeta( ) const;
47  void setBeta( double value );
48  int getDrawType( ) const;
49 
50  void setSeedsVisibility( bool vis );
51  void setMaskVisibility( bool vis );
52 
53  bool getSeedsVisible( ) const;
54  bool getMaskVisible( ) const;
55  void setThickness( int value );
56 
57 };
58 
59 #endif /* SEGMENTATIONTOOL_H */
void setBeta(double value)
void mouseDragged(QPointF pt, Qt::MouseButtons buttons, size_t axis)
int getDrawType() const
GuiImage * guiImage
Definition: tool.h:13
void mouseMoved(QPointF pt, size_t axis)
Definition: tool.h:10
void setSeedsVisibility(bool vis)
void setDrawType(int type)
double getBeta() const
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
The Point3D class is a Geometric representation of a point in 3D space. A point is a zero­dimension...
Definition: Geometrics.hpp:218
Content: Commonly used macros, types, static variables and functions. Description: Some macros used...
void setAlpha(double value)
void sliceChanged(size_t axis, size_t slice)
Bial::Image< int > segmentationOGS(double alpha, double beta)
bool getMaskVisible() const
void mouseReleased(QPointF pt, Qt::MouseButtons buttons, size_t axis)
bool getSeedsVisible() const
void setThickness(int value)
SegmentationTool(GuiImage *guiImage, ImageViewer *viewer)
void drawSeed(Bial::Point3D last, Bial::Point3D actual)
QPixmap getLabel(size_t axis)
double getAlpha() const
static const int supportedFormats
void mouseClicked(QPointF pt, Qt::MouseButtons buttons, size_t axis)
void setMaskVisibility(bool vis)