Definition at line 55 of file mainPlay.cpp. References Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CH(), Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CPB(), Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CW(), mRoiHeight, mRoiWidth, mVideoNav, mViewScale, mVp, mZoomedIm, mZoomFac, and Impala::Visualization::VideoNav::SetRect(). Referenced by HandleNewFrame(), and OnViewMouse(). 00056 { 00057 View* srcView = mVideoNav->GetView(0); 00058 if (!srcView) 00059 return; 00060 if ((mZoomedIm == 0) || (srcView->GetPointerX() < 0)) 00061 return; 00062 Array2dVec3UInt8* dispIm = srcView->GetDispImage(); 00063 if (!dispIm) 00064 return; 00065 00066 unsigned char* dataPtr = dispIm->CPB(0, 0); 00067 int srcSX = srcView->GetPointerX() - mRoiWidth/2; 00068 if (srcSX < 0) 00069 srcSX = 0; 00070 if (srcSX > dispIm->CW()-1-mRoiWidth) 00071 srcSX = dispIm->CW()-1-mRoiWidth; 00072 int srcSY = srcView->GetPointerY() - mRoiHeight/2; 00073 if (srcSY < 0) 00074 srcSY = 0; 00075 if (srcSY > dispIm->CH()-1-mRoiHeight) 00076 srcSY = dispIm->CH()-1-mRoiHeight; 00077 for (int y=0 ; y<mRoiHeight ; y++) 00078 { 00079 unsigned char* src = dispIm->CPB(srcSX, srcSY + y); 00080 for (int x=0 ; x<mRoiWidth ; x++) 00081 { 00082 for (int zY=0 ; zY<mZoomFac ; zY++) 00083 { 00084 unsigned char* dst = mZoomedIm->CPB(x*mZoomFac, 00085 y*mZoomFac + zY); 00086 for (int zX=0 ; zX<mZoomFac ; zX++) 00087 { 00088 for (int i=0 ; i<3 ; i++) { 00089 *dst++ = src[i]; 00090 } 00091 } 00092 } 00093 src += 3; 00094 } 00095 } 00096 mVp->UpdateView(0, mZoomedIm, "Direct", mViewScale, 0); 00097 mVideoNav->SetRect(Core::Geometry::Rectangle(srcSX, srcSY, 00098 srcSX + mRoiWidth, 00099 srcSY + mRoiHeight)); 00100 }
Here is the call graph for this function:
|