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

void Impala::Visualization::SimilarityTableSetRank::HandleUpdate ( bool  doUpdateAnno  )  [inline]

Definition at line 300 of file SimilarityTableSetRank.h.

References Impala::Visualization::ImagesWindow::AddImage(), Impala::Visualization::ImageSetIdxGrid::AddImageSetIdx(), Impala::Visualization::Plot::Points::AddPoint(), FindImSetId(), Impala::Core::Table::SimilarityTableSet::FindQuid(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get1(), Impala::Core::Table::SimilarityTableSet::GetSimTable(), ILOG_ERROR, ILOG_INFO, Impala::Core::Table::AnnotationTable::IsNegative(), Impala::Core::Table::AnnotationTable::IsPositive(), Impala::Core::Table::AnnotationTable::IsSkip(), mAnno, mCurConcept, mImagesSet, mImSetIdxGrid, Impala::Min(), mKeyframeSet, mLineData1, mLineData2, mLineSize1, mLineSize2, mNrToShow, mPlotLine1, mPlotPoints, mPoints, mSelectedRanking, mSimSet, mStartIm, SetCurrent(), Impala::Core::Table::Table::Size(), Impala::Timer::SplitTime(), Impala::Timer::SplitTimeStr(), UpdateAnno(), Impala::Visualization::ImageSetIdxGrid::UpdateLayout(), UpdateLinePlot(), UpdateLineSize(), UpdatePointPlot(), and UpdateRanking().

Referenced by HandleCorrection(), and HandleNewFile().

00301     {
00302 Timer timer(1);
00303 ILOG_INFO("============================= start");
00304 ILOG_INFO("1 : " << timer.SplitTime() << " = " << timer.SplitTimeStr());
00305         if (doUpdateAnno)
00306             UpdateAnno();
00307 ILOG_INFO("2 : " << timer.SplitTime() << " = " << timer.SplitTimeStr());
00308         UpdateRanking();
00309 ILOG_INFO("3 : " << timer.SplitTime() << " = " << timer.SplitTimeStr());
00310         int nrPlot = mSelectedRanking->Size();
00311         int nrIm = Min(nrPlot, mNrToShow);
00312         int nrOk = 0;
00313         UpdateLineSize(Min(nrPlot, 1000));
00314         SimTableType* simTable = mSimSet->GetSimTable(mCurConcept);
00315         for (int i=0 ; i<nrPlot ; i++)
00316         {
00317             Quid quid = mSelectedRanking->Get1(i);
00318             if (i>=mStartIm && i<mStartIm+mNrToShow)
00319             {
00320                 int imSetId = FindImSetId(quid);
00321                 if (imSetId == -1)
00322                 {
00323                     ILOG_ERROR("Unable to find keyframe for " << QuidObj(quid));
00324                 }
00325                 else
00326                 {
00327                     if (mImagesSet)
00328                         mImagesSet->AddImage(imSetId, mKeyframeSet);
00329                     if (mImSetIdxGrid)
00330                         mImSetIdxGrid->AddImageSetIdx(mKeyframeSet,imSetId);
00331                 }
00332             }
00333             if (mPlotLine1 && i < mLineSize2)
00334             {
00335                 int idx = mSimSet->FindQuid(quid);
00336                 if ((idx >= 0) && (idx < mSimSet->TableSize()))
00337                     mLineData2[i] = simTable->Get1(idx);
00338                 else
00339                     mLineData2[i] = 0;
00340                 if (i<mLineSize1)
00341                     mLineData1[i] = mLineData2[i];
00342             }
00343             if (mPlotPoints && mAnno)
00344             {
00345                 int x = i%200;
00346                 int y = -(i/200);
00347                 if (mSelectedRanking->IsPositive(i))
00348                 {
00349                     mPoints->AddPoint(x, y, 0, 0, 1, 0, 3, false);
00350                     nrOk++;
00351                 }
00352                 else if (mSelectedRanking->IsNegative(i))
00353                     mPoints->AddPoint(x, y, 0, 1, 0, 0, 3, false);
00354                 else if (mSelectedRanking->IsSkip(i))
00355                     mPoints->AddPoint(x, y, 0, 1, 1, 0, 3, false);
00356                 else
00357                     mPoints->AddPoint(x, y, 0, 0.5, 0.5, 0.5, 3, false);
00358             }
00359         }
00360         if (mImSetIdxGrid)
00361             mImSetIdxGrid->UpdateLayout(true);
00362 
00363 ILOG_INFO("4 : " << timer.SplitTime() << " = " << timer.SplitTimeStr());
00364         UpdateLinePlot();
00365 ILOG_INFO("5 : " << timer.SplitTime() << " = " << timer.SplitTimeStr());
00366         UpdatePointPlot();
00367         ILOG_INFO("Skipping judgement for efficiency reasons");
00368         /*
00369 ILOG_INFO("6 : " << timer.SplitTime() << " = " << timer.SplitTimeStr());
00370         if (mPlotPoints)
00371         {
00372             String judge(" ");
00373             if (mAnno)
00374             {
00375                 using Core::Table::AveragePrecisionJudged;
00376                 Real64 ap = AveragePrecisionJudged(mSelectedRanking, mAnno,
00377                                                    false, -1, true);
00378                 judge = " : nrOK = " + MakeString(nrOk) + " (in first " +
00379                     MakeString(nrPlot) + "), nrMissed = " +
00380                     MakeString(mAnno->GetNrPositive() - nrOk) +
00381                     ", ap = " + MakeString(ap);
00382             }
00383             mInfoText->SetText(mSimSet->GetDescription() + judge);
00384         }
00385         */
00386 ILOG_INFO("D : " << timer.SplitTime() << " = " << timer.SplitTimeStr());
00387         SetCurrent(mStartIm);
00388     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:25:08 2011 for ImpalaSrc by  doxygen 1.5.1