13 #ifndef mitkRenderingTestHelper_h
14 #define mitkRenderingTestHelper_h
18 #include <vtkSmartPointer.h>
23 class vtkRenderWindow;
59 vtkRenderer *GetVtkRenderer();
63 vtkRenderWindow *GetVtkRenderWindow();
68 void SaveAsPNG(std::string fileName);
76 void SetAutomaticallyCloseRenderWindow(
bool automaticallyCloseRenderWindow);
118 void SetMapperIDToRender3D();
123 void SetMapperIDToRender2D();
129 void SaveReferenceScreenShot(std::string fileName);
148 bool CompareRenderWindowAgainstReference(
int argc,
char *argv[],
double threshold = 10.0);
162 std::vector<char *> argv;
163 std::vector<std::vector<char>> argvec;
167 : argv(argstrings.size() + 1), argvec(argstrings.size() + 1)
169 std::vector<std::string> cmdArgs;
171 cmdArgs.insert(cmdArgs.end(), argstrings.begin(), argstrings.end());
172 for (std::size_t i = 0; i < cmdArgs.size(); ++i)
174 argvec[i].assign(cmdArgs[i].begin(), cmdArgs[i].end());
175 argvec[i].push_back(
'\0');
176 argv[i] = &argvec[i][0];
198 void AddToStorage(
const std::string &filename);
206 void SetInputFileNames(
int argc,
char *argv[]);