Commit da7357e5 authored by Timothy M. Shead's avatar Timothy M. Shead
Browse files

STYLE: Move non-member functions to static member functions

parent 85349b04
......@@ -38,7 +38,7 @@ bool saveImage(vtkWindowToImageFilter* Capture, const QFileInfo& File)
return result;
}
bool pqSaveScreenshot(vtkRenderWindow* RenderWindow, const QString& File)
bool pqImageComparison::pqSaveScreenshot(vtkRenderWindow* RenderWindow, const QString& File)
{
vtkWindowToImageFilter* const capture = vtkWindowToImageFilter::New();
capture->SetInput(RenderWindow);
......@@ -63,7 +63,7 @@ bool pqSaveScreenshot(vtkRenderWindow* RenderWindow, const QString& File)
return success;
}
bool pqCompareImage(vtkRenderWindow* RenderWindow, const QString& ReferenceImage, double Threshold, ostream& Output, const QString& TempDirectory)
bool pqImageComparison::pqCompareImage(vtkRenderWindow* RenderWindow, const QString& ReferenceImage, double Threshold, ostream& Output, const QString& TempDirectory)
{
// Verify the reference image exists
if(!QFileInfo(ReferenceImage).exists())
......
......@@ -16,8 +16,15 @@
class QString;
class vtkRenderWindow;
QTTESTING_EXPORT bool pqSaveScreenshot(vtkRenderWindow* RenderWindow, const QString& File);
QTTESTING_EXPORT bool pqCompareImage(vtkRenderWindow* RenderWindow, const QString& ReferenceImage, double Threshold, ostream& Output, const QString& TempDirectory);
/// Provides functionality for generating and comparing reference images for regression testing
class QTTESTING_EXPORT pqImageComparison
{
public:
/// Saves the contents of a render window to a file for later use as a reference image
static bool pqSaveScreenshot(vtkRenderWindow* RenderWindow, const QString& File);
/// Compares the contents of a render window to a reference image, returning true iff the two match within a given threshold
static bool pqCompareImage(vtkRenderWindow* RenderWindow, const QString& ReferenceImage, double Threshold, ostream& Output, const QString& TempDirectory);
};
#endif // !_pqImageComparison_h
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment