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

void Impala::Application::WindowShowVidSet::BuildGUI ( int  wndWidth,
int  wndHeight 
) [inline, private]

Definition at line 161 of file mainShowVidSet.cpp.

References OglGui::Tabs::CreateTab(), Impala::CmdOptions::GetBool(), OglGui::OglWindow::GetBorderBackground(), Impala::Core::VideoSet::SegmentationDocument::GetImSetKeyframes(), Impala::Core::VideoSet::SegmentationDocument::GetImSetStills(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetInt(), Impala::CmdOptions::GetString(), Impala::Visualization::SegmentationDocumentGuiAnno::GetVideoAnnotations(), OglGui::OglWindow::H(), Impala::Visualization::AppController::Instance(), mAllFramesTLineVideo, mAnnoPUNS, mAnnotation, mConceptRanking, mFeatSetRank, mFeatSetRankPlot, mFeatureSet, mSegDoc, mSegDocGuiAnno, mSegDocKeyframes, mSegDocMain, mSegDocStills, mShowAnno, mShowAnnoControl, mShowTimeLineVideo, mSimSetRank, mSimSetRankSim, mSimSetRankTruth, mTabs, mThumbHeight, mThumbWidth, mViewScale, OglGui::Tabs::SetActiveTab(), OglGui::OglWindow::SetBorderBackground(), OglGui::OglWindow::SetBorderType(), OglGui::Tabs::SetTabsListener(), TAB_ALLFRAMESTLINEVIDEO, TAB_ANNOCONTROL, TAB_ANNOPUNS, TAB_ANNOTATIONS, TAB_CONCEPTS, TAB_CONCEPTSSIM, TAB_CONCEPTSTRUTH, TAB_FEATURES, TAB_FEATURESPLOT, TAB_KEYFRAMES, TAB_MAIN, TAB_SET, TAB_STILLS, OglGui::Tabs::TabsAnimated(), OglGui::Tabs::TabsAnimDivider(), OglGui::Tabs::TabsDissolve(), OglGui::Tabs::TabsTransition(), OglGui::Tabs::TabsTransitionGridXY(), and OglGui::OglWindow::W().

Referenced by WindowShowVidSet().

00162     {
00163         CmdOptions& options = CmdOptions::GetInstance();
00164 
00165         SetBorderType(-1);
00166         if (!GetBorderBackground())
00167             SetBorderBackground(oglGUI_BG);
00168 
00169         mTabs = new OglGui::Tabs(this, wndWidth, wndHeight);
00170         mTabs->SetTabsListener(this);
00171 
00172         int tabAnim = options.GetInt("mainTabAnimation", 0);
00173         int tabDiv = options.GetInt("mainTabAnimationDivider", 4);
00174         int transit1 = options.GetInt("mainTabTransit1", 0);
00175         int transit2 = options.GetInt("mainTabTransit2", 0);
00176         int transitGridX = options.GetInt("mainTabTransitNx", 3);
00177         int transitGridY = options.GetInt("mainTabTransitNy", 3);
00178         bool tabDissolve = options.GetBool("mainTabDissolve",false);
00179         mTabs->TabsAnimated(tabAnim);
00180         mTabs->TabsAnimDivider(tabDiv);
00181         mTabs->TabsDissolve(tabDissolve);
00182         if (transit1 || transit2)
00183             mTabs->TabsTransition(transit1,transit2);
00184         mTabs->TabsTransitionGridXY(transitGridX,transitGridY);
00185 
00186         OglGui::Window* tab = mTabs->CreateTab("Data set", 80, TAB_SET);
00187 
00188         int nrImOnRow = wndWidth / (mThumbWidth + 3);
00189 
00190         typedef Core::VideoSet::SegmentationDocument SegmentationDocument;
00191         DataDocumentGui<SegmentationDocument>* dataGui =
00192             new DataDocumentGui<SegmentationDocument>(tab, wndWidth, wndHeight,
00193                                                       mSegDoc, TAB_SET, true,
00194                                                       true, false, 1, 12,
00195                                                       mShowAnno, mShowAnno);
00196         AppController& ctr = AppController::Instance();
00197         ctr.AddControl((AppControlDoc*) dataGui);
00198 
00199         // RvB: To start with the directory selected
00200         dataGui->StringSelectionEvent(NULL,0,(void*)1);
00201 
00202         tab = mTabs->CreateTab("Main", 56, TAB_MAIN);
00203         mSegDocMain = new SegmentationDocumentGuiMain
00204             (tab, wndWidth, wndHeight, nrImOnRow, mThumbWidth, mThumbHeight,
00205              mViewScale, mShowAnno, mSegDoc, 0, false, TAB_MAIN);
00206         ctr.AddControl((AppControlDoc*) mSegDocMain);
00207 
00208         if (mSegDoc->GetImSetKeyframes(true))
00209         {
00210             tab = mTabs->CreateTab("Keyframes", 94, TAB_KEYFRAMES);
00211             mSegDocKeyframes = new SegmentationDocumentGuiKeyframes
00212                 (tab, 0,0,tab->W(), tab->H(), nrImOnRow, mThumbWidth,
00213                  mThumbHeight, mViewScale, mSegDoc, TAB_KEYFRAMES);
00214             ctr.AddControl((AppControlDoc*) mSegDocKeyframes);
00215         }
00216 
00217         String conceptAnnotations = options.GetString("conceptAnnotations");
00218         if (!conceptAnnotations.empty())
00219         {
00220             tab = mTabs->CreateTab("Annotations", 100, TAB_ANNOTATIONS);
00221             mAnnotation = new AnnotationTableGui
00222                 (tab, tab->W(), tab->H(), nrImOnRow, mThumbWidth, mThumbHeight,
00223                  mViewScale, mSegDoc, conceptAnnotations, TAB_ANNOTATIONS);
00224             ctr.AddControl((AppControlDoc*) mAnnotation);
00225         }
00226 
00227         if (mConceptRanking)
00228         {
00229             tab = mTabs->CreateTab("Concepts", 82, TAB_CONCEPTS);
00230             mSimSetRank = new SimilarityTableSetRank
00231                 (tab, tab->W(), tab->H(), nrImOnRow, mThumbWidth, mThumbHeight,
00232                  mViewScale, mSegDoc, mConceptRanking, false,
00233                  conceptAnnotations, false, TAB_CONCEPTS);
00234             ctr.AddControl((AppControlDoc*) mSimSetRank);
00235 
00236             tab = mTabs->CreateTab("ConceptsSim", -1, TAB_CONCEPTSSIM);
00237             mSimSetRankSim = new SimilarityTableSetRank
00238                 (tab, tab->W(), tab->H(), nrImOnRow, mThumbWidth, mThumbHeight,
00239                  mViewScale, mSegDoc, mConceptRanking, true,
00240                  conceptAnnotations, false, TAB_CONCEPTSSIM);
00241             ctr.AddControl((AppControlDoc*) mSimSetRankSim);
00242 
00243             if (!conceptAnnotations.empty())
00244             {
00245                 tab = mTabs->CreateTab("ConceptsTruth", 120, TAB_CONCEPTSTRUTH);
00246                 mSimSetRankTruth = new SimilarityTableSetRank
00247                     (tab, tab->W(), tab->H(), nrImOnRow, mThumbWidth,
00248                      mThumbHeight, mViewScale, mSegDoc, mConceptRanking, false,
00249                      conceptAnnotations, true, TAB_CONCEPTSTRUTH);
00250                 ctr.AddControl((AppControlDoc*) mSimSetRankTruth);
00251             }
00252         }
00253 
00254         if (mShowTimeLineVideo)
00255         {
00256             tab = mTabs->CreateTab("TLineVideo", 100, TAB_ALLFRAMESTLINEVIDEO);
00257             mAllFramesTLineVideo = new AllFramesTLineVideo
00258                   (tab, tab->W(), tab->H(), mSegDoc, TAB_ALLFRAMESTLINEVIDEO);
00259             ctr.AddControl((AppControlDoc*) mAllFramesTLineVideo);
00260         }
00261 
00262         if (mShowAnnoControl)
00263         {
00264             std::string conceptSet = options.GetString("conceptSet");
00265             int maxAnno = options.GetInt("maxAnnoPerVideo");
00266             tab = mTabs->CreateTab("AnnoControl",100,TAB_ANNOCONTROL);
00267             mSegDocGuiAnno = new SegmentationDocumentGuiAnno(tab,tab->W(),tab->H(),mSegDoc,
00268                                                conceptSet,maxAnno,
00269                                                TAB_ANNOCONTROL);
00270             //mSegDocGuiAnno->SetRankingMode(false);
00271             ctr.AddControl((AppControlDoc*) mSegDocGuiAnno);
00272 
00273             AnnoPUNS::VideoAnnotations* vidAnnos
00274                 = mSegDocGuiAnno->GetVideoAnnotations();
00275             tab = mTabs->CreateTab("AnnoPUNS",100,TAB_ANNOPUNS);
00276             mAnnoPUNS = new AnnoPUNS(tab,tab->W(),tab->H(),mThumbWidth,
00277                                      mThumbHeight,mSegDoc,vidAnnos,
00278                                      TAB_ANNOPUNS);
00279             ctr.AddControl((AppControlDoc*) mAnnoPUNS);
00280         }
00281 
00282         if (mFeatureSet)
00283         {
00284             tab = mTabs->CreateTab("Features", 80, TAB_FEATURES);
00285             mFeatSetRank = new FeatureTableSetRank
00286                 (tab, wndWidth, wndHeight, nrImOnRow, mThumbWidth, mThumbHeight,
00287                  mViewScale, mSegDoc, mFeatureSet, false, TAB_FEATURES);
00288             ctr.AddControl((AppControlDoc*) mFeatSetRank);
00289 
00290             tab = mTabs->CreateTab("FeaturesPlot", -1, TAB_FEATURESPLOT);
00291             mFeatSetRankPlot = new FeatureTableSetRank
00292                 (tab, wndWidth, wndHeight, nrImOnRow, mThumbWidth, mThumbHeight,
00293                  mViewScale, mSegDoc, mFeatureSet, true, TAB_FEATURESPLOT);
00294             ctr.AddControl((AppControlDoc*) mFeatSetRankPlot);
00295         }
00296 
00297         if (mSegDoc->GetImSetStills())
00298         {
00299             tab = mTabs->CreateTab("Stills", 60, TAB_STILLS);
00300             bool imageStills = options.GetBool("imageStills");
00301             mSegDocStills = new SegmentationDocumentGuiStills
00302                 (tab, wndWidth, wndHeight, nrImOnRow, mThumbWidth, mThumbHeight,
00303                  mViewScale, true, imageStills, mSegDoc, TAB_STILLS);
00304             ctr.AddControl((AppControlDoc*) mSegDocStills);
00305         }
00306         mTabs->SetActiveTab(0);
00307     }

Here is the call graph for this function:


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