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

📄 waveeditdlg.cpp

📁 基于小波的SAR斑点处理
💻 CPP
字号:
// WaveEditDlg.cpp : implementation file
//

#include "stdafx.h"
#include "RSIP.h"
#include "WaveEditDlg.h"
#include "stdlib.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CWaveEditDlg dialog


CWaveEditDlg::CWaveEditDlg(int nTotalLayers, CWnd* pParent /*=NULL*/)
	: CDialog(CWaveEditDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CWaveEditDlg)
	m_strLayers = _T("");
	m_nTotalLayers = nTotalLayers;
	CString str;
	str.Format("该小波图像的变换次数为:%d", nTotalLayers);
	m_strTotalLayers = str;
	//}}AFX_DATA_INIT
}


void CWaveEditDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CWaveEditDlg)
	DDX_Text(pDX, IDC_LAYER, m_strLayers);
	DDX_Text(pDX, IDC_TOTAL_LAYERS, m_strTotalLayers);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CWaveEditDlg, CDialog)
	//{{AFX_MSG_MAP(CWaveEditDlg)
		// NOTE: the ClassWizard will add message map macros here
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CWaveEditDlg message handlers

//将需要的保留的层数数字从字符串中提取出来
void CWaveEditDlg::GetLayers(int* nLayers, int* nLayerNum)
{
	char* chTemp = new char[1];
	*nLayerNum = m_strLayers.GetLength()/2+1;
//	nLayers =new int[*nLayerNum];
	if(nLayers == NULL)
	{
		AfxMessageBox("分配存放层的空间出错!");
		return;
	}
	for(int i=0; i<(*nLayerNum); i++)
	{
		nLayers[i] = 0;
		*chTemp = m_strLayers.GetAt(i*2);

		nLayers[i] = atoi(chTemp);

	}
	
	if(chTemp!=NULL) delete chTemp;
	
}

⌨️ 快捷键说明

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