You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
152 lines
4.4 KiB
152 lines
4.4 KiB
//----------------------------------------------------------------------------
|
|
// Laser Guard Ltd.
|
|
// Copyright © 2000-2002. All Rights Reserved.
|
|
// Version 1.0 01/01/2000
|
|
// Last modification: 08/10/2003
|
|
// PROJECT:
|
|
// SUBSYSTEM:
|
|
// FILE: CalibrationDlg.h
|
|
// AUTHOR: Sergey Chizhevskiy
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Header file of CalibrationDlg.h
|
|
//----------------------------------------------------------------------------
|
|
// CalibrationDlg.h : header file
|
|
//
|
|
|
|
#if !defined(AFX_CALIBRATIONDLG_H__FDC16D3A_F927_4162_A053_1CF7759274B4__INCLUDED_)
|
|
#define AFX_CALIBRATIONDLG_H__FDC16D3A_F927_4162_A053_1CF7759274B4__INCLUDED_
|
|
|
|
#include "OptionsDlg.h" // Added by ClassView
|
|
#include "CalibrationData.h" // Added by ClassView
|
|
#include "..\DLIB\SensorArray.h" // Added by ClassView
|
|
#include "..\DLIB\EventQueue.h" // Added by ClassView
|
|
#include "..\DLIB\VideoWnd.h" // Added by ClassView
|
|
#include "..\DLIB\Transform.h" // Added by ClassView
|
|
#include "..\DLIB\Settings.h" // Added by ClassView
|
|
#include "PropertyLGSWnd.h" // Added by ClassView
|
|
#include "RelationDlg.h" // Added by ClassView
|
|
//#include "VideoWnd.h" // Added by ClassView
|
|
#include "..\DLIB\DDVideoWnd.h" // Added by ClassView
|
|
#include "afxcmn.h"
|
|
#include "tabcameradlg.h"
|
|
#include "tablinearizationdlg.h"
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CCalibrationDlg dialog
|
|
|
|
class CCalibrationDlg : public CDialog
|
|
{
|
|
// Construction
|
|
public:
|
|
CCalibrationDlg(CWnd* pParent = NULL); // standard constructor
|
|
|
|
// Dialog Data
|
|
//{{AFX_DATA(CCalibrationDlg)
|
|
enum { IDD = IDD_CALIBRATION_DIALOG };
|
|
CButton m_Test;
|
|
CButton m_Filter;
|
|
//}}AFX_DATA
|
|
|
|
// ClassWizard generated virtual function overrides
|
|
//{{AFX_VIRTUAL(CCalibrationDlg)
|
|
public:
|
|
virtual BOOL DestroyWindow();
|
|
virtual BOOL PreTranslateMessage(MSG* pMsg);
|
|
protected:
|
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
|
//}}AFX_VIRTUAL
|
|
|
|
// Implementation
|
|
protected:
|
|
HICON m_hIcon;
|
|
|
|
// Generated message map functions
|
|
//{{AFX_MSG(CCalibrationDlg)
|
|
virtual BOOL OnInitDialog();
|
|
afx_msg void OnPaint();
|
|
afx_msg HCURSOR OnQueryDragIcon();
|
|
afx_msg void OnTimer(UINT nIDEvent);
|
|
afx_msg void OnMove(int x, int y);
|
|
afx_msg void OnButtonClear();
|
|
afx_msg void OnCheckFilter();
|
|
afx_msg void OnButtonReset();
|
|
afx_msg void OnSelchangeTabMode(NMHDR* pNMHDR, LRESULT* pResult);
|
|
afx_msg void OnButtonOptions();
|
|
//}}AFX_MSG
|
|
DECLARE_MESSAGE_MAP()
|
|
|
|
private:
|
|
void CheckPtz();
|
|
LRESULT WindowProcButton( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
|
static LRESULT CALLBACK WindowProcButton_( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
|
WNDPROC m_pWndProc;
|
|
BOOL m_bPtzRun[3];
|
|
BOOL m_bPtzReady;
|
|
|
|
BOOL InVisibleZone( double angle, double range );
|
|
private:
|
|
void CheckLocator();
|
|
struct TARGET
|
|
{
|
|
double angle;
|
|
double range;
|
|
BOOL bValid;
|
|
}m_pTarget[2];
|
|
|
|
private:
|
|
void MakeCrossTarget();
|
|
RELATION m_Relation;
|
|
BOOL m_bTestMode;
|
|
// CTransform m_Transform[2];
|
|
LRESULT OnWMCalibration( WPARAM wParam, LPARAM lParam );
|
|
void CheckReady();
|
|
LRESULT OnOptionsChanged( WPARAM wParam, LPARAM lParam );
|
|
BOOL Communication();
|
|
// OPTIONS m_Options;
|
|
CDDVideoWnd *m_pVideoWnd;
|
|
CPropertyLGSWnd m_PropertyLGSWnd;
|
|
CEventQueue m_EventQueue;
|
|
CSensorArray m_Storage;
|
|
CCalibrationData m_CalibrationData;
|
|
CString m_TestFolderName;
|
|
|
|
CSettings m_Settings;
|
|
CVideoBase *m_pVideoBase;
|
|
|
|
public:
|
|
void OnButtonAdd();
|
|
void OnButtonParameters();
|
|
void OnButtonCalculate();
|
|
void OnButtonLoad();
|
|
void OnButtonDelete();
|
|
void OnButtonTest();
|
|
void OnButtonReport();
|
|
|
|
public:
|
|
BOOL UploadCalibrationTables( CLgDeviceLGS::LGS_CALIBRATION_TABLE& ct1, CLgDeviceLGS::LGS_CALIBRATION_TABLE& ct2 );
|
|
BOOL DownloadCalibrationTables();
|
|
|
|
private:
|
|
void CheckCalibrationTable();
|
|
|
|
public:
|
|
CTabCtrl m_TabMode;
|
|
CTabCameraDlg m_TabCameraDlg;
|
|
CTabLinearizationDlg m_TabLinearizationDlg;
|
|
|
|
private:
|
|
BOOL m_bCtGetInProgress[2];
|
|
BOOL m_bCtSetInProgress[2];
|
|
|
|
public:
|
|
BOOL GetTarget( INT nDevice, double *pAngle, double *pRange, double *pMaxRange );
|
|
};
|
|
|
|
//{{AFX_INSERT_LOCATION}}
|
|
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
|
|
|
#endif // !defined(AFX_CALIBRATIONDLG_H__FDC16D3A_F927_4162_A053_1CF7759274B4__INCLUDED_)
|