cellUview 1.0.0
A real-time image processing and analysis suite for digital microscopy.
Loading...
Searching...
No Matches
gallery.h
1#ifndef CELLUVIEW_GALLERY_H
2#define CELLUVIEW_GALLERY_H
3
4#include "stdlib.h"
5#include <opencv2/core.hpp>
6#include <opencv2/imgproc.hpp>
7#include <opencv2/imgcodecs.hpp>
8#include "imageProcessor.h"
9#include <sys/types.h>
10#include <sys/stat.h>
11#include <dirent.h>
12#include "cpp_exiftool/src/ExifTool.h"
13#include <sstream>
14#include <iterator>
15#include <string>
16#include "frame.h"
17#include <cstdio>
18#include <unordered_map>
19#include <list>
20
22{
23
24public:
25 Gallery();
26 void captureFrame(frame, bool flatfield = false, int flatFieldCounter = 0);
27 void updateImgName(std::string);
28 void updateIndex();
29 std::map<std::string, std::string> getMetadata(std::string = "");
30
31 std::string getPathname() { return pathname; }; // testing only
32 std::string getCaptureFname() { return captureFname; }; // testing only
33
34 std::list<std::pair<std::string, cv::Mat>> getCaptures(bool);
35
36 bool galleryAtEnd();
37 std::string getGalleryDisplayFname(int);
38
39private:
40 void initialiseDirectory(std::string, std::string);
41 void writeMetadata(frame, std::string);
42
43 DIR *dir;
44 struct dirent *ent;
45 std::string pathname = "";
46 std::string flatFieldPath = "";
47 std::string imgName = "capture";
48 int captureImgCounter = 0;
49 std::string captureFname = "";
50 int index = 0;
51 int lastHighestIndex = -1;
52 int indexLen = 1;
53 int galleryDisplayIndex = 0;
54 std::string existingCaptureFname;
55
56 cv::Mat img;
57
58 std::string tagName;
59 std::string receivedMetadata;
60 std::string MetadataToWrite;
61
62 ExifTool *et = new ExifTool();
63
64 std::map<std::string, std::string> restoredParams;
65
66 std::vector<std::string> galleryDisplayFname;
67};
68#endif // CELLUVIEW_GALLERY_H
Definition: frame.h:20