www.pudn.com > MySee_Snake.rar > MySeeView.h
// MySeeView.h : interface of the CMySeeView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_MYSEEVIEW_H__7C394983_B4AC_473B_8EF0_5E64F4C37F07__INCLUDED_)
#define AFX_MYSEEVIEW_H__7C394983_B4AC_473B_8EF0_5E64F4C37F07__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CMySeeView : public CView
{
protected: // create from serialization only
CMySeeView();
DECLARE_DYNCREATE(CMySeeView)
// Attributes
public:
CMySeeDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMySeeView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
CPoint find_min_energy(int no, CPoint point, double avg_distance);
CPoint find_min_energy1(int no, CPoint point, double avg_distance);
double find_continuity(int no, CPoint point, double avg_distance);
double find_curvature(int no, CPoint point);
double find_distance(int no, CPoint point);
double find_ext_energy(int no,CPoint point);
// CPoint Snake_points[2000];/* Snake Points */
// int Gray[2000];/*Original gray level of every snake points*/
// bool termination_point;
// bool neighbor3by3; /* true means 3x3 neighborhood, false means 5x5 neighborhood */
// int grad_mag[588][908]; /* Magnitude of Gradient */
// int m_Cols; /* Number of Columns */
// int m_Rows; /* Number of Rows */
// int no_of_snake_points;
// double *alpha,*beta, *gamma; /* Weights for energies */
// double threshold_curvature;
// int threshold_movement;
int BoundaryLength;
int **BoundaryPoint;
void Yuantubianjiegenzong(BYTE* image,BYTE *image_out,int xsize, int ysize,int BoundaryLength,int **BoundaryPoint_para);
void SourceCopy(BYTE *image_in, BYTE *image_out, int xsize, int ysize);
void ViewTest(BYTE* image_in,int xsize);
void Reverseycoordinate(BYTE* image_in,BYTE* image_out,int xsize,int ysize);
void Rotation(BYTE *image_in, BYTE *image_out, int xsize, int ysize) ;
// virtual void OnPaint();
virtual ~CMySeeView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CMySeeView)
afx_msg void OnPaint();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnSnake();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
CPoint m_ptOrigin;
BOOL m_bDraw;
};
#ifndef _DEBUG // debug version in MySeeView.cpp
inline CMySeeDoc* CMySeeView::GetDocument()
{ return (CMySeeDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MYSEEVIEW_H__7C394983_B4AC_473B_8EF0_5E64F4C37F07__INCLUDED_)