📄 tvidlg.cpp
字号:
// TVIDlg.cpp : implementation file
//
#include "stdafx.h"
#include "TVI.h"
#include "TVIDlg.h"
#include "MainFrm.h"
#include "TVIDoc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTVIDlg dialog
CTVIDlg::CTVIDlg(CWnd* pParent /*=NULL*/)
: CDialog(CTVIDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CTVIDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
m_redBand=1;
}
void CTVIDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CTVIDlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CTVIDlg, CDialog)
//{{AFX_MSG_MAP(CTVIDlg)
ON_BN_CLICKED(IDC_RED, OnRed)
ON_BN_CLICKED(IDC_GREEN, OnGreen)
ON_BN_CLICKED(IDC_BLUE, OnBlue)
ON_BN_CLICKED(IDC_NIR, OnNir)
ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
ON_BN_CLICKED(IDC_BUTTON3, OnButton3)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTVIDlg message handlers
void CTVIDlg::GetBand(int nBand)
{
m_nBand = nBand;
}
void CTVIDlg::OnRed()
{
// TODO: Add your control notification handler code here
m_redBand = 1;
}
void CTVIDlg::OnGreen()
{
m_redBand =2 ;
}
void CTVIDlg::OnBlue()
{
m_redBand=3 ;
}
void CTVIDlg::OnNir()
{
// TODO: Add your control notification handler code here
m_redBand =4;
}
void CTVIDlg::OnButton1()
{
// TODO: Add your control notification handler code here
// 根据所选的波段,显示影象
int nColor;
CMainFrame* pFrame = (CMainFrame*)AfxGetMainWnd();
CTVIDoc* pDoc = (CTVIDoc*)pFrame->GetActiveDocument(); // 在移植的时候需要修改
nColor = 1;
pDoc->m_envyImage.CreateDisplatImage(m_redBand,m_greenBand,m_blueBand,nColor);
pDoc->UpdateAllViews(FALSE);
}
void CTVIDlg::OnButton2()
{
// TODO: Add your control notification handler code here
int nColor;
CMainFrame* pFrame = (CMainFrame*)AfxGetMainWnd();
CTVIDoc* pDoc = (CTVIDoc*)pFrame->GetActiveDocument();
nColor = 1;
pDoc->m_envyImage.CreateDisplaTVIImage(1,2,3,nColor);
pDoc->UpdateAllViews(FALSE);
}
void CTVIDlg::OnButton3()
{
// TODO: Add your control notification handler code here
int nColor;
CMainFrame* pFrame = (CMainFrame*)AfxGetMainWnd();
CTVIDoc* pDoc = (CTVIDoc*)pFrame->GetActiveDocument();
nColor = 1;
pDoc->m_envyImage.CreateDisplaSharpenImage(1,2,3,nColor);
pDoc->UpdateAllViews(FALSE);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -