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

FileWriteIxRectangle.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Geometry_FileWriteIxRectangle_h
00002 #define Impala_Core_Geometry_FileWriteIxRectangle_h
00003 
00004 #include "Core/Geometry/IxRectangle.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 FileWriteIxRectangle(std::string fileName, Iterator begin, Iterator end)
00018 {
00019     File f(fileName, "w");
00020     if (! f.Valid())
00021         return;
00022     fprintf(f.Fp(), "#@ \"imageName\" \"anno\" \"rect\" \"section\" \"dir\" \"extra\"\n");
00023     fprintf(f.Fp(), "#= \"string\" \"string\" \"string\" \"string\" \"string\" \"string\"\n");
00024     for (Iterator it=begin ; it!=end ; it++)
00025     {
00026         IxRectangle ir = *it;
00027         fprintf(f.Fp(), "\"%s\" \"%s\" \"%d %d %d %d\" \"%s\" \"%s\" \"%s\"\n",
00028                 ir.mImageName.c_str(), ir.mAnno.c_str(),
00029                 ir.mRect.mLeft, ir.mRect.mTop, ir.mRect.mRight, ir.mRect.mBottom,
00030                 ir.mSection.c_str(), ir.mDir.c_str(), ir.mExtra.c_str());
00031     }
00032 }
00033 
00034 } // namespace Geometry
00035 } // namespace Core
00036 } // namespace Impala
00037 
00038 #endif

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