-
Notifications
You must be signed in to change notification settings - Fork 0
/
brush.h
70 lines (45 loc) · 1.24 KB
/
brush.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
61
62
63
64
65
66
67
68
69
70
#ifndef BRUSH_H
#define BRUSH_H
#include <QImage>
#include "Matrix3D.h"
#include "CommonTypes.h"
class Brush
{
public:
virtual void paint(QImage &data, int x, int y, QColor highlightColor) = 0;
virtual void paint(Matrix3D<LabelType> &data, int x, int y, int z, LabelType label) = 0;
virtual ~Brush() {}
};
class PixelBrush : public Brush
{
public:
PixelBrush();
void paint(QImage &data, int x, int y, QColor highlightColor);
void paint(Matrix3D<LabelType> &data, int x, int y, int z, LabelType label);
};
class SizedBrush : public Brush
{
public:
int width;
int height;
int depth;
SizedBrush();
void setSize(int width, int height, int depth);
};
class CubeBrush : public SizedBrush
{
public:
CubeBrush();
CubeBrush(int width, int height, int depth);
void paint(QImage &data, int x, int y, QColor highlightColor);
void paint(Matrix3D<LabelType> &data, int x, int y, int z, LabelType label);
};
class SphereBrush : public SizedBrush
{
public:
SphereBrush();
SphereBrush(int width, int height, int depth);
void paint(QImage &data, int x, int y, QColor highlightColor);
void paint(Matrix3D<LabelType> &data, int x, int y, int z, LabelType label);
};
#endif // BRUSH_H