-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAnnotationTypes.hpp
51 lines (38 loc) · 1.01 KB
/
AnnotationTypes.hpp
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
#ifndef FISHLABELER_ANNOTATIONTYPES_HPP
#define FISHLABELER_ANNOTATIONTYPES_HPP
#include <vector>
#include <QRect>
#include <QPoint>
enum class ANNOTATION_MODE {
SEGMENTATION,
BOUNDINGBOX
};
struct BoundingBoxMD {
BoundingBoxMD()
: instance_id(0)
{}
BoundingBoxMD(QRect brect, int id)
: bbox(std::move(brect)), instance_id(id)
{}
QRect bbox;
int instance_id;
};
struct PixelLabelMB {
PixelLabelMB()
: instance_id(0)
{}
PixelLabelMB(std::vector<QPoint>&& spts, int id)
: smask(std::move(spts)), instance_id(id)
{}
std::vector<QPoint> smask;
int instance_id;
};
//something to encapulate all of the user-supplied information for a given frame
struct FrameAnnotations {
FrameAnnotations(std::vector<BoundingBoxMD>&& fvboxes, std::vector<PixelLabelMB>&& fvpoints)
: bboxes(std::move(fvboxes)), segm_points(std::move(fvpoints))
{}
std::vector<BoundingBoxMD> bboxes;
std::vector<PixelLabelMB> segm_points;
};
#endif