📄 windowfilterview.h
字号:
// windowFilterView.h : interface of the CWindowFilterView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_WINDOWFILTERVIEW_H__3FE63E22_94F3_4A35_88CF_283A15711322__INCLUDED_)
#define AFX_WINDOWFILTERVIEW_H__3FE63E22_94F3_4A35_88CF_283A15711322__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CWindowFilterView : public CFormView
{
protected: // create from serialization only
CWindowFilterView();
DECLARE_DYNCREATE(CWindowFilterView)
public:
//{{AFX_DATA(CWindowFilterView)
enum { IDD = IDD_WINDOWFILTER_FORM };
int m_WindowLength;
float m_WcLow;
float m_WcHigh;
float m_bety;
//}}AFX_DATA
// Attributes
public:
CWindowFilterDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CWindowFilterView)
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
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 OnPrint(CDC* pDC, CPrintInfo* pInfo);
virtual void OnDraw(CDC* pDC);
//}}AFX_VIRTUAL
// Implementation
public:
void CreateSample(float *real, float *imag, int n, float wc);
void CreateHd(float *real, float *imag, int n, float wc);
void CreateKaiser(float *real, float *imag, int n, float beta);
void CreateBlackman(float *real, float *imag, int n);
void CreateHamming(float *real, float *imag, int n);
void CreateHanning(float *real, float *imag, int n);
void CreateTriang(float *real, float *imag, int n);
void CreateRect(float *real, float *imag, int n);
float ino(float x);
float mymax(float *a, int n);
int ibitr(int j, int count);
//返回值为FFT的实际长度
int CreateFFT(float *Xreal, float *Ximag, float *xreal, float *ximag, int n);
void CreateIFFT(float *Xreal, float *Ximag, float *xreal, float *ximag, int &n);
void CreateArg(float *Xarg, float *Xreal, float *Ximag, int n);
void CreateAbs(float *Xabs, float *Xreal, float *Ximag, int n);
void Stem(int n, int length, float max,float *num);
//未完成,半成品。
void Plot(int n, int length, float max,float *num,float xmin, float xmax,
float ymin, float ymax);
// 这次用到了这个函数
void Plot(int n, int length, float max,float *num, float xmax,
float ymin, float ymax);
void Plot(int n, int length, float max,float *num,
float ymin, float ymax);
// 这次也用到了这个函数
void Plot(int n, int length, float max,float *num, float xmax);
void CleanPalette(int index);
public:
void modify(void);
bool m_bFirst;
// bool m_First;
bool m_bClean;
void CreateHFun(int index, int n);
void CreateWindowFun(int index, int length);
float *pWindowReal;
float *pWindowImag;
float *pHdReal;
float *pHdImag;
float *pReal;
float MaxReal; //实际响应序列绝对值的最大值
float *pImag;
float MaxImag; //实际响应序列绝对值的最大值
float XReal[256];
float MaxXReal; //频率响应绝对值最大值
float XImag[256];
float MaxXImag;
float XAbs[256];
float MaxXAbs;
float XArg[256];
float MaxXArg;
int m_iFilterType; //滤波器类型索引
int m_iWindowType; //窗函数类型索引
int m_FFTLength; //实际的FFT变换床度索引
virtual ~CWindowFilterView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CWindowFilterView)
afx_msg void OnSelchangeWindowtipe();
afx_msg void OnSelchangeFiltertype();
afx_msg void OnBtnDraw();
afx_msg void OnPaint();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in windowFilterView.cpp
inline CWindowFilterDoc* CWindowFilterView::GetDocument()
{ return (CWindowFilterDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_WINDOWFILTERVIEW_H__3FE63E22_94F3_4A35_88CF_283A15711322__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -