cellUview 1.0.0
A real-time image processing and analysis suite for digital microscopy.
Loading...
Searching...
No Matches
gui.h
1#ifndef CELLUVIEW_GUI_H
2#define CELLUVIEW_GUI_H
3#include <QMainWindow>
4
5#include "QT/qtWindow.h" //compiled header file from qtcreator
6#include "stdlib.h"
7#include <opencv2/core.hpp>
8#include <opencv2/imgproc.hpp>
9#include <opencv2/imgcodecs.hpp>
10#include "imageProcessor.h"
11#include "edgeDetection.h"
12#include "gallery.h"
13#include "grayScale.h"
14#include "frame.h"
15#include "dilation.h"
16#include "erosion.h"
17#include "camera.h"
18#include "contrastEnhancement.h"
19#include "flatFieldCorrect.h"
20#include <QDir>
21#include <QDialog>
22#include <QVBoxLayout>
23#include <list>
24#include "kMeansCluster.h"
25#include "motorDriver.h"
26
27
31class Gui : public QWidget, public imageProcessor{
32 Q_OBJECT
33
34public:
35 void receiveFrame(frame newFrame);
36 Gui(QMainWindow*, Ui_GUI*, Gallery*, MotorDriver*, std::vector <imageProcessor *>&);
37 void SetVisible(bool visible);
38 void returnPosition(int x, int y, int z);
39
40private:
41 QMainWindow *widget;
42 Ui_GUI *ui;
43 bool doCapture =false;
44 void captureNextFrame();
45 void restoreSettings(std::string = "");
46 void updateSettings(std::map<std::string, std::string>);
47
48 void motorMove(char ax, int increment);
49
50
51 std::string getParamLabel(){return "";};
52 bool updateFlatField = false;
53 bool flatFieldEnable = false;
54 void setUpdateFlatField();
55 void displayKmeans();
56 int flatFieldCounter = 0;
57 void updateGalleryIndex(bool);
58
59 void displayImages();
60 void intialGallerySetting();
61 void onCaptureButtonPress();
62 void textEditController(std::string enteredTextStr, bool pressed);
63 void showDialog(int position);
64 void updateGalleryView(bool directionIsNext);
65 void resetCheckbox(QCheckBox* box);
66 void setClusterCheckbox(QCheckBox*, cv::Vec3b, std::string);
67
68
69 std::string setKmeansStyleSheet(cv::Vec3b);
70
71
72
73 //std::string textEditController(std::string enteredTextStr){return myString;};
74 std::vector<QString> galleryStrs;
75 std::vector<cv::Mat> mats;
76 std::vector<std::string> keys;
77 std::vector<QImage> galleryQImages;
78 QString str1;
79 QString str2;
80 QString str3;
81 QString str4;
82 QImage gallery1;
83 QImage gallery2;
84 QImage gallery3;
85 QImage gallery4;
86 QDialog dialog;
87
88 int galleryPos1Index = 0;
89 int galleryPos2Index = 1;
90 int galleryPos3Index = 2;
91 int galleryPos4Index = 3;
92 std::string myString;
93 QStringList images;
94 int batchIndex = 1;
95 QDir imageDir;
96 QStringList imageFilters;
97
98 cv::Mat img;
99 Gallery* gallery;
100 Camera* cam;
101 std::vector<imageProcessor*> blocks;
102
103 std::map<std::string, std::string> metadata;
104
105
106 MotorDriver *motors;
107 //std::thread motorThread;
108};
109#endif // CELLUVIEW_GUI_H
Definition: camera.h:17
Definition: gui.h:31
void receiveFrame(frame newFrame)
Definition: gui.cpp:306
void SetVisible(bool visible)
Definition: gui.cpp:462
Definition: motorDriver.h:26
Definition: frame.h:20
Definition: imageProcessor.h:15