#pragma once
|
|
#include "CHImageControls/CHRectTracker.h"
|
#include "CameraImageView.h"
|
// CCameraViewReview
|
|
struct SPixelInfo
|
{
|
SPixelInfo()
|
{
|
nWidthPixel = 0;
|
nHeightPixel = 0;
|
dDiagonalPixel = 0;
|
dWidthRealUM = 0;
|
dHeightRealUM = 0;
|
dDiagonalRealUM = 0;
|
}
|
int nWidthPixel;
|
int nHeightPixel;
|
double dDiagonalPixel;
|
|
double dWidthRealUM;
|
double dHeightRealUM;
|
double dDiagonalRealUM;
|
|
};
|
|
class CCameraViewReview : public CCameraImageView
|
{
|
DECLARE_DYNAMIC(CCameraViewReview)
|
|
public:
|
CCameraViewReview(CWnd *pParentWnd);
|
virtual ~CCameraViewReview();
|
void SetDrawROIRect(BOOL bDraw);
|
void SetTrackerRect(const CRect& rtRect);
|
BOOL GetTrackerRect(CRect& rtRect);
|
void ClearTrackerRect();
|
void SetDefectPos(const CPoint& ptPoint);
|
// 임시 추가 cmj
|
void ContextMenu(UINT nFlags, CPoint point);
|
|
|
protected:
|
BOOL m_bDrawROIRect;
|
CRect m_rtROIRect;
|
SPixelInfo m_sROIInfo;
|
|
// tracker
|
BOOL m_bDrawTracker;
|
CPoint m_ptTrackerStart;
|
CCHRectTracker m_rectTracker;
|
|
CPoint m_ptDefectPos;
|
|
void DrawROIRect(CDC *pDC);
|
void DrawDefectPos(CDC *pDC);
|
|
BOOL m_bUseOnlyImageSave;
|
|
protected:
|
DECLARE_MESSAGE_MAP()
|
afx_msg void OnSaveImage();
|
afx_msg void OnSaveAsImage();
|
afx_msg void OnManualSimulation();
|
|
afx_msg void OnPaint();
|
afx_msg void OnROIRect();
|
afx_msg void OnClearROIRect();
|
afx_msg void OnSaveROIRect();
|
|
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
|
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
|
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
|
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
|
|
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
|
|
afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
|
afx_msg void OnRButtonDblClk(UINT nFlags, CPoint point);
|
|
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
|
|
afx_msg void OnUseOnlyImageSave();
|
|
|
|
};
|