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

📄 options.cpp

📁 A tutorial and open source code for finding edges and corners based on the filters used in primary v
💻 CPP
字号:
// Options.cpp : implementation file
//

#include "stdafx.h"
#include "ImageFeatures.h"
#include "Options.h"

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

/////////////////////////////////////////////////////////////////////////////
// COptions dialog


COptions::COptions(CWnd* pParent /*=NULL*/)
	: CDialog(COptions::IDD, pParent)
{
	//{{AFX_DATA_INIT(COptions)
	m_testImageContrast = 0;
	m_filterDiam = 0;
	m_displayTestImages = FALSE;
	m_testImageNoise = 0.0f;
	m_overlap = 0.0f;
	m_fixedDirection = FALSE;
	m_threshold = 0.0f;
	//}}AFX_DATA_INIT
}


void COptions::TransferData(CProcessFeatures* pProcess, bool in)
{
	if (in)
	{
		m_testImageContrast = pProcess->m_testImageContrast;
		m_filterDiam = pProcess->m_filterDiam;		;
		m_displayTestImages = pProcess->m_displayTestImages;
		m_testImageNoise = pProcess->m_testImageNoise;
		m_overlap = pProcess->m_overlap;
		m_fixedDirection = pProcess->m_fixedDirection;
		m_threshold = pProcess->m_threshold;
	}
	else
	{
		pProcess->m_testImageContrast = m_testImageContrast;
		pProcess->m_filterDiam = m_filterDiam;		;
		pProcess->m_displayTestImages = (bool) m_displayTestImages;
		pProcess->m_testImageNoise = m_testImageNoise;
		pProcess->m_overlap = m_overlap;
		pProcess->m_fixedDirection = (bool) m_fixedDirection;
		pProcess->m_threshold = m_threshold;
//		pProcess->m_subSampleDiam = 200;
	}
}

void COptions::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(COptions)
	DDX_Text(pDX, IDC_CONTRAST, m_testImageContrast);
	DDV_MinMaxInt(pDX, m_testImageContrast, 0, 256);
	DDX_Text(pDX, IDC_DIAM, m_filterDiam);
	DDV_MinMaxInt(pDX, m_filterDiam, 2, 128);
	DDX_Check(pDX, IDC_DISPLAY, m_displayTestImages);
	DDX_Text(pDX, IDC_NOISE, m_testImageNoise);
	DDV_MinMaxFloat(pDX, m_testImageNoise, 0.f, 256.f);
	DDX_Text(pDX, IDC_OVERLAP, m_overlap);
	DDV_MinMaxFloat(pDX, m_overlap, 0.5f, 5.f);
	DDX_Check(pDX, IDC_STEREO, m_fixedDirection);
	DDX_Text(pDX, IDC_THRESHOLD, m_threshold);
	DDV_MinMaxFloat(pDX, m_threshold, 0.f, 2.f);
	//}}AFX_DATA_MAP
}


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

/////////////////////////////////////////////////////////////////////////////
// COptions message handlers

⌨️ 快捷键说明

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