-
Notifications
You must be signed in to change notification settings - Fork 0
/
tracing.h
48 lines (34 loc) · 1.08 KB
/
tracing.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
#ifndef TRACING_H
#define TRACING_H
#include <array>
#include <QTime>
#include <chrono>
#include <opencv2/opencv.hpp>
#include "displayinfo.h"
#include "numerictype.h"
class TracingLayerData
{
public:
cv::Mat data;
std::vector<std::chrono::milliseconds> time;
int getXDim() const;
int getYDim() const;
int getZDim() const;
bool isLoaded() const;
cv::Mat getRegion(std::vector<cv::Range> region, bool clone = false);
cv::Mat getAxialSlice(int z, bool clone = false);
cv::Mat getCoronalSlice(int y, bool clone = false);
cv::Mat getSaggitalSlice(int x, bool clone = false);
unsigned char &at(int x, int y, int z);
void set(int x, int y, int z);
void reset(int x, int y, int z);
void load(int x, int y, int z);
const NumericType *getType() const;
};
struct TracingData
{
std::array<TracingLayerData, (int)TracingLayer::Count> layers;
TracingLayerData &operator[](std::size_t layer) { return layers[layer]; }
TracingLayerData &operator[](TracingLayer layer) { return layers[(std::size_t)layer]; }
};
#endif // TRACING_H