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

static ConceptSet* Impala::Core::Feature::ConceptSet::MakeFromFile ( Database::RawDataSet annoSet,
String  conceptSetName,
String  modelType 
) [inline, static]

Definition at line 31 of file ConceptSet.h.

References AddConcept(), Impala::Util::IOBuffer::Available(), ConceptSet(), Impala::Core::Database::RawDataSet::GetDatabase(), Impala::Core::Database::RawDataSet::GetFilePathAnnotation(), Impala::Util::Database::GetIOBuffer(), ILOG_ERROR, ILOG_VAR, and Impala::Util::IOBuffer::ReadLine().

Referenced by Impala::Core::Training::ApplyConcepts::ApplyConcepts().

00033     {
00034         ILOG_VAR(Impala.Core.Feature.ConceptSet.MakeFromFile);
00035         String path = annoSet->GetFilePathAnnotation(conceptSetName, false,
00036                                                      false);
00037         ConceptSet* res = new ConceptSet(conceptSetName);
00038         Util::Database* db = annoSet->GetDatabase();
00039         Util::IOBuffer* buf = db->GetIOBuffer(path, true, true, "");
00040         if (! buf)
00041         {
00042             ILOG_ERROR("File not valid : " << path);
00043             return res;
00044         }
00045         while (buf->Available())
00046         {
00047             String line = buf->ReadLine();
00048             if (line[0] && line[0] != '#')
00049                 res->AddConcept(new Concept(annoSet, conceptSetName, modelType,
00050                                             line));
00051         }
00052         return res;
00053     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:09:10 2010 for ImpalaSrc by  doxygen 1.5.1