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

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

Definition at line 160 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().

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

Here is the call graph for this function:


Generated on Thu Jan 13 09:14:31 2011 for ImpalaSrc by  doxygen 1.5.1