-
Notifications
You must be signed in to change notification settings - Fork 2
/
marker.h
89 lines (66 loc) · 2.34 KB
/
marker.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#ifndef MARKER_H
#define MARKER_H
#include "global.h"
#include <views/orientation.h>
#include <QVector>
#include <markerinformation.h>
#include <segmentation/forestwrapper.h>
#define MARKER_INSERTION 1
#define MARKER_REMOVAL 2
class Marker : public QObject
{
Q_OBJECT
public:
Marker(iftImageSequence *img);
~Marker();
const iftImage *getMarkers() const;
void setMarkers(const iftImage *img);
void resetMarkers();
void setBrushRadius(float new_radius);
float getBrushRadius();
iftAdjRel *getBrush();
void setSphericity(bool sphere);
void setAnnotationMode(char mode);
char getAnnotationMode();
void paintMarkersOnImage(Orientation *orientation, iftImage *img, QPoint point, int markerLabel, int sliceType, int sliceNum, bool erasing);
void paintMarkersOnQImage(Orientation *orientation, QImage *img, QPoint point, int markerLabel, int sliceType, int sliceNum, bool erasing);
void selectPointForDeletion(iftVoxel u, const iftImage *label, ForestWrapper *forest);
void paintMarker(iftVoxel v, int label);
void paintBox(iftVoxel v, int label);
void eraseMarker(iftVoxel v);
void setMarkerVisibility(int marker, int visibility);
iftColor getMarkerColor(int marker);
//TODO make const
MarkerInformationVector& getMarkerInfoArray();
void setMarkerName(int index, QString name);
int getIndexFromLabel(int label);
void setMarkerLabel(int index, int label);
iftColorTable *generateColorTable();//TODO getColorTable();
iftIntArray *generateMarkersVisibility();
void addItemInColorTable(int label = -1, iftColor *c = nullptr);
void setObjectColorInColorTable(int obj, iftColor color);
void destroyColorTable();
void removeMarker(int markerLabel);
void setLastPoint(QPoint *newPoint);
const QPoint* getLastPoint() const;
const iftImage *getRemovalMarkers() const;
int getNextLabel();
int getLabel(int index);
void undo();
private:
/******** IFT structures ********/
iftImage *markers;
iftAdjRel *brush;
iftBoundingBox bb;
QVector<QPair<int, iftLabeledSet*>> historic;
MarkerInformationVector markerInfoArray;
iftImage *removalMarkers;
/******** Variables ********/
float radius;
bool sphere;
char annotationMode;
int bbIndex;
int nmarkers;
QPoint *lastPoint;
};
#endif // MARKER_H