Rendering/vtkTesting.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00021 #ifndef __vtkTesting_h
00022 #define __vtkTesting_h
00023
00024 #include "vtkObject.h"
00025
00026 class vtkLine;
00027 class vtkTriangle;
00028 class vtkRenderWindow;
00029
00030
00031 struct VTK_RENDERING_EXPORT vtkTestUtilities
00032 {
00036 static char* GetDataRoot(int argc, char* argv[]);
00037
00039
00045 static char* ExpandDataFileName(int argc, char* argv[],
00046 const char* fname,
00047 int slash = 0);
00048
00049
00050
00051
00052 static char* GetArgOrEnvOrDefault(const char* arg,
00053 int argc, char* argv[],
00054 const char* env,
00055 const char* def);
00057
00059
00065 static char* ExpandFileNameWithArgOrEnvOrDefault(const char* arg,
00066 int argc, char* argv[],
00067 const char* env,
00068 const char* def,
00069 const char* fname,
00070 int slash = 0);
00072 };
00073
00074
00075 class VTK_RENDERING_EXPORT vtkTesting : public vtkObject
00076 {
00077 public:
00078 static vtkTesting *New();
00079 vtkTypeRevisionMacro(vtkTesting,vtkObject);
00080 void PrintSelf(ostream& os, vtkIndent indent);
00081
00082
00083 enum ReturnValue {
00084 FAILED = 0,
00085 PASSED = 1,
00086 NOT_RUN = 2,
00087 DO_INTERACTOR = 3
00088 };
00089
00090 static int Test(int argc, char *argv[], vtkRenderWindow *rw, double thresh);
00091
00092
00094
00095 vtkSetClampMacro(FrontBuffer, int, 0, 1);
00096 vtkBooleanMacro(FrontBuffer, int);
00097 vtkGetMacro(FrontBuffer, int);
00099
00101 virtual int RegressionTest(double thresh);
00102
00104
00106 virtual void SetRenderWindow(vtkRenderWindow* rw);
00107 vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
00109
00111 */
00112 vtkSetStringMacro(DataFileName);
00113 vtkGetStringMacro(DataFileName);
00115
00116 protected:
00117 vtkTesting();
00118 ~vtkTesting();
00119
00120 static char* IncrementFileName(const char* fname, int count);
00121 static int LookForFile(const char* newFileName);
00122
00123 int FrontBuffer;
00124 vtkRenderWindow* RenderWindow;
00125 char* DataFileName;
00126
00127 private:
00128 vtkTesting(const vtkTesting&);
00129 void operator=(const vtkTesting&);
00130 };
00131
00132 #endif
00133
00134