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

FileWriteVxRectangle.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Geometry_FileWriteVxRectangle_h
00002 #define Impala_Core_Geometry_FileWriteVxRectangle_h
00003 
00004 #include "Core/Geometry/VxRectangle.h"
00005 #include "Basis/File.h"
00006 
00007 namespace Impala
00008 {
00009 namespace Core
00010 {
00011 namespace Geometry
00012 {
00013 
00014 
00015 template <class Iterator>
00016 inline void
00017 FileWriteVxRectangle(std::string fileName, Iterator begin, Iterator end)
00018 {
00019     File f(fileName, "w");
00020     if (! f.Valid())
00021         return;
00022         fprintf(f.Fp(), "#@ \"start\" \"end\" \"anno\" \"rect\" \"video\" \"section\" \"dir\" \"extra\"\n");
00023         fprintf(f.Fp(), "#= \"int\" \"int\" \"string\" \"string\" \"string\" \"string\" \"string\" \"string\"\n");
00024         for (Iterator it=begin ; it!=end ; it++)
00025     {
00026                 VxRectangle vr = *it;
00027                 fprintf(f.Fp(), "%d %d \"%s\" \"%d %d %d %d\" \"%s\" \"%s\" \"%s\" \"%s\"\n",
00028                                 vr.mStartFrame, vr.mEndFrame, vr.mAnno.c_str(),
00029                                 vr.mRect.mLeft, vr.mRect.mTop, vr.mRect.mRight, vr.mRect.mBottom,
00030                                 vr.mVideoName.c_str(), vr.mSection.c_str(), vr.mDir.c_str(),
00031                 vr.mExtra.c_str());
00032         }
00033 }
00034 
00035 } // namespace Geometry
00036 } // namespace Core
00037 } // namespace Impala
00038 
00039 #endif

Generated on Fri Mar 19 09:31:08 2010 for ImpalaSrc by  doxygen 1.5.1