VAT  3.0
Video Analysis Tool
image_display.h
1 #ifndef IMAGE_DISPLAY_H
2 #define IMAGE_DISPLAY_H
3 
4 #include "ui_image_display.h"
5 #include <QImage>
6 #include "ModulesDialog.h"
7 #include "parameterDialog.h"
8 #include "viewform.h"
9 #include <QVector>
10 #include <QScrollArea>
11 #include "productionthread.h"
12 
13 class MainWindow;
14 
15 enum ViewTypes {
16  _4Views,
17  _4ViewsMILES,
18  _2ViewsH,
19  _2ViewsV
20 };
21 
22 typedef enum ViewTypes ViewTypes;
23 
24 typedef QImage *(MainWindow::*OPERATOR)();
25 
29 class MainWindow : public QMainWindow
30  {
31  Q_OBJECT
32 
33  public:
41  MainWindow(VideoAnalysis *i_va, char *config_file, QMainWindow *parent = 0);
42  ~MainWindow();
43 
49  void closeEvent(QCloseEvent *event);
50 
51 
52 
58  void resizeEvent(QResizeEvent *event);
59 
60 
65  static void setGrayScaleTable();
66  static QVector<QRgb> *grayScaleTable;
67 
71  static void setThermalScaleTable();
72  static QVector<QRgb> *thermalScaleTable;
73 
74 private slots:
75  void on_initialButton_clicked();
76  void on_nextButton_clicked();
77 
78  // slots para hebra
79  void on_playButton_clicked();
80  void on_pauseButton_clicked();
81  void showImages(); // inicia la reproduccion de las imagenes
82  void undonePlay();
83 
84  void appendToLog(QString);
85 
86 
87 public:
88 
89  ProductionThread *producer;
90  //View elements
91  QScrollArea *m_viewArea;
92  QVector<ViewForm *> m_views;
93  ViewTypes m_vtype;
94  int m_vwidth;
95  int m_vheight;
96  int m_virow;
97  int m_vicol;
98  int m_nactive_views;
99 
100  int m_vhorpix;
101  int m_vverpix;
102  //Nombre del archivo de configuracion
103  char *m_view_config_file;
104  //View Configuration XML variables
105  QDomDocument *xmlViewConfig;
106  QDomElement rootViewConfig;
107 
108  //Customized View Functions:
109  void disableSaveViews();
110  void initViews(QFrame *);
111  void setupUiViews();
112 
113 
114 private:
115  Ui::MainWindow ui;
116  int counter;
117  int dialog_id;
118  Datapool *m_data;
119  VideoAnalysis *m_videoAnalysis;
120  ModulesDialog *m_dialog;
121  ParameterDialog *m_parameterDialog;
122  QString fNumber;
123 
124  std::map<int, QImage *(*)()> operators;
125  std::map<std::string, std::string> list;
126 
127  //todo y cambiarlo en el while...
128 
129  // Flag para saber si ya se construyeron todos los modulos
130  //del programa por primera vez
131 
132  // Flags for controlling proper initialization
133  bool parametrized;
134  bool initialized;
135  bool from_next;
136 
137  };
138 
139 #endif
void resizeEvent(QResizeEvent *event)
Overloads method for window resizing.
Definition: image_display.cpp:431
The ParameterDialog class is used to configure parameters of each loaded module in execution time...
Definition: parameterDialog.h:19
void closeEvent(QCloseEvent *event)
Overloads method for window closing.
Definition: image_display.cpp:440
static void setGrayScaleTable()
initialize a gray scale table used in this class.
Definition: image_display.cpp:257
static void setThermalScaleTable()
initialize a thermal scale table used in this class.
Definition: image_display.cpp:266
The ModulesDialog class is the class that manages a dialog for modules utilization.
Definition: ModulesDialog.h:18
MainWindow(VideoAnalysis *i_va, char *config_file, QMainWindow *parent=0)
Constructor for main program graphic interface.
Definition: image_display.cpp:20
An object of this class is instantiated at main code, and this object is used by every class to push ...
Definition: Datapool.h:39
The VideoAnalysis class is in charge to manage each module to actual video processing.
Definition: VideoAnalysis.h:27
The MainWindow class is the class that manages the main graphic interface container.
Definition: image_display.h:29
The ProductionThread class is a Thread in carge of coordinate frame navigation and kick video analysi...
Definition: productionthread.h:13