Update the changelog
[opencv] / apps / StereoGR / StereoGR.h
1 /*M///////////////////////////////////////////////////////////////////////////////////////\r
2 //\r
3 //  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\r
4 //\r
5 //  By downloading, copying, installing or using the software you agree to this license.\r
6 //  If you do not agree to this license, do not download, install,\r
7 //  copy or use the software.\r
8 //\r
9 //\r
10 //                        Intel License Agreement\r
11 //                For Open Source Computer Vision Library\r
12 //\r
13 // Copyright (C) 2000, Intel Corporation, all rights reserved.\r
14 // Third party copyrights are property of their respective owners.\r
15 //\r
16 // Redistribution and use in source and binary forms, with or without modification,\r
17 // are permitted provided that the following conditions are met:\r
18 //\r
19 //   * Redistribution's of source code must retain the above copyright notice,\r
20 //     this list of conditions and the following disclaimer.\r
21 //\r
22 //   * Redistribution's in binary form must reproduce the above copyright notice,\r
23 //     this list of conditions and the following disclaimer in the documentation\r
24 //     and/or other materials provided with the distribution.\r
25 //\r
26 //   * The name of Intel Corporation may not be used to endorse or promote products\r
27 //     derived from this software without specific prior written permission.\r
28 //\r
29 // This software is provided by the copyright holders and contributors "as is" and\r
30 // any express or implied warranties, including, but not limited to, the implied\r
31 // warranties of merchantability and fitness for a particular purpose are disclaimed.\r
32 // In no event shall the Intel Corporation or contributors be liable for any direct,\r
33 // indirect, incidental, special, exemplary, or consequential damages\r
34 // (including, but not limited to, procurement of substitute goods or services;\r
35 // loss of use, data, or profits; or business interruption) however caused\r
36 // and on any theory of liability, whether in contract, strict liability,\r
37 // or tort (including negligence or otherwise) arising in any way out of\r
38 // the use of this software, even if advised of the possibility of such damage.\r
39 //\r
40 //M*/// StereoGR.h : main header file for the STEREOGR application\r
41 //\r
42 \r
43 #if !defined(AFX_STEREOGR_H__2B3C951D_D27D_4C2E_983A_8EC824753946__INCLUDED_)\r
44 #define AFX_STEREOGR_H__2B3C951D_D27D_4C2E_983A_8EC824753946__INCLUDED_\r
45 \r
46 #if _MSC_VER > 1000\r
47 #pragma once\r
48 #endif // _MSC_VER > 1000\r
49 \r
50 #ifndef __AFXWIN_H__\r
51         #error include 'stdafx.h' before including this file for PCH\r
52 #endif\r
53 \r
54 #include "resource.h"       // main symbols\r
55 #include "DGProp.h"     \r
56 #include "FindHandCtl.h"\r
57 #include "GestMan.h"    \r
58 #include "PGControl.h"\r
59 #include "PTOptions.h"\r
60 #include "HMMParams.h"\r
61 #include "DGStat.h"\r
62 #include "GROptions.h"\r
63 #include "DynGestServer.h"\r
64         \r
65 \r
66 /////////////////////////////////////////////////////////////////////////////\r
67 // CStereoGRApp:\r
68 // See StereoGR.cpp for the implementation of this class\r
69 //\r
70 #define VIEWS_COUNT ID_VIEW12 - ID_VIEW1 + 1\r
71 #define IS_PTGREY_DATATYPE(x) ((x) >= 0 && (x) < PG_IMAGE_MAX)\r
72 #define GR_MASK_VIEW PT_POINTCLOUD_IMAGE + 1\r
73 #define GR_MAGICCUBE GR_MASK_VIEW + 1\r
74 \r
75 class CStereoGRView;\r
76 class CStereoGRApp : public CWinApp\r
77 {\r
78 private:\r
79         BOOL m_isNewData;\r
80         CGestRec m_gestRec;\r
81         CDGProp* m_dgProp;\r
82     CStereoGRView* m_views[VIEWS_COUNT];\r
83     int m_viewIds[VIEWS_COUNT];\r
84         CString m_modulePath;\r
85         int m_docType;\r
86 \r
87         void InitModulePath();\r
88         void CreatePropertyPages();\r
89     \r
90 \r
91     \r
92 public:\r
93         BOOL m_isClosingView;\r
94         void Zoom();\r
95         void Segment();\r
96         HANDLE m_glThread;\r
97         vector<POINT> m_TopLefts;\r
98         vector<POINT> m_TopLefts3D;\r
99     CDynGestServer m_dgServer;\r
100 \r
101         CGROptions* m_grOptions;\r
102         CPTOptions* m_ptOptions;\r
103     CHMMParams* m_hmmParams;\r
104     CDGStat*    m_dgStat;\r
105 \r
106     BOOL LoadSettings();\r
107     BOOL SaveSettings();\r
108         BOOL IsNewData();\r
109         void ValidateData(BOOL flag = TRUE);\r
110         BOOL m_doRecog;\r
111 //      void SetImage(int dataType, IplImage* image, BOOL copy = FALSE);\r
112         IplImage* GetImage(int dataType);\r
113         void Update();\r
114         void CloseView(int dataType);\r
115         void SetView(int dataType, CStereoGRView* pView);\r
116     CStereoGRView* GetView(int dataType) const {return m_views[dataType];};\r
117     int* GetViewIDs() const {return (int*)m_viewIds;};\r
118         void OpenView(int dataType);\r
119         void Process();\r
120     CFindHandCtrl m_findHand;\r
121         void SetDocType(int docType);\r
122         int GetDocType();\r
123         CStereoGRApp();\r
124     ~CStereoGRApp();\r
125 \r
126 // Overrides\r
127         // ClassWizard generated virtual function overrides\r
128         //{{AFX_VIRTUAL(CStereoGRApp)\r
129         public:\r
130         virtual BOOL InitInstance();\r
131         virtual int ExitInstance();\r
132         //}}AFX_VIRTUAL\r
133 \r
134 // Implementation\r
135         //{{AFX_MSG(CStereoGRApp)\r
136         afx_msg void OnAppAbout();\r
137         afx_msg void OnFileNew();\r
138         afx_msg void OnUpdateFileNew(CCmdUI* pCmdUI);\r
139         afx_msg void OnView();\r
140         afx_msg void OnPtProp();\r
141         afx_msg void OnPtWhitebalance();\r
142         afx_msg void OnPtoffline();\r
143         afx_msg void OnCaptureBack();\r
144         afx_msg void OnRungestrec();\r
145         afx_msg void OnSettings();\r
146         afx_msg void OnTrain();\r
147         afx_msg void OnSaveDynamicGestures();\r
148         afx_msg void OnLoadDynamicGestures();\r
149         afx_msg void OnSaveBase();\r
150         afx_msg void OnLoadBase();\r
151         afx_msg void OnRecogFileDg();\r
152         afx_msg void OnDeleteHmm();\r
153         afx_msg void OnRemoveAllDg();\r
154         afx_msg void OnUpdateRungestrec(CCmdUI* pCmdUI);\r
155         //}}AFX_MSG\r
156         DECLARE_MESSAGE_MAP()\r
157 };\r
158 \r
159 #define STEREOGRAPP(x) CStereoGRApp* (x) = (CStereoGRApp*)AfxGetApp();\r
160 \r
161 /////////////////////////////////////////////////////////////////////////////\r
162 \r
163 //{{AFX_INSERT_LOCATION}}\r
164 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.\r
165 \r
166 #endif // !defined(AFX_STEREOGR_H__2B3C951D_D27D_4C2E_983A_8EC824753946__INCLUDED_)\r