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

void Impala::Visualization::RotorBrowser::RotorBrowser::DoQueryByRegion ( int  keyframeID,
float  x,
float  y,
float  w,
float  h 
) [inline, private]

Definition at line 2028 of file RotorBrowser.h.

References Impala::Core::Trec::ThreadSet::AddThreadShots(), GetThreadByName(), ILOG_DEBUG, ILOG_ERROR, ILOG_WARN, Impala::MakeString(), mBrowseMode, MODE_CROSSBROWSER, MODE_FORKBROWSER, mThreadSet, mVisualQueryEngine, Impala::Core::Trec::VisualQueryEngine::QueryByRegion(), ReloadCrossBrowser(), Impala::Core::Trec::ThreadSet::RemoveThread(), ShowStatusStr(), SwitchToContext(), and UpdateViewsToContext().

Referenced by OnRectangleSelect(), and OnRectangleSelectByKeyframe().

02029     {
02030         ILOG_DEBUG("DoQueryByRegion: keyframe ID="<<keyframeID<<" x=" << x
02031                    << " y=" << y << " w=" << w << " h=" << h);
02032 
02033         if (mBrowseMode == MODE_FORKBROWSER) {
02034             ILOG_ERROR("Handling of Query By Region queries in ForkBrowser " <<
02035                        "not yet implemented.");
02036             return;
02037         }
02038 
02039         if (mBrowseMode == MODE_CROSSBROWSER)
02040         {
02041             std::list<KeyframeResult> qbyr =
02042                 mVisualQueryEngine->QueryByRegion(keyframeID,x,y,x+w,y+h);
02043             if (qbyr.size() > 1)
02044             {
02045                 ILOG_DEBUG("Got "<<qbyr.size()<<" results from webservice.");
02046                 std::ostringstream bla;
02047                 bla << "Found " << qbyr.size() << " query by region results.";
02048                 ShowStatusStr("Query by Region",bla.str(),oglGREEN);
02049                 mThreadSet->RemoveThread("shots_initialquery");
02050                 mThreadSet->AddThreadShots("initialquery", qbyr);
02051                 UpdateViewsToContext();
02052                 ReloadCrossBrowser();
02053             }
02054             else
02055             {
02056                 ILOG_DEBUG("Got no results from webservice.");
02057                 char *t = "No query by region result found for this selection.";
02058                 ShowStatusStr("Error",t,oglRED);
02059             }
02060             return;
02061         }
02062         String tname = "qbyr_" + MakeString(keyframeID);
02063         if (GetThreadByName("shots_" + tname) != NULL)
02064             ILOG_WARN( "thread " << tname << " already exists." );
02065 
02066         std::list<KeyframeResult> qbyr =
02067             mVisualQueryEngine->QueryByRegion(keyframeID,x,y,x+w,y+h);
02068 
02069         mThreadSet->AddThreadShots(tname, qbyr);
02070         UpdateViewsToContext();
02071         SwitchToContext("shots_" + tname);
02072         UpdateViewsToContext();
02073     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:54:58 2010 for ImpalaSrc by  doxygen 1.5.1