-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathBioTracker3ProxyMat.h
More file actions
55 lines (44 loc) · 1.24 KB
/
BioTracker3ProxyMat.h
File metadata and controls
55 lines (44 loc) · 1.24 KB
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
/****************************************************************************
**
** This file is part of the BioTracker Framework
** Origin of this class is BioTracker in version 2.
**
****************************************************************************/
#ifndef BIOTRACKER3PROXYMAT_H
#define BIOTRACKER3PROXYMAT_H
#include "Interfaces/IModel/IModel.h"
#include <boost/optional.hpp>
#include <opencv2/opencv.hpp>
/**
* The BioTracker3ProxyMat class is currently not used in BioTracker. It is an
* old class of the BioTracker in version 2.
*/
class BioTracker3ProxyMat
{
public:
BioTracker3ProxyMat(cv::Mat const& mat)
: m_originalMat(mat)
{
}
BioTracker3ProxyMat(const BioTracker3ProxyMat&) = delete;
BioTracker3ProxyMat& operator=(const BioTracker3ProxyMat&) = delete;
cv::Mat& getMat()
{
if (!isModified()) {
m_modifiedMat = m_originalMat.clone();
}
return m_modifiedMat.get();
}
void setMat(cv::Mat mat)
{
m_modifiedMat = mat;
}
bool isModified() const
{
return m_modifiedMat.is_initialized();
}
private:
cv::Mat const& m_originalMat;
boost::optional<cv::Mat> m_modifiedMat;
};
#endif // BIOTRACKER3PROXYMAT_H