#pragma once
|
|
#include "CHImageControls/CHRectTracker.h"
|
#include "CHCameraViewer/CameraView.h"
|
// CCameraView_Review
|
|
class AFX_EXT_CLASS CCameraView_Review : public CCameraView
|
{
|
DECLARE_DYNAMIC(CCameraView_Review)
|
|
public:
|
CCameraView_Review(int nViewIndex=0, CWnd* pParentWnd=NULL);
|
virtual ~CCameraView_Review();
|
|
BOOL GetAoiImage(CCHImageData* pImageData);
|
BOOL SetAoiImage(CCHImageData* pImageData);
|
BOOL SetAoiImage(int nWidth, int nHeight, int nChannels, int nWidthStep, const BYTE* pBuffer);
|
|
// loader
|
BOOL LoadAoiImage(const CString& strFilename);
|
|
void SetDrawRoiRect(BOOL bDraw);
|
void SetDrawReviewAlignRect(BOOL bDraw);
|
void SetDrawDefectPos(BOOL bDraw);
|
void SetDrawAoiDefect(BOOL bDraw);
|
|
void SetTrackerRect(const CRect& rtRect);
|
BOOL GetTrackerRect(CRect& rtRect);
|
void ClearTrackerRect();
|
void SetDefectPos(const CPoint& ptPoint);
|
|
// Reivew Align Rect
|
void SetReviewAlginRect(BOOL bShow, const CRect& rtRect);
|
BOOL GetReviewAlginRect(CRect& rtRect);
|
|
protected:
|
DECLARE_MESSAGE_MAP()
|
afx_msg void OnPaint();
|
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 OnSaveAsImage();
|
afx_msg void OnChangeView();
|
afx_msg void OnROIRect();
|
afx_msg void OnAoiDefect();
|
afx_msg void OnDefectPos();
|
afx_msg void OnClearROIRect();
|
afx_msg void OnSaveROIRect();
|
afx_msg void OnLoadAoiImage();
|
|
protected:
|
void DrawROIRect(CDC *pDC);
|
void DrawReviewAlignRect(CDC *pDC);
|
void DrawDefectPos(CDC *pDC);
|
void DrawAoiDefect(CDC *pDC);
|
virtual void PopUpCommandMenu(const CPoint& point);
|
|
protected:
|
// roi
|
BOOL m_bDrawRoiRect;
|
CRect m_rtRoiRect;
|
SPixelInfo m_sROIInfo;
|
|
// Reveiw Align
|
BOOL m_bDrawReviewAlignRect;
|
CRect m_rtReviewAlignRect;
|
|
// defect pos
|
BOOL m_bDrawDefectPos;
|
CPoint m_ptDefectPos;
|
|
// aoi defect
|
BOOL m_bDrawAoiDefect;
|
CRect m_rtAoiDefectRect;
|
CCHImageData m_AoiDefectImage;
|
|
// tracker
|
BOOL m_bDrawTracker;
|
CPoint m_ptTrackerStart;
|
CCHRectTracker m_rectTracker;
|
|
|
};
|