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

📄 fmwndlocalizer.bak.txt

📁 3D reconstruction, medical image processing from colons, using intel image processing for based clas
💻 TXT
📖 第 1 页 / 共 2 页
字号:
						// interpolated 3d coordinate							RxPoint3D<double> ptVol3D( i, (int)(m_pMPRAgent->GetCoronalIndex()), k );						DrawLungBoundary(ptVol3D, &transparentMemDC, lung);					}									if(pRightMask->GetMask( i, (int)(m_pMPRAgent->GetCoronalIndex()), nSlice )) {						// interpolated 3d coordinate							RxPoint3D<double> ptVol3D( i, (int)(m_pMPRAgent->GetCoronalIndex()), k );						DrawLungBoundary(ptVol3D, &transparentMemDC, right);					}					if(pLeftMask->GetMask( i, (int)(m_pMPRAgent->GetCoronalIndex()), nSlice )) {						// interpolated 3d coordinate							RxPoint3D<double> ptVol3D( i, (int)(m_pMPRAgent->GetCoronalIndex()), k );						DrawLungBoundary(ptVol3D, &transparentMemDC, left);					}				}			}			break;		}		}/*	else if( bCom ) {		lung = RGB(255, 0, 0);		pVolumeData = RxGetVolumeData(0);		pVolumeData->GetBigVolumeDmsn(&iVolX, &iVolY, &iSliceNum);		fRatioZ = pVolumeData->m_fRatioZ;		RxMaskVolume *pMask = pVolumeData->GetEditVolume();		RxMaskVolume *pRightMask = pVolumeData->GetRightEditVolume(); // boundary of right lung		RxMaskVolume *pLeftMask  = pVolumeData->GetLeftEditVolume();  // boundary of left lung		RxMaskVolume *pAirwayMask = pVolumeData->GetAirwayVolume();							switch (m_iViewMode) {		case IDF_MAIN_WND_3DLOCALA_C:					nSlice = ROUNDOFF(m_pMPRAgent->GetAxialIndex()/(float)fRatioZ);				for( j=0; j<iVolY; j++) { 					for( i=0; i<iVolX; i++) {								// Edit volume						if(pMask->GetMask(i, j, nSlice)) {							RxPoint3D<double> ptVol3D(i, j, m_pMPRAgent->GetAxialIndex()); 							DrawLungBoundary(ptVol3D, &transparentMemDC, lung);						}						if(pAirwayMask->GetMask(i, j, nSlice)) {							RxPoint3D<double> ptVol3D(i, j, m_pMPRAgent->GetAxialIndex()); 							DrawLungBoundary(ptVol3D, &transparentMemDC, airway);						}											// Edge detected in right lung						if(pRightMask->GetMask(i, j, nSlice)) {							RxPoint3D<double> ptVol3D(i, j, m_pMPRAgent->GetAxialIndex()); 							DrawLungBoundary(ptVol3D, &transparentMemDC, right);						}						// Edge detected in left lung						if(pLeftMask->GetMask(i, j, nSlice)) {							RxPoint3D<double> ptVol3D(i, j, m_pMPRAgent->GetAxialIndex()); 							DrawLungBoundary(ptVol3D, &transparentMemDC, left);						}					}				}				break;		case IDF_MAIN_WND_3DLOCALS_C:			// Sagittal			for( k=0; k<iSliceNum*fRatioZ; k++) {				nSlice = k/(float)fRatioZ;				for( j=0; j<iVolY; j++) { 					if(pMask->GetMask( (int)(m_pMPRAgent->GetSagittalIndex()), j, nSlice)) {						// interpolated 3d coordinate							RxPoint3D<double> ptVol3D( (int)(m_pMPRAgent->GetSagittalIndex()), j, k );						DrawLungBoundary(ptVol3D, &transparentMemDC, lung);					}									// Edge detected in right lung					if(pRightMask->GetMask((int)(m_pMPRAgent->GetSagittalIndex()), j, nSlice)) {						RxPoint3D<double> ptVol3D( (int)(m_pMPRAgent->GetSagittalIndex()), j, k );						DrawLungBoundary(ptVol3D, &transparentMemDC, right);					}					// Edge detected in left lung					if(pLeftMask->GetMask((int)(m_pMPRAgent->GetSagittalIndex()), j, nSlice)) {						RxPoint3D<double> ptVol3D( (int)(m_pMPRAgent->GetSagittalIndex()), j, k );						DrawLungBoundary(ptVol3D, &transparentMemDC, left);					}				}			}			break;		case IDF_MAIN_WND_3DLOCALC_C:				// Coronal			for( k=0; k<iSliceNum*fRatioZ; k++) {				nSlice = k/(float)fRatioZ;				for( i=0; i<iVolX; i++) { 					if(pMask->GetMask( i, (int)(m_pMPRAgent->GetCoronalIndex()), nSlice )) {						// interpolated 3d coordinate							RxPoint3D<double> ptVol3D( i, (int)(m_pMPRAgent->GetCoronalIndex()), k );						DrawLungBoundary(ptVol3D, &transparentMemDC, lung);					}									if(pRightMask->GetMask( i, (int)(m_pMPRAgent->GetCoronalIndex()), nSlice )) {						// interpolated 3d coordinate							RxPoint3D<double> ptVol3D( i, (int)(m_pMPRAgent->GetCoronalIndex()), k );						DrawLungBoundary(ptVol3D, &transparentMemDC, right);					}					if(pLeftMask->GetMask( i, (int)(m_pMPRAgent->GetCoronalIndex()), nSlice )) {						// interpolated 3d coordinate							RxPoint3D<double> ptVol3D( i, (int)(m_pMPRAgent->GetCoronalIndex()), k );						DrawLungBoundary(ptVol3D, &transparentMemDC, left);					}				}			}			break;		}/////////////////////				RxVolumeData* pFloatVolume;			int x, y, z, nIntVolZ;		lung = RGB(0, 0, 255);		pFloatVolume = RxGetVolumeData(1);			pFloatVolume->GetBigVolumeDmsn(&x, &y, &z);			nIntVolZ = pFloatVolume->GetInterpolatedSliceNum();		RxMatrix4D m_mxRegistration;		RxFMWndVR* pFMWndVR = RxGetFrameMain()->m_pFMWndVR[2];		RxTransform3DInfo *pTransform = pFMWndVR->m_pTransform;		m_mxRegistration.LoadIdentity();		m_mxRegistration.Translate(-g_FloatCenX, -g_FloatCenY, g_iFloatBinaryTransZ - g_FloatCenZ);		m_mxRegistration.Scale(pTransform->xscale, pTransform->yscale, g_lfFloatRatioZ*pTransform->zscale);		m_mxRegistration.Rotate(0, pTransform->xrot);		m_mxRegistration.Rotate(1, pTransform->yrot);		m_mxRegistration.Rotate(2, pTransform->zrot);		m_mxRegistration.Translate(g_RefCenX + pTransform->xmove, g_RefCenY + pTransform->ymove, 0.0);		m_mxRegistration.Scale(1.0, 1.0, 1.0/g_lfRefRatioZ);		m_mxRegistration.Translate(0.0, 0.0, -g_iRefBinaryTransZ + g_RefCenZ + pTransform->zmove);		m_mxRegistration = m_mxRegistration.Inverse();		pFloatVolume->GetBigVolumeDmsn(&iVolX, &iVolY, &iSliceNum);		fRatioZ = pFloatVolume->m_fRatioZ;		pMask = pFloatVolume->GetEditVolume();		pAirwayMask = pFloatVolume->GetAirwayVolume();		pRightMask = pFloatVolume->GetRightEditVolume();		pLeftMask = pFloatVolume->GetLeftEditVolume();		switch (m_iViewMode) {					case IDF_MAIN_WND_3DLOCALA_C:				for( j=0; j<iVolY; j++) { 					for( i=0; i<iVolX; i++) {						//nSlice = m_pMPRAgent->GetAxialIndex()/(float)fRatioZ;						nSlice = ROUNDOFF(m_pMPRAgent->GetAxialIndex()/(float)fRatioZ);												RxVect4D registPoint;						registPoint = m_mxRegistration * RxVect4D (i, j, nSlice, 1.0);												if(0 <= registPoint.m[0] && registPoint.m[0] < iVolX &&							0 <= registPoint.m[1] && registPoint.m[1] < iVolY &&							0 <= registPoint.m[2] && registPoint.m[2] < iSliceNum) {							if(pMask->GetMask(registPoint.m[0], registPoint.m[1], registPoint.m[2])) {								// interpolated 3d coordinate									RxPoint3D<double> ptVol3D(i, j, nSlice*fRatioZ );								DrawLungBoundary(ptVol3D, &transparentMemDC, lung);							}							if(pAirwayMask->GetMask(registPoint.m[0], registPoint.m[1], registPoint.m[2] )) {								RxPoint3D<double> ptVol3D(i, j, m_pMPRAgent->GetAxialIndex()); 								DrawLungBoundary(ptVol3D, &transparentMemDC, airway);							}												// Edge detected in right lung												if(pRightMask->GetMask(registPoint.m[0], registPoint.m[1], registPoint.m[2] )) {								RxPoint3D<double> ptVol3D(i, j, m_pMPRAgent->GetAxialIndex()); 								DrawLungBoundary(ptVol3D, &transparentMemDC, right);							}							// Edge detected in left lung							if(pLeftMask->GetMask(registPoint.m[0], registPoint.m[1], registPoint.m[2] )) {								RxPoint3D<double> ptVol3D(i, j, m_pMPRAgent->GetAxialIndex()); 								DrawLungBoundary(ptVol3D, &transparentMemDC, left);							}						}					}				}				break;			case IDF_MAIN_WND_3DLOCALS_C:				for( k=0; k<iSliceNum*fRatioZ; k++) {					for( j=0; j<iVolY; j++) { 												RxVect4D registPoint;						registPoint = m_mxRegistration * RxVect4D (m_pMPRAgent->GetSagittalIndex(), j, k/(float)fRatioZ, 1.0);												if(0 <= registPoint.m[0] && registPoint.m[0] < iVolX &&							0 <= registPoint.m[1] && registPoint.m[1] < iVolY &&							0 <= registPoint.m[2] && registPoint.m[2] < iSliceNum) {							if(pMask->GetMask(registPoint.m[0], registPoint.m[1], registPoint.m[2] )) {								// interpolated 3d coordinate									RxPoint3D<double> ptVol3D( m_pMPRAgent->GetSagittalIndex(), j, k );								DrawLungBoundary(ptVol3D, &transparentMemDC, lung);							}							if(pRightMask->GetMask(registPoint.m[0], registPoint.m[1], registPoint.m[2] )) {								// interpolated 3d coordinate									RxPoint3D<double> ptVol3D( m_pMPRAgent->GetSagittalIndex(), j, k );								DrawLungBoundary(ptVol3D, &transparentMemDC, right);							}							if(pLeftMask->GetMask(registPoint.m[0], registPoint.m[1], registPoint.m[2] )) {								// interpolated 3d coordinate									RxPoint3D<double> ptVol3D( m_pMPRAgent->GetSagittalIndex(), j, k );								DrawLungBoundary(ptVol3D, &transparentMemDC, left);							}						}					}				}				break;			case IDF_MAIN_WND_3DLOCALC_C:				for( k=0; k<iSliceNum*fRatioZ; k++) {					for( i=0; i<iVolX; i++) { 						RxVect4D registPoint;						registPoint = m_mxRegistration * RxVect4D (i, m_pMPRAgent->GetCoronalIndex(), k/(float)fRatioZ, 1.0);												if( 0 <= registPoint.m[0] && registPoint.m[0] < iVolX &&							0 <= registPoint.m[1] && registPoint.m[1] < iVolY &&							0 <= registPoint.m[2] && registPoint.m[2] < iSliceNum ) 						{							if(pMask->GetMask(registPoint.m[0], registPoint.m[1], registPoint.m[2] )) {								// interpolated 3d coordinate									RxPoint3D<double> ptVol3D( i, m_pMPRAgent->GetCoronalIndex(), k );								DrawLungBoundary(ptVol3D, &transparentMemDC, lung);							}							if(pRightMask->GetMask(registPoint.m[0], registPoint.m[1], registPoint.m[2] )) {								// interpolated 3d coordinate									RxPoint3D<double> ptVol3D( i, m_pMPRAgent->GetCoronalIndex(), k );								DrawLungBoundary(ptVol3D, &transparentMemDC, right);							}							if(pLeftMask->GetMask(registPoint.m[0], registPoint.m[1], registPoint.m[2] )) {								// interpolated 3d coordinate									RxPoint3D<double> ptVol3D( i, m_pMPRAgent->GetCoronalIndex(), k );								DrawLungBoundary(ptVol3D, &transparentMemDC, left);							}						}					}				}				break;		}	}	*/	///////////////////////////////////////////////////	// Apply Alpha Blending After Lung Segmentation	///////////////////////////////////////////////////	if( bRef || bFlt || bCom) {		// draw opaque lung regions		//dc.BitBlt(0, 0, m_szWindow.cx, m_szWindow.cy, &transparentMemDC, 0, 0, SRCCOPY);				// draw semi-transparent lung regions		BLENDFUNCTION over;		over.AlphaFormat = 1; 		over.BlendFlags = 0;		over.BlendOp = AC_SRC_OVER; 		over.SourceConstantAlpha = 255; // 0 ~ 255		BOOL bSuccess = AlphaBlend(dc, 0, 0, m_szWindow.cx, m_szWindow.cy, 			transparentMemDC, 0, 0, m_szWindow.cx, m_szWindow.cy, over);	}/*	else if( bCom ) {		// draw opaque lung regions		dc.BitBlt(0, 0, m_szWindow.cx, m_szWindow.cy, &transparentMemDC, 0, 0, SRCCOPY);	}*/	// DC 汗盔 	transparentMemDC.SelectObject(pOldBitmap);	transparentMemDC.DeleteDC();			//TRACE(_T("\n Onpaint : m_iHIndex = %d,  m_iVIndex = %d"), m_iHIndex, m_iVIndex);}

⌨️ 快捷键说明

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