-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsegmentationtool.h
60 lines (49 loc) · 1.53 KB
/
segmentationtool.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef SEGMENTATIONTOOL_H
#define SEGMENTATIONTOOL_H
#include "tool.h"
#include "Common.hpp"
class SegmentationTool : public Tool {
private:
Bial::Image< char > seeds;
Bial::Image< char > mask;
Bial::Point3D lastPoint;
bool drawing;
int drawType;
double alpha;
double beta;
bool seedsVisible;
bool maskVisible;
QTime timer;
int thickness;
std::array<QPixmap, 4> pixmaps;
std::array<bool, 4> needUpdate;
public:
enum { Type = 1 };
SegmentationTool( GuiImage *guiImage, ImageViewer *viewer );
static const int supportedFormats =
( ( int ) Modality::BW2D | ( int ) Modality::BW3D );
/* Tool interface */
public:
int type( );
void mouseReleased( QPointF pt, Qt::MouseButtons buttons, size_t axis );
void mouseClicked( QPointF pt, Qt::MouseButtons buttons, size_t axis );
void mouseDragged( QPointF pt, Qt::MouseButtons buttons, size_t axis );
void mouseMoved( QPointF pt, size_t axis );
void sliceChanged( size_t axis, size_t slice );
QPixmap getLabel( size_t axis );
void drawSeed( Bial::Point3D last, Bial::Point3D actual );
void setDrawType( int type );
void clearSeeds( );
Bial::Image< char > segmentationOGS( double alpha, double beta );
double getAlpha( ) const;
void setAlpha( double value );
double getBeta( ) const;
void setBeta( double value );
int getDrawType( ) const;
void setSeedsVisibility(bool vis);
void setMaskVisibility(bool vis);
bool getSeedsVisible() const;
bool getMaskVisible() const;
void setThickness(int value);
};
#endif /* SEGMENTATIONTOOL_H */