Reimplemented from OglGui::View. Definition at line 100 of file VideoPlayerView.h. References Impala::Application::SDash::RoiInfo::frameNr, OglGui::WindowView2D::GetOglView(), Impala::Application::SDash::RoiLoader::Load(), mFrameNr, mRegionsOfInterest, mRoiLoader, mRoiNr, mSubjectWindow, mVideoId, OglGui::View::mView2D, Impala::Application::SDash::RoiInfo::roiNr, OglGui::WindowView2D::SetImage(), and Impala::Application::SDash::RoiInfo::videoId. 00101 { 00102 // Give possible already existing mouse behavior a chance 00103 // Example only. Not really necessary in our case 00104 //OglGui::View::OnMouse(msg,btn,state,x,y); 00105 00106 if (mRegionsOfInterest.empty()) 00107 return; 00108 00109 // Normalize x,y since this example uses normalized rect coordinates 00110 float normX = x / mView2D->w; 00111 float normY = y / mView2D->h; 00112 00113 int nrOfRegions = mRegionsOfInterest.size(); 00114 for (int i = 0; i < nrOfRegions; i++) 00115 { 00116 const RegionsOfInterestInfo::ScaledRegion& region = mRegionsOfInterest[i]; 00117 if (normX >= region.left && normX <= region.left + region.width 00118 && normY >= region.top && normY <= region.top + region.height) 00119 { 00120 mRoiNr = i; 00121 00122 OGLIMAGE* regionImage = mRoiLoader->Load(mVideoId, mFrameNr, mRoiNr); 00123 mSubjectWindow->SetImage(regionImage); 00124 // RvB: OGLIMAGES are refCounted. After mRoiLoader->Load refCount == 1. 00125 // After mSubjectWindow->SetImage(regionImage); refCount == 2 00126 // Since the SubjectWindow now has a hold on the image we now must release it 00127 oglSys.ReleaseOglImage(regionImage); 00128 00129 // provide the subject image with roi info 00130 RoiInfo* roiInfo = new RoiInfo(); 00131 roiInfo->videoId = mVideoId; 00132 roiInfo->frameNr = mFrameNr; 00133 roiInfo->roiNr = mRoiNr; 00134 mSubjectWindow->GetOglView()->UserData1 = roiInfo; 00135 00136 return; 00137 } 00138 } 00139 00140 // no roi clicked; clear the subject window? 00141 }
Here is the call graph for this function:
|