cellUview 1.0.0
A real-time image processing and analysis suite for digital microscopy.
Loading...
Searching...
No Matches
frame.h
1#ifndef CELLUVIEW_FRAME_H
2#define CELLUVIEW_FRAME_H
3#include <opencv2/core.hpp>
4#include <opencv2/videoio.hpp>
5
6#include <iostream>
7#include <stdlib.h>
8#include <thread>
9#include <typeinfo>
10#include <map>
11
12#define metaDataPairDelim "|"
13#define metaDataItemDelim "*"
14
15
20class frame{
21 public:
22 frame() = default;
23 frame(cv::Mat matIn): image(matIn){}
24
30 this->image = copyFrom->image;
31 this->doMeta = copyFrom ->doMeta;
32 this->params = copyFrom->params;
33
34 }
35
36
37 cv::Mat image;
38 void setParameter(std::string, std::string);
39 std::string encodeMetadata();
40 bool doMeta = false;
41
42 std::string getParam(std::string);
43
44 frame(frame const & ) = default; //default copy constructor
45
46 int getParamSize();
47
48
49 private:
50 std::map<std::string, std::string> params;
51
52 const std::vector<std::string> validParams= {
53 "edgeThreshold",
54 "erosion",
55 "dilation",
56 "grayScale",
57 "contrastThreshold",
58 "flatField",
59 "exposure",
60 "note",
61 "kMean"
62 //ADD MORE PARAMETERS HERE
63 };
64 std::string encodedString;
65};
66
67
68
69#endif //CELLUVIEW_FRAME_H
Definition: frame.h:20
void setParameter(std::string, std::string)
Definition: frame.cpp:11
void copyFrom(frame *copyFrom)
Definition: frame.h:29
std::string encodeMetadata()
Definition: frame.cpp:33
int getParamSize()
Definition: frame.cpp:62
std::string getParam(std::string)
Definition: frame.cpp:52