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

📄 framebottom.cpp

📁 3D reconstruction, medical image processing from colons, using intel image processing for based clas
💻 CPP
📖 第 1 页 / 共 2 页
字号:
					if(iNewIndex > -1)						UpdateWindowingByPreset(iNewIndex);				}			}			break;	}	}void RxFrameBottom::OnPresetWindowingCBDropDown(){	CString		strPathPreset = _T("");	RxRegistry	reg;	reg.QueryValueSZ(_T("Data Directory"), &strPathPreset);	strPathPreset += _T("Preset");	// Check directory from registry	CString strTemp = strPathPreset;	if(strTemp.GetAt(strTemp.GetLength()-1) != '\\')		strTemp += _T("\\");	strTemp += _T(".");		CFileStatus status;	if (!CFile::GetStatus(strPathPreset, status))		::CreateDirectory((LPCTSTR)strPathPreset, NULL);	strPathPreset = strPathPreset + _T("\\");	int			iModality	= 0;	CString		strFileName;	if(iModality == 0)		strFileName = _T("WindowingMR.dat");	else if(iModality == 1)		strFileName = _T("WindowingCT.dat");	strFileName = strPathPreset + strFileName;	m_pPresetWindowing->ReadPresetWindowingFile(iModality, strFileName);	// combo box initialize	InitWindowingComboBox();}void RxFrameBottom::OnPresetWindowingCBChanged(){	int		iCurSel = m_pCBPresetWindowing->GetCurSel();	if(iCurSel == m_pCBPresetWindowing->GetCount() - 1)	{		m_pPresetWindowing->ShowPresetWindowDialog(m_pEdWindowingLevel->GetEdit(), m_pEdWindowingWidth->GetEdit());		InitWindowingComboBox();	}	else		UpdateWindowingByPreset(iCurSel);}void RxFrameBottom::OnRadioSeries(UINT nID){	int	nIndex = nID - IDF_BOTTOM_BTN_REFERENCE;	if(m_nRadioSeries == nIndex)		return;	SetRadioSeries(nIndex);	NMFB_SERIES_BUTTON	nmfbse;	nmfbse.hdr.hwndFrom	= m_hWnd;	nmfbse.hdr.idFrom	= GetDlgCtrlID();	nmfbse.hdr.code		= FBSB_CHANGED;	nmfbse.nCurSeries	= m_nRadioSeries;	CWnd* pOwner = GetOwner();	if (pOwner)		pOwner->SendMessage(WM_NOTIFY, nmfbse.hdr.idFrom, (LPARAM)&nmfbse);}void RxFrameBottom::OnBtnTuning(){	RxMainFrame		*pMainFrame = (RxMainFrame *)GetParentFrame();	pMainFrame->SetStatusTP(-1);}#include "FusionGlobal.h"#include "FMWndVR.h"void RxFrameBottom::OnBtnOptions(){	RxFMWndVR		*pWndVR = RxGetFrameMain()->m_pFMWndVR[2];	RxDlgOptions	dlg;	dlg.SetRegistStruct(pWndVR->m_maxIter, (float)pWndVR->m_varFloat, (float)pWndVR->m_covarRefer,							(float)pWndVR->m_covarFloat, (float)pWndVR->m_etaTrans, (float)pWndVR->m_etaRot);	dlg.SetSamplingStruct(pWndVR->m_SampleMode, pWndVR->m_SampleNum, pWndVR->m_Threshold, (float)pWndVR->m_Tolerance);	dlg.SetMIAnalysisStruct(pWndVR->m_MIAnalysis, pWndVR->m_MIInterpolation);	if(dlg.DoModal() == IDOK)	{		DLG_REGIST		*stpRegist = dlg.GetRegistStruct();		pWndVR->m_maxIter		= stpRegist->nIterate;		pWndVR->m_varFloat		= stpRegist->fVarF;		pWndVR->m_covarRefer	= stpRegist->fCoVarR;		pWndVR->m_covarFloat	= stpRegist->fCoVarF;		pWndVR->m_etaTrans		= stpRegist->fLearnTrans;		pWndVR->m_etaRot		= stpRegist->fLearnRot;		DLG_SAMPLING	*stpSampling = dlg.GetSamplingStruct();		pWndVR->m_SampleMode	= stpSampling->nMode;		pWndVR->m_SampleNum		= stpSampling->nCount;		pWndVR->m_Threshold		= stpSampling->nThreshold;		pWndVR->m_Tolerance		= stpSampling->fTolerance;		DLG_MI_ANALYSIS	*stpMIAnalysis = dlg.GetMIAnalysisStruct();		pWndVR->m_MIAnalysis	= stpMIAnalysis->nRadio1;		pWndVR->m_MIInterpolation = stpMIAnalysis->nRadio2;	}}void RxFrameBottom::OnBtnHelp(){	RxMainFrame		*pMainFrame = (RxMainFrame *)GetParentFrame();	pMainFrame->SetStatusHelp(-1);}/////////////////////////////////////////////////////////////////////////////void RxFrameBottom::InitWindowingComboBox(){	m_pCBPresetWindowing->ResetContent();	int		iCount = m_pPresetWindowing->GetPresetWindowingCount();	_PRESET_WINDOWING_PTR	stpPresetWindowing;	for(int i = 0; i < iCount; i++)	{		stpPresetWindowing = m_pPresetWindowing->GetPresetWindowing(i);		m_pCBPresetWindowing->AddString(stpPresetWindowing->strTitle);	}	m_pCBPresetWindowing->AddString(_T("User Define"));}void RxFrameBottom::UpdateWindowingByPreset(int iIndex, BOOL bWithComboBox){	_PRESET_WINDOWING_PTR	stpPresetWindowing;	stpPresetWindowing = m_pPresetWindowing->GetPresetWindowing(iIndex);	if(stpPresetWindowing != NULL)	{		int		iLevel = stpPresetWindowing->iLevel;		int		iWidth = stpPresetWindowing->iWidth;		if(m_pPresetWindowing->GetModality() == 1)			iLevel += 1024;		// edit box update		m_pEdWindowingLevel->SetEdit(iLevel);		m_pEdWindowingWidth->SetEdit(iWidth);		// combobox update		if(bWithComboBox)			m_pCBPresetWindowing->SetCurSel(iIndex);		UpdateWindowing(FALSE);	}}void RxFrameBottom::UpdateWindowing(BOOL bUpdateEdit){	int		nSeries = m_nRadioSeries;	if(nSeries == RXSERIES_COM)		return;	int		nLevel, nWidth;	if(bUpdateEdit)	{		RxGetFrameTuning()->GetWindowing(nSeries, nLevel, nWidth);		m_pEdWindowingLevel->SetEdit(nLevel);		m_pEdWindowingWidth->SetEdit(nWidth);	}	else	{		nLevel = m_pEdWindowingLevel->GetEdit();		nWidth = m_pEdWindowingWidth->GetEdit();		RxGetFrameTuning()->SetWindowing(nSeries, nLevel, nWidth);		if(RxGetCurMainMenu() == IDF_TOP_3DFUSION)		{			if(RxGetFrameMain()->Frame3DF_MPR_IsOn())				;			else			{				RxGetFrameMain()->m_pLocalizerManager[nSeries]->RedrawAll();			}		}	}}void RxFrameBottom::EnableWindowing(int nSeries, BOOL bEnable){	if(nSeries < 0)		nSeries = m_nRadioSeries;	if(nSeries == RXSERIES_REF || nSeries == RXSERIES_FLT)		RxGetFrameTuning()->SetWindowingVisible(nSeries, bEnable);	m_pEdWindowingLevel->EnableWindow(bEnable);	m_pEdWindowingWidth->EnableWindow(bEnable);	m_pSBCWindowingLevel->EnableWindow(bEnable);	m_pSBCWindowingWidth->EnableWindow(bEnable);	m_pCBPresetWindowing->EnableWindow(bEnable);}void RxFrameBottom::SetWindowing(int nSeries, int nLevel, int nWidth){	if(nSeries < 0)		nSeries = m_nRadioSeries;	if(nSeries != RXSERIES_REF && nSeries != RXSERIES_FLT)		return;	m_pEdWindowingLevel->SetEdit(nLevel);	m_pEdWindowingWidth->SetEdit(nWidth);	RxGetFrameTuning()->SetWindowing(nSeries, nLevel, nWidth);}void RxFrameBottom::SetWindowingLevel(int nSeries, int nLevel){	if(nSeries < 0)		nSeries = m_nRadioSeries;	if(nSeries != RXSERIES_REF && nSeries != RXSERIES_FLT)		return;	m_pEdWindowingLevel->SetEdit(nLevel);	RxGetFrameTuning()->SetWindowingLevel(nSeries, nLevel);}void RxFrameBottom::SetWindowingWidth(int nSeries, int nWidth){	if(nSeries < 0)		nSeries = m_nRadioSeries;	if(nSeries != RXSERIES_REF && nSeries != RXSERIES_FLT)		return;	m_pEdWindowingWidth->SetEdit(nWidth);	RxGetFrameTuning()->SetWindowingWidth(nSeries, nWidth);}void RxFrameBottom::GetWindowing(int nSeries, int &nLevel, int &nWidth){	if(nSeries < 0)		nSeries = m_nRadioSeries;	if(nSeries != RXSERIES_REF && nSeries != RXSERIES_FLT)		return;	RxGetFrameTuning()->GetWindowing(nSeries, nLevel, nWidth);}BYTE* RxFrameBottom::GetWindowingTable(int nSeries){	if(nSeries < 0)		nSeries = m_nRadioSeries;	if(nSeries != RXSERIES_REF && nSeries != RXSERIES_FLT)		return NULL;	return RxGetFrameTuning()->GetWindowingTable(nSeries);}/////////////////////////////////////////////////////////////////////////////void RxFrameBottom::SetZoomFactor(int nFactor){	m_pEdZoom->SetEdit(nFactor);}int  RxFrameBottom::GetZoomFactor(){	return m_pEdZoom->GetEdit();}/////////////////////////////////////////////////////////////////////////////void RxFrameBottom::SetRadioSeries(int nIndex){	if(m_nRadioSeries == nIndex)		return;	if(m_nRadioSeries == 0)		m_pBtnReference->SetCheck(0);	else if(m_nRadioSeries == 1)		m_pBtnFloat->SetCheck(0);	else if(m_nRadioSeries == 2)		m_pBtnCombine->SetCheck(0);	m_nRadioSeries = nIndex;	switch(nIndex)	{		case	0 :			m_pBtnReference->SetCheck(1);			m_pBtnFineTuning->ShowWindow(SW_SHOW);			m_pBtnOptions->ShowWindow(SW_HIDE);			break;		case	1 :			m_pBtnFloat->SetCheck(1);			m_pBtnFineTuning->ShowWindow(SW_SHOW);			m_pBtnOptions->ShowWindow(SW_HIDE);			break;		case	2 :			m_pBtnCombine->SetCheck(1);			m_pBtnFineTuning->ShowWindow(SW_HIDE);			m_pBtnOptions->ShowWindow(SW_SHOW);			break;		default :			m_nRadioSeries = -1;			break;	}}int  RxFrameBottom::GetRadioSeries(){	return m_nRadioSeries;}void RxFrameBottom::SetCheckTuning(BOOL bCheck){	m_pBtnFineTuning->SetCheck(bCheck);}void RxFrameBottom::SetCheckHelp(BOOL bCheck){	m_pBtnHelp->SetCheck(bCheck);}void RxFrameBottom::ShowOption(BOOL bShow){	m_pBtnOptions->ShowWindow(bShow ? SW_SHOW : SW_HIDE);}

⌨️ 快捷键说明

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