资源简介
图像配准,一个参考代码,希望对大家有所帮助
代码片段和文件信息
// ImageInfoDlg.cpp : implementation file
//
#include “stdafx.h“
#include “PicMatch.h“
#include “ImageInfoDlg.h“
// CImageInfoDlg dialog
IMPLEMENT_DYNAMIC(CImageInfoDlg CDialog)
CImageInfoDlg::CImageInfoDlg(CWnd* pParent /*=NULL*/)
: CDialog(CImageInfoDlg::IDD pParent)
Totalband(0)
Gray(0)
dlgType(0)
{
}
CImageInfoDlg::~CImageInfoDlg()
{
}
void CImageInfoDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX IDC_COMBO1 m_Combo_Gray);
DDX_Control(pDX IDC_COMBO2 m_Combo_Red);
DDX_Control(pDX IDC_COMBO3 m_Combo_Green);
DDX_Control(pDX IDC_COMBO4 m_Combo_Blue);
DDX_Text(pDX IDC_EDIT1 Totalband);
}
BEGIN_MESSAGE_MAP(CImageInfoDlg CDialog)
ON_CBN_SELCHANGE(IDC_COMBO1 &CImageInfoDlg::OnCbnSelchangeCombo1)
ON_CBN_SELCHANGE(IDC_COMBO2 &CImageInfoDlg::OnCbnSelchangeCombo2)
ON_CBN_SELCHANGE(IDC_COMBO3 &CImageInfoDlg::OnCbnSelchangeCombo3)
ON_CBN_SELCHANGE(IDC_COMBO4 &CImageInfoDlg::OnCbnSelchangeCombo4)
ON_BN_CLICKED(IDC_RADIO1 &CImageInfoDlg::OnBnClickedRadio1)
ON_BN_CLICKED(IDC_RADIO2 &CImageInfoDlg::OnBnClickedRadio2)
END_MESSAGE_MAP()
// CImageInfoDlg message handlers
BOOL CImageInfoDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
if (dlgType==1)
SetWindowText(_T(“左片影像波段设置“));
else
SetWindowText(_T(“右片影像波段设置“));
for (int iCount=0;iCount {
CString str;
str.Format(_T(“ %d“)iCount+1);
m_Combo_Red.AddString(str);
m_Combo_Green.AddString(str);
m_Combo_Blue.AddString(str);
m_Combo_Gray.AddString(str);
}
//设置Edit属性
GetDlgItem(IDC_EDIT1)->EnableWindow(FALSE);
//选择 灰度模式
((CButton*)GetDlgItem(IDC_RADIO1))->SetCheck(TRUE);
m_Combo_Red.ShowWindow(SW_HIDE);
m_Combo_Green.ShowWindow(SW_HIDE);
m_Combo_Blue.ShowWindow(SW_HIDE);
m_Combo_Gray.SetCurSel(0);
Gray=0;
nstyle=1; //灰度方式
if (Totalband<3) //只有一个波段显示灰度图
GetDlgItem(IDC_RADIO2)->EnableWindow(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CImageInfoDlg::OnCbnSelchangeCombo1()
{
// TODO: Add your control notification handler code here
Gray=m_Combo_Gray.GetCurSel();
}
void CImageInfoDlg::OnCbnSelchangeCombo2()
{
// TODO: Add your control notification handler code here
Red=m_Combo_Gray.GetCurSel();
}
void CImageInfoDlg::OnCbnSelchangeCombo3()
{
// TODO: Add your control notification handler code here
Green=m_Combo_Gray.GetCurSel();
}
void CImageInfoDlg::OnCbnSelchangeCombo4()
{
// TODO: Add your control notification handler code here
Blue=m_Combo_Gray.GetCurSel();
}
void CImageInfoDlg::OnBnClickedRadio1()
{
// TODO: Add your control notification handler code here
m_Combo_Red.ShowWindow(SW_HIDE);
m_Combo_Green.ShowWindow(SW_HIDE);
m_Combo_Blue.ShowWindow(SW_HIDE);
m_Combo_Gray.ShowWindow(SW_SHOW);
m_Combo_G
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3468 2010-05-12 18:43 PicMatch\ImageInfoDlg.cpp
文件 1018 2010-05-12 18:43 PicMatch\ImageInfoDlg.h
文件 2160 2007-04-10 08:14 PicMatch\include\cpl_config.h
文件 10621 2007-04-10 08:14 PicMatch\include\cpl_conv.h
文件 2703 2007-04-10 08:14 PicMatch\include\cpl_csv.h
文件 3910 2007-04-10 08:14 PicMatch\include\cpl_error.h
文件 2815 2007-04-10 08:14 PicMatch\include\cpl_list.h
文件 6637 2007-04-10 08:14 PicMatch\include\cpl_minixm
文件 4291 2007-04-10 08:14 PicMatch\include\cpl_multiproc.h
文件 9023 2007-04-10 08:14 PicMatch\include\cpl_odbc.h
文件 15483 2007-04-10 08:14 PicMatch\include\cpl_port.h
文件 7017 2007-04-10 08:14 PicMatch\include\cpl_string.h
文件 8928 2007-04-10 08:14 PicMatch\include\cpl_vsi.h
文件 4390 2007-04-10 08:14 PicMatch\include\cpl_vsi_private.h
文件 2973 2007-04-10 08:14 PicMatch\include\cpl_win32ce_api.h
文件 1821 2007-04-10 08:14 PicMatch\include\cpl_wince.h
文件 29698 2007-04-10 08:16 PicMatch\include\gdal.h
文件 4620 2007-04-10 08:16 PicMatch\include\gdaljp2me
文件 14679 2007-04-10 08:16 PicMatch\include\gdalwarper.h
文件 11099 2007-04-10 08:16 PicMatch\include\gdal_alg.h
文件 4553 2007-04-10 08:16 PicMatch\include\gdal_frmts.h
文件 10574 2007-04-10 08:16 PicMatch\include\gdal_pam.h
文件 24555 2007-04-10 08:16 PicMatch\include\gdal_priv.h
文件 4945 2007-04-10 08:16 PicMatch\include\gdal_rat.h
文件 701 2007-04-10 08:16 PicMatch\include\gdal_version.h
文件 2886 2007-04-10 08:16 PicMatch\include\gvgcpfit.h
文件 11879 2007-04-10 08:15 PicMatch\include\ogrsf_frmts.h
文件 16321 2007-04-10 08:15 PicMatch\include\ogr_api.h
文件 3682 2007-04-10 08:15 PicMatch\include\ogr_attrind.h
文件 8901 2007-04-10 08:15 PicMatch\include\ogr_core.h
............此处省略69个文件信息
- 上一篇:VC++MFC制作的画图工具
- 下一篇:求众数的两种方法
评论
共有 条评论