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

template<class BackInsertIterator>
void Impala::Core::Geometry::FileReadVxRectangle ( BackInsertIterator  bi,
std::string  fileName 
) [inline]

Definition at line 19 of file FileReadVxRectangle.h.

References Impala::FileNameExt(), Impala::Core::Geometry::VxRectangle::mAnno, Impala::Core::Geometry::VxRectangle::mDir, Impala::Core::Geometry::VxRectangle::mEndFrame, Impala::Core::Geometry::VxRectangle::mExtra, Impala::Core::Geometry::VxRectangle::mRect, Impala::Core::Geometry::VxRectangle::mSection, Impala::Core::Geometry::VxRectangle::mStartFrame, and Impala::Core::Geometry::VxRectangle::mVideoName.

Referenced by Impala::Core::VideoSet::TableShots::ReadVxsFile(), and Impala::Core::Table::TableVxs::ReadVxsFile().

00020 {
00021     File f(fileName, "r");
00022     if (! f.Valid())
00023         return;
00024     bool hasSection = false;
00025     while (! f.Eof())
00026     {
00027         std::string line = f.ReadLine(false);
00028         if (! line[0])
00029             continue;
00030         Util::StringParser p(line);
00031         if (p.At("#@") && (p.Contains("section")))
00032             hasSection = true;
00033         if (p.At("#"))
00034             continue;
00035         VxRectangle vr;
00036         vr.mStartFrame = p.GetInt();
00037         vr.mEndFrame = p.GetInt();
00038         vr.mAnno = p.GetString();
00039         vr.mRect = p.GetRectangle();
00040         vr.mVideoName = p.GetString();
00041         if (hasSection)
00042         {
00043             vr.mSection = p.GetString();
00044             vr.mDir = p.GetString();
00045         }
00046         else
00047             if (FileNameExt(vr.mVideoName) == std::string(""))
00048                 vr.mVideoName = vr.mVideoName + ".mpg";
00049         if (! p.TheEnd())
00050             vr.mExtra = p.GetString();
00051         *bi++ = vr;
00052     }
00053 }

Here is the call graph for this function:


Generated on Thu Jan 13 09:19:36 2011 for ImpalaSrc by  doxygen 1.5.1