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

TestInvWiccest.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Test_TestInvWiccest_h
00002 #define Impala_Core_Test_TestInvWiccest_h
00003 
00004 #include "Core/Test/TestImage.h"
00005 #include "Core/Array/InvWiccest.h"
00006 
00007 namespace Impala
00008 {
00009 namespace Core
00010 {
00011 namespace Test
00012 {
00013 
00014 
00015 class TestInvWiccest : public TestImage
00016 {
00017 public:
00018 
00019     TestInvWiccest(String srcName, double sigma, bool doRot, bool doC)
00020     {
00021         mTestNameBase = "InvWiccest";
00022         mSrcName = srcName;
00023         mSigma = sigma;
00024         mDoRot = doRot;
00025         mDoC = doC;
00026     }
00027 
00028     virtual void
00029     Run()
00030     {
00031         Array2dVec3UInt8* src = OpenSrcArray(mSrcName);
00032         Array::ArraySet<Array2dScalarReal64> res;
00033         Array::InvWiccest(res, src, mDoRot, mDoC, mSigma, 3, true);
00034 
00035         int id = mImSet->GetFileId(mSrcName);
00036         String suffix = FileNameCtor("", mTestNameBase, mSigma, mDoRot, mDoC,
00037                                      ".raw");
00038         if (1) // 1 to compare to the reference, 0 to generate the reference
00039         {
00040             CompareList(res.GetArrays(),
00041                         mImSet->GetFilePathReference(id, suffix, false, false));
00042         }
00043         else
00044         {
00045             WriteRawList(res.GetArrays(),
00046                          mImSet->GetFilePathReference(id, suffix, true, false),
00047                          mImSet->GetDatabase(), true);
00048         }
00049 
00050         res.Delete();
00051         delete src;
00052     }
00053 
00054     virtual String
00055     Name() const
00056     {
00057         return FileNameCtor(mTestNameBase, mSrcName, mSigma, mDoRot, mDoC, "");
00058     }
00059 
00060 private:
00061 
00062     String mTestNameBase;
00063     String mSrcName;
00064     double mSigma;
00065     bool   mDoRot;
00066     bool   mDoC;
00067 
00068 };
00069 
00070 
00071 static TestBase* gInvWiccestSuite[] =
00072     {
00073         new TestInvWiccest("beach.jpg", 3.0, false, false),
00074         new TestInvWiccest("beach.jpg", 3.0, true, false),
00075         new TestInvWiccest("beach.jpg", 3.0, true, true),
00076         (TestBase*)0
00077     };
00078 
00079 } // namespace Test
00080 } // namespace Core
00081 } // namespace Impala
00082 
00083 #endif

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