⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 segmentview.h

📁 segmentation sample good luck
💻 H
字号:
// SegmentView.h : interface of the CSegmentView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_SEGMENTVIEW_H__49989ECD_536B_11D1_91FE_843B0AC10000__INCLUDED_)
#define AFX_SEGMENTVIEW_H__49989ECD_536B_11D1_91FE_843B0AC10000__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#include <vector>

class CBlob;

class CSegmentView : public CScrollView
{
protected: // create from serialization only
	CSegmentView();
	DECLARE_DYNCREATE(CSegmentView)

// Attributes
public:
	CImageDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CSegmentView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual void OnInitialUpdate(); // called first time after construct
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
	//}}AFX_VIRTUAL

// Implementation
public:
	void BitmapToClient(CRect &cr);
	void ClientToBitmap(CRect &cr);
	void BitmapToClient(CPoint &);
	void ClientToBitmap(CPoint &);
	virtual ~CSegmentView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:
	void DrawBlobs(CDC *pDC);

// Generated message map functions
protected:
	bool m_bReverseVideo;
	void GetTemplateRect(CRect &cr);
	CStatic m_staticInfo;
	void PaintBlob(CDC *pDC,CBlob &blob,CPoint ptOffset,RGBQUAD &color);
	CBlob *m_pTemplateBlob;
	CBlob *m_pSelectedBlob;
	std::vector<CBlob *> m_blobBullseye;
	void GetScrolledViewRect(CRect &cr);
	//{{AFX_MSG(CSegmentView)
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnBlobStatistics();
	afx_msg void OnUpdateBlobStatistics(CCmdUI* pCmdUI);
	afx_msg void OnBlobChoosetemplate();
	afx_msg void OnUpdateBlobChoosetemplate(CCmdUI* pCmdUI);
	afx_msg void OnBlobMatch();
	afx_msg void OnUpdateBlobMatch(CCmdUI* pCmdUI);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnImageFindbullseyes();
	afx_msg void OnUpdateImageFindbullseyes(CCmdUI* pCmdUI);
	afx_msg void OnViewReversevideo();
	afx_msg void OnUpdateViewReversevideo(CCmdUI* pCmdUI);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in SegmentView.cpp
inline CImageDoc* CSegmentView::GetDocument()
   { return (CImageDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_SEGMENTVIEW_H__49989ECD_536B_11D1_91FE_843B0AC10000__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -