Definition at line 26 of file MakeImageSet.h. References Impala::FileNameExt(), Impala::Util::Database::GetFilePath(), Impala::Util::Database::GetInstance(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetString(), ILOG_VAR, ILOG_WARN, Impala::StringReplaceAll(), and Impala::StringList::ToString(). Referenced by Impala::Core::ApplicationFactory::ApplicationFactory(), Impala::Application::Table::DoDumpAnnotationTable(), Impala::Application::Table::DoDumpFeatureTable(), Impala::Application::Table::DoDumpQuidTable(), Impala::Application::Table::DoDumpSimilarityTableSet(), Impala::Application::Table::DoScaleFeatureTable(), Impala::Core::VideoSet::ExportKeyframes::ExportKeyframes(), Impala::Application::WindowTrecSearch::InitDataTrecTopic(), Impala::Application::IDash::TrecEngine::LoadData(), Impala::Core::Trec::TrecTopic::LoadDataSets(), Impala::Samples::mainCoreTest(), Impala::Application::mainImSet(), MakeIxsDocument(), Impala::Core::VideoSet::MakeSegmentationDocument(), Impala::Application::WindowTrecResult::ReadData(), Impala::Application::RunDistributedLearningEngine(), and Impala::Core::ImageSet::Thumbnails::Thumbnails(). 00027 { 00028 ILOG_VAR("Impala.Core.ImageSet.MakeImageSet"); 00029 00030 if (fileName.empty()) 00031 { 00032 ILOG_WARN("Construction of image set not possible without a file name"); 00033 return 0; 00034 } 00035 00036 CmdOptions& options = CmdOptions::GetInstance(); 00037 String ext = FileNameExt(fileName); 00038 ImageSet* imSet; 00039 if (ext == "txt") 00040 { 00041 Util::Database* db = parentDb; 00042 if (db == 0) 00043 db = new Util::Database(fileName); 00044 if (db->GetFilePath("ImageData", fileName, false, false).empty()) 00045 return 0; 00046 imSet = new ImageSet(db, fileName, true); 00047 } 00048 else if (ext == "ixs") 00049 { 00050 String setName = options.GetString("imageSet"); 00051 Util::Database* db = new Util::Database(setName); 00052 imSet = new ImageSet(db, setName, true); 00053 } 00054 else 00055 { 00056 String fileNameSlashed = StringReplaceAll(fileName, "\\", "/"); 00057 StringList pList(fileNameSlashed, '/'); 00058 String imName = *(pList.rbegin()); 00059 pList.pop_back(); 00060 String dirName = *(pList.rbegin()); 00061 pList.pop_back(); 00062 String section = pList.ToString('/'); 00063 Util::Database* db = &Util::Database::GetInstance(); 00064 imSet = new ImageSet(db, "tmpSet.txt", false); 00065 imSet->AddFile(imName, section, dirName); 00066 } 00067 00068 if (!imSet) 00069 ILOG_WARN("Construction of image set failed for: " << fileName); 00070 return imSet; 00071 }
Here is the call graph for this function:
|