You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
//<2F>ļ<EFBFBD> TraceContour.h
|
|
|
|
|
|
//<2F><>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>:
|
|
|
|
|
|
//
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д: 2005-12-07
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
#include "ImageTraceBase.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace NImage
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
//ͼ<><CDBC><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD>ʸ<EFBFBD><CAB8><EFBFBD><EFBFBD>
|
|
|
|
|
|
class AFX_EXT_CLASS CTraceContour : public CImageTraceBase
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
CTraceContour(void);
|
|
|
|
|
|
virtual ~CTraceContour(void);
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
int ExtremumTrace(POINT point);
|
|
|
|
|
|
|
|
|
|
|
|
void SetWidthError(double dwe);
|
|
|
|
|
|
double GetWidthError(void);
|
|
|
|
|
|
void SetWidthScale(double dws);
|
|
|
|
|
|
double GetWidthScale(void);
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
COLORREF m_curColor;
|
|
|
|
|
|
double m_errWidthError;
|
|
|
|
|
|
double m_errWidthScale;
|
|
|
|
|
|
double cw;
|
|
|
|
|
|
int MaxPD;
|
|
|
|
|
|
int RepeatNum;
|
|
|
|
|
|
|
|
|
|
|
|
double MinAngle(POINT &point);
|
|
|
|
|
|
int GetRange(POINT point,double angle,POINT &begin,POINT &end);
|
|
|
|
|
|
int TraceCurve(POINT point,double angle,int HeadOrTail);
|
|
|
|
|
|
int GetNextPoint(POINT &point,int &r,int state=1);
|
|
|
|
|
|
int IsInCurve(POINT& t);
|
|
|
|
|
|
POINT Direction(POINT &point,int r);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
};
|