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

void Impala::Visualization::GUI::TopicExamplePreviewBar::Init ( SearchTopic searchTopic,
int  wndW,
int  wndH,
int  thumbW,
int  thumbH,
double  viewscale 
) [inline, private]

Definition at line 38 of file TopicExamplePreviewBar.h.

References Impala::Core::Trec::SearchTopic::GetCurTopicExampleName(), Impala::Core::Trec::SearchTopic::GetCurTopicImageExample(), Impala::Core::Trec::SearchTopic::GetCurTopicNrExamples(), Impala::Visualization::GUI::PreviewBar::mPreviewImages, mSearchTopic, Impala::Visualization::ImagesWindow::SetImagesListener(), and OglGui::Window::Window().

00040     {
00041         mSearchTopic    = searchTopic;
00042         mPreviewImages  = NULL;
00043 
00044         if (wndH < thumbH) // WndH smaller than thumbH, adjusting scale to fit
00045             viewscale = (wndH-2.0) / thumbH;
00046 
00047         // images:
00048         if (searchTopic == NULL)
00049             return;
00050 
00051         int nrImOnRow = (wndW - 124) / (thumbW * viewscale) + 1;
00052         Window *c = new Window(this, 120, 0, wndW - 124, wndH);
00053         // std::cout << " Preview: " << mName << ": " << thumbW << "x"
00054         //           << thumbH << "@" << viewscale << ", nr " << nrImOnRow
00055         //           << std::endl;
00056         mPreviewImages = new Visualization::ImageSet(c, thumbW, thumbH,
00057                                                      viewscale, nrImOnRow, 1,0);
00058         mPreviewImages->ActivateInfoBox(false);
00059         mPreviewImages->SetImagesListener(this, 0);
00060 
00061         for (int i=0; i < mSearchTopic->GetCurTopicNrExamples(); i++)
00062         {
00063             mPreviewImages->
00064                 AddImage(mSearchTopic->GetCurTopicImageExample(i,true),"Direct",
00065                          mSearchTopic->GetCurTopicExampleName(i),true);
00066         }
00067     }

Here is the call graph for this function:


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