示例#1
0
BOOL MainWindow::StartReconstruction()
{
	// read in variables from GUI
	WCHAR szText[8];
	INT nxy, nz;
	FLOAT res, cutoff;
	filter_type filter;

	SendMessage(m_hDimensions[0],WM_GETTEXT,64,(LPARAM)szText);
	nxy = _wtoi(szText);
	SendMessage(m_hDimensions[1],WM_GETTEXT,64,(LPARAM)szText);
	nz = _wtoi(szText);
	SendMessage(m_hDimensions[2],WM_GETTEXT,64,(LPARAM)szText);
	res = _wtof(szText);

	filter = (filter_type)SendMessage(m_hFilter,CB_GETCURSEL,NULL,NULL);
	cutoff = SendMessage(m_hCutoff,TBM_GETPOS,NULL,NULL)/10.0;

	m_Recon = new Reconstruction(nz, nxy, nxy, res, m_Proj);
	m_Recon->SetHWND(m_hwnd);
	m_Proj->CreateFilter(filter,cutoff);

	m_thrRecon = _beginthreadex(NULL, 0, Reconstruction::ReconThread, m_Recon, 0, NULL);
	if(!m_thrRecon)
		return FALSE;

	return TRUE;
}
示例#2
0
BOOL MainWindow::RemoveMetal()
{
	float threshold;
	WCHAR szThresh[16];					
	filter_type filter;
	FLOAT cutoff;

	filter = (filter_type)SendMessage(m_hFilter,CB_GETCURSEL,NULL,NULL);
	cutoff = SendMessage(m_hCutoff,TBM_GETPOS,NULL,NULL)/10.0;
	m_Proj->CreateFilter(filter,cutoff);

	SendMessage(m_hMetalThreshold, WM_GETTEXT, (WPARAM)16,(LPARAM)szThresh);
	threshold = _wtof(szThresh);

	m_Recon->SetMetalThreshold(threshold);

	m_thrRecon = _beginthreadex(NULL, 0, Reconstruction::RemoveMetalThread, m_Recon, 0, NULL);
	if(!m_thrRecon)
		return FALSE;

	return TRUE;

}