Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

void Impala::Application::MediaTable::TableWindow::SetZoomView ( int  row  )  [inline]

Definition at line 635 of file TableWindow.h.

References Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CH(), Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CW(), Impala::Application::MediaTable::TableDataView::GetSortedQuid(), Impala::Application::MediaTable::TableDataView::GetSortedVideoData(), Impala::Application::MediaTable::TableDataViewController::GetTableDataView(), Impala::Application::MediaTable::TableViewCache::GetViewFromCache(), ILOG_DEBUG, mImageColumn, mShowZoomView, mZoomImage, mZoomView, mZoomViewCache, mZoomViewRow, mZoomViewVideoEnabled, and Impala::Visualization::RgbOglImage::OglImage().

Referenced by UpdateZoomView().

00636     {
00637         if (!mZoomViewCache || !mShowZoomView || mZoomViewRow == row)
00638             return;
00639 
00640         mZoomViewRow = row;
00641         // mode 1: show video, if available
00642         Array2dVec3UInt8 *frame = GetTableDataView()->GetSortedVideoData("", row);
00643         if (frame)
00644         {
00645             ILOG_DEBUG("SetZoomView: showing video preview for row " << row);
00646             mZoomViewVideoEnabled = true;
00647             if (!mZoomImage)
00648                 mZoomImage = Visualization::RgbOglImage::OglImage(frame);
00649             else
00650             {
00651                 if (mZoomImage->imageHandle)
00652                     delete mZoomImage->imageHandle;
00653                 mZoomImage->imageHandle = frame;
00654                 mZoomImage->w = frame->CW();
00655                 mZoomImage->h = frame->CH();
00656             }
00657             viewSys.SetImage(mZoomView, mZoomImage);
00658             return;
00659         }
00660 
00661         // mode 2: use active image cache:
00662         mZoomViewVideoEnabled = false;
00663                 unsigned long long quid = GetTableDataView()->GetSortedQuid(mImageColumn, row);
00664         OGLVIEW* v = mZoomViewCache->GetViewFromCache(quid);
00665                 if (!v || v->UserData2 == (void*)2) { // image not currently in cache?
00666                         ILOG_DEBUG("Could not find view " << quid << " (row: " << row << ") in cache");
00667                         return;
00668                 }
00669         OGLIMAGE* im = v->im;
00670         viewSys.SetImage(mZoomView, im);
00671     }

Here is the call graph for this function:


Generated on Fri Mar 19 10:47:11 2010 for ImpalaSrc by  doxygen 1.5.1