本文整理汇总了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;
}