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

SegmentationDocument* Impala::Core::VideoSet::MakeSegmentationDocument ( String  videoSetName  )  [inline]

Definition at line 21 of file MakeSegmentationDocument.h.

References Impala::CmdOptions::GetBool(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetString(), ILOG_INFO, ILOG_VAR, Impala::Core::ImageSet::MakeImageSet(), and MakeVideoSet().

Referenced by Impala::Application::WindowTrecSearch::InitData(), Impala::Application::WindowShowVidSet::InitData(), and Impala::Application::WindowAnnoVidSet::InitData().

00022 {
00023     typedef Core::ImageSet::ImageSet ImageSet;
00024     ILOG_VAR(Core.VideoSet.MakeSegmentationDocument);
00025     CmdOptions& options = CmdOptions::GetInstance();
00026 
00027     ILOG_INFO("reading videoset");
00028     VideoSet* vidSet = MakeVideoSet(videoSetName);
00029 #ifndef REPOSITORY_USED // Here comes the deprecated stuff
00030     Util::Database* db = vidSet->GetDatabase();
00031 
00032     ImageSet* imSetKeyfr =
00033         Core::ImageSet::MakeImageSet(options.GetString("imageSetKeyframes"),db);
00034 #else // REPOSITORY_USED
00035     String setName = options.GetString("imageSetKeyframes");
00036     ImageSet* imSetKeyfr = 0;
00037     if (!setName.empty())
00038         imSetKeyfr = Core::ImageSet::MakeImageSet(setName, vidSet->GetLocator());
00039 #endif // REPOSITORY_USED
00040     if (imSetKeyfr)
00041     {
00042         imSetKeyfr->SetImageSrc(false, false, true);
00043     }
00044     else
00045     {
00046         ILOG_INFO("No keyframes available");
00047     }
00048 
00049     ILOG_INFO("Reading thumbnails");
00050 #ifndef REPOSITORY_USED // Here comes the deprecated stuff
00051     ImageSet* imSetThumb = 
00052        Core::ImageSet::MakeImageSet(options.GetString("imageSetThumbnails"),db);
00053 #else // REPOSITORY_USED
00054     setName = options.GetString("imageSetThumbnails");
00055     ImageSet* imSetThumb = 0;
00056     if (!setName.empty())
00057        imSetThumb = Core::ImageSet::MakeImageSet(setName, vidSet->GetLocator());
00058 #endif // REPOSITORY_USED
00059     if (imSetThumb)
00060     {
00061         imSetThumb->SetImageSrc(! options.GetBool("noArchive"),
00062                                 options.GetBool("imFileArchive"),
00063                                 options.GetBool("imSplitArchive"),
00064                                 true);
00065     }
00066     else
00067     {
00068         ILOG_INFO("No thumbnails available");
00069     }
00070 
00071     ILOG_INFO("Reading stills");
00072 #ifndef REPOSITORY_USED // Here comes the deprecated stuff
00073     ImageSet* imSetStill =
00074         Core::ImageSet::MakeImageSet(options.GetString("imageSetStills"), db);
00075 #else // REPOSITORY_USED
00076     setName = options.GetString("imageSetStills");
00077     ImageSet* imSetStill = 0;
00078     if (!setName.empty())
00079         imSetStill = Core::ImageSet::MakeImageSet(setName, vidSet->GetLocator());
00080 #endif // REPOSITORY_USED
00081     if (imSetStill)
00082     {
00083         imSetStill->SetImageSrc(false, false, true);
00084     }
00085     else
00086     {
00087         ILOG_INFO("No stills available");
00088     }
00089 
00090 #ifndef REPOSITORY_USED // Here comes the deprecated stuff
00091     ILOG_INFO("reading shots");
00092     Segmentation* shots = new Segmentation(vidSet, "segmentation");
00093 
00094     ILOG_INFO("reading keyframe set");
00095     Keyframes* keyframes = new Keyframes(vidSet, "keyframes");
00096 #else // REPOSITORY_USED
00097     ILOG_INFO("reading shots");
00098     using namespace Impala::Persistency;
00099     SegmentationLocator segLoc(vidSet->GetLocator(), "segmentation");
00100     Segmentation* shots = SegmentationRepository().Get(segLoc, vidSet);
00101 
00102     ILOG_INFO("reading keyframe set");
00103     KeyframesLocator keyLoc(vidSet->GetLocator(), "keyframes");
00104     Keyframes* keyframes = KeyframesRepository().Get(keyLoc, vidSet);
00105 #endif // REPOSITORY_USED
00106 
00107     SegmentationDocument* segDoc = new SegmentationDocument
00108             (vidSet, shots, keyframes, imSetKeyfr, imSetThumb, imSetStill);
00109     return segDoc;
00110 }

Here is the call graph for this function:


Generated on Thu Jan 13 09:21:44 2011 for ImpalaSrc by  doxygen 1.5.1