The base of a filename : returns "base" given "/dir1/dir2/base.ext".
Definition at line 63 of file FileName.h.
References FileNameLastPathSepPos().
Referenced by Impala::Persistency::VideoSetRepositoryInMonet::Add(), Impala::Persistency::KeywordListRepositoryInMonet::Add(), Impala::Persistency::FeatureTableRepositoryInMonet::Add(), Impala::Persistency::AnnotationTableRepositoryInMonet::Add(), Impala::Visualization::ImagesWindow::AddImage(), Impala::Core::VideoSet::Walker::AddKeyframeMaskAnnoFile(), Impala::Core::VideoSet::ConcatFeatures::ConcatFeatures(), Impala::Core::ImageSet::ConcatFeatures::ConcatFeatures(), Impala::Persistency::VideoSetsRepository::Contains(), Impala::Persistency::ImageSetsRepository::Contains(), Impala::Visualization::SegmentationDocumentGuiAnno::DoAnno(), Impala::Application::Table::DoDumpSimilarityTableSetTrec(), Impala::Application::Util::DoExportAnnoMpeg7(), Impala::Application::Util::DoExportShotMpeg7(), Impala::Application::Util::DoImportAnnotations(), Impala::Application::Util::DoImportAnnotationsActive(), Impala::Application::Util::DoImportAnnotationsOrk(), Impala::Samples::MonetTest::DoInsertAnnotations(), Impala::Samples::MonetTest::DoInsertKeywords(), Impala::Samples::MonetTest::DoInsertModels(), Impala::Samples::MonetTest::DoInsertModelSets(), Impala::Samples::MonetTest::DoInsertVideoFiles(), Impala::CmdOptions::DoParseArgs(), Impala::Application::Table::DoProcSimilarityTableSet(), Impala::Core::Table::BayesFusion::DumpConceptSimilarityTableSet(), Impala::Core::Table::BayesFusion::DumpGenreSimilarityTableSet(), Impala::Core::Trec::TrecTopic::GenExampleName(), Impala::Persistency::VideoSetRepositoryInMonet::Get(), Impala::Persistency::SegmentationRepositoryInMonet::Get(), Impala::Persistency::KeywordListRepositoryInMonet::Get(), Impala::Persistency::KeyframesRepositoryInMonet::Get(), Impala::Persistency::FeatureTableRepositoryInMonet::Get(), Impala::Persistency::AnnotationTableRepositoryInMonet::Get(), Impala::Persistency::RepositoryInMonetDB::GetConnection(), Impala::Core::Trec::SearchTopic::GetExampleName(), Impala::Core::Database::RawDataSet::GetFileBase(), Impala::Persistency::RepositoryInFileSystem::GetFS(), Impala::Persistency::VideoSetsRepository::GetId(), Impala::Persistency::ImageSetsRepository::GetId(), Impala::Core::VideoSet::VideoSetRepository::GetId(), Impala::Core::ImageSet::ImageSetRepository::GetId(), Impala::Core::Feature::Computor::GetProtoFeatureTable(), Impala::Core::VideoSet::ShotSegmenter::HandleDoneFile(), Impala::Core::VideoSet::IndexAnnotation::HandleDoneWalk(), Impala::Core::VideoSet::ShotSegmenter::HandleNewFile(), Impala::Core::VideoSet::ExportStills::HandleNewFile(), Impala::Core::ImageSet::CheckSizes::HandleNewWalk(), Impala::Util::Database::Init(), Impala::Core::Database::RawDataSet::Init(), Impala::Application::WindowTrecSearch::InitDataConceptRanking(), Impala::Samples::MonetTest::InsertOneSimTable(), Impala::Core::VideoSet::Walker::LoadQuids(), Impala::Persistency::SimilarityTableSetRepositoryInMonet::LoadSim(), Impala::Samples::MonetTest::MakeAnnotationTableMapi(), Impala::Samples::MonetTest::MakeKeywordListMapi(), Impala::Core::Feature::VisSem::MakeProtoFeatureTable(), Impala::Samples::MonetTest::MakeSimTableMapi(), Impala::Samples::MonetTest::MakeVideoSetMapi(), Impala::Core::VideoJob::Manager::Prepare(), Impala::Core::VideoSet::ShotSegmenter::ReadGroundTruth(), Impala::Core::Trec::Collection::ReadKeyframesClips(), Impala::Core::Feature::Computor::ReadProtoFeatureTableSet(), Impala::Visualization::DataDocumentGui< Impala::Core::ImageSet::IxsDocument >::SaveBookmarked(), Impala::Persistency::SimilarityTableSetRepositoryInMonet::SaveSim(), Impala::Core::Feature::InterestPointFeature::SetCodebook(), Impala::Core::Feature::VisSem::VisSem(), Impala::Core::VideoSet::ShotSegmenter::WriteMp7ShotSeg(), and Impala::Core::VideoSet::ShotSegmenter::WritePredictions().
00064 {
00065 String::size_type startPos = 0;
00066
00067 {
00068 const String::size_type sepPos = FileNameLastPathSepPos(filePath);
00069 if (sepPos != String::npos)
00070 {
00071 if (sepPos + 1 == filePath.size())
00072 return String("");
00073 startPos = sepPos + 1;
00074 }
00075 }
00076
00077 String::size_type dotPos = filePath.rfind('.');
00078 if (dotPos == String::npos)
00079 dotPos = filePath.size();
00080
00081 if (dotPos >= startPos)
00082 return filePath.substr(startPos, dotPos - startPos);
00083
00084 return filePath.substr(startPos);
00085 }
Here is the call graph for this function: