当前位置: 首页>>代码示例>>C++>>正文


C++ Projection::GetNumProj方法代码示例

本文整理汇总了C++中Projection::GetNumProj方法的典型用法代码示例。如果您正苦于以下问题:C++ Projection::GetNumProj方法的具体用法?C++ Projection::GetNumProj怎么用?C++ Projection::GetNumProj使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Projection的用法示例。


在下文中一共展示了Projection::GetNumProj方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: OpenProjData

BOOL MainWindow::OpenProjData()
{
	RootDicomObj *DCMinfo = NULL;
	char filename[MAX_PATH];
	char projFolder[MAX_PATH];

	BROWSEINFO bi = {0};
	PIDLIST_ABSOLUTE pidl;

	WCHAR szDisplayName[MAX_PATH];
	WCHAR szTitle[] = L"Select a folder containing projection data.";

	HANDLE hFindFile;
	WCHAR szFileName[MAX_PATH];
	WIN32_FIND_DATA findData = {0};

	if(m_Recon && !m_ReconSaved)
		if(MessageBox(m_hwnd,
			L"Reconstruction has not been saved. Do you wish to continue?",
			L"WinCone CT",
			MB_ICONWARNING | MB_YESNO) == IDNO)
			return FALSE;

	bi.hwndOwner = m_hwnd;
	bi.pidlRoot = NULL;
	bi.pszDisplayName = szDisplayName;
	bi.lpszTitle = szTitle;
	bi.ulFlags = BIF_NEWDIALOGSTYLE | BIF_NONEWFOLDERBUTTON | BIF_RETURNONLYFSDIRS;
	bi.lpfn = NULL;

	if(!(pidl = SHBrowseForFolder(&bi)))
		return FALSE;

	SHGetPathFromIDList(pidl, szDisplayName);

	// do _findfirst() stuff with current directory
	StringCchPrintf(szFileName,MAX_PATH,L"%s\\%s",szDisplayName,L"1.3.6.1.4.1*");
	hFindFile = FindFirstFile(szFileName,&findData);

	if(hFindFile == INVALID_HANDLE_VALUE)
	{
		MessageBox(m_hwnd,
			L"The selected folder does not contain valid DICOM projection data.",
			L"Load Projection Data",
			MB_OK);
		return FALSE;
	}

	FindClose(hFindFile);

	sprintf_s(filename,sizeof(filename),"%S\\%S",szDisplayName,findData.cFileName);
	DCMinfo = new RootDicomObj(filename,true);
	// confirm that DICOM files are legit here

	if(m_Recon)
	{
		delete m_Recon;
		m_Recon = NULL;
	}
	if(m_Proj)
	{
		delete m_Proj;
		m_Proj = NULL;
	}

	// Update the current folder field
	SendMessage(m_hCurrentFolder,WM_SETTEXT,NULL,(LPARAM)szDisplayName);

	// Enable the reconstruction controls

	delete DCMinfo;

	WideCharToMultiByte(1251,WC_NO_BEST_FIT_CHARS,szDisplayName,MAX_PATH,projFolder,sizeof(projFolder),0,NULL);
	m_Proj = new Projection(projFolder);
	SendMessage(m_hProgress,PBM_SETRANGE,MAKEWPARAM(0,0),MAKELPARAM(0,m_Proj->GetNumProj()));

	return TRUE;
}
开发者ID:JStrydhorst,项目名称:win-cone-ct,代码行数:78,代码来源:win_cone_ct.cpp


注:本文中的Projection::GetNumProj方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。