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

virtual void Impala::Application::WindowTrecSearch::TopicSelectionEvent ( SearchTopicGui src,
int  topic,
void *  userData 
) [inline, virtual]

Reimplemented from Impala::Visualization::SearchTopicGuiListener.

Definition at line 284 of file mainTrecSearch.cpp.

References Impala::Core::Trec::ThreadBookmarked::AddShot(), Impala::Core::Trec::ThreadBookmarked::Clear(), Impala::Core::Trec::SearchTopic::GetCurTopicNum(), Impala::Core::Trec::SearchJudge::GetJudgedShots(), Impala::Core::Trec::SearchJudge::GetJudgedValues(), Impala::Core::Trec::ThreadSet::GetKeyframes(), Impala::Core::Trec::ThreadSet::GetSegmentation(), Impala::Core::VideoSet::Segmentation::GetShotId(), Impala::Core::VideoSet::Keyframes::GetShotRKF(), Impala::Core::Trec::ThreadSet::GetThreadByName(), Impala::Core::Trec::SearchJudge::HasTopic(), ILOG_ERROR, ILOG_LEVEL_INFO, ILOG_STARTACTION, ILOG_SYSTEM, ILOG_USER, mBackgroundColor, mDidTimeAlert, mJudge, mJudgeInBrowser, mSearchTopic, mThreadSet, mTopicRunning, SetBg(), and Impala::Visualization::AppControlGUI::SetInterval().

00285     {
00286         //ILOG_ENDACTION("topic");
00287         //ActionLogger::OpenPartLog();
00288         ILOG_USER( "new topic selected: " << topic );
00289         ILOG_STARTACTION("topic", ILOG_LEVEL_INFO);
00290         mTopicRunning = false;
00291         
00292         mDidTimeAlert = false;
00293         SetBg(mBackgroundColor);
00294         SetInterval(0.5);
00295 
00296         if (mJudge && mJudgeInBrowser)
00297         {
00298             String judgetopic = mSearchTopic->GetCurTopicNum();
00299             if (!mJudge->HasTopic(judgetopic))
00300             {
00301                 ILOG_ERROR("No judgement available for topic " << judgetopic);
00302                 return;
00303             }
00304 
00305             ILOG_SYSTEM("Showing judgements in browser: resetting bookmarks");
00306             ThreadBookmarked *positive = (ThreadBookmarked*)
00307                 mThreadSet->GetThreadByName("bookmarked");
00308             ThreadBookmarked *negative = (ThreadBookmarked*)
00309                 mThreadSet->GetThreadByName("bookmarked_negative");
00310 
00311             positive->Clear();
00312             negative->Clear();
00313 
00314             ILOG_SYSTEM("Loading judgements as bookmarks...");
00315             std::vector<String> shots = mJudge->GetJudgedShots(judgetopic);
00316             std::vector<int> values = mJudge->GetJudgedValues(judgetopic);
00317 
00318             for (int i=0; i<shots.size(); i++)
00319             {
00320                 String name = shots[i];
00321                 int shot = mThreadSet->GetSegmentation()->GetShotId(name);
00322                 int keyframe = mThreadSet->GetKeyframes()->GetShotRKF(shot);
00323                 if (values[i] == 0) // negative:
00324                     negative->AddShot(shot, keyframe);
00325                 if (values[i] == 1) // positive:
00326                     positive->AddShot(shot, keyframe);
00327             }
00328         }
00329     }

Here is the call graph for this function:


Generated on Fri Mar 19 10:38:27 2010 for ImpalaSrc by  doxygen 1.5.1