Commit a12251cc authored by Andy Cedilnik's avatar Andy Cedilnik
Browse files

ENH: If test fails, write out test image

parent e804e9ce
......@@ -31,7 +31,7 @@
#include <sys/stat.h>
vtkStandardNewMacro(vtkTesting);
vtkCxxRevisionMacro(vtkTesting, "1.26");
vtkCxxRevisionMacro(vtkTesting, "1.27");
vtkCxxSetObjectMacro(vtkTesting, RenderWindow, vtkRenderWindow);
......@@ -604,7 +604,6 @@ int vtkTesting::RegressionTest(vtkImageData* image, double thresh, ostream& os)
rt_jpegw_dashboard->Write();
rt_jpegw_dashboard->Delete();
os << "<DartMeasurementFile name=\"TestImage\" type=\"image/jpeg\">";
os << valid_test_small;
delete [] valid_test_small;
......@@ -618,6 +617,16 @@ int vtkTesting::RegressionTest(vtkImageData* image, double thresh, ostream& os)
delete [] valid;
char* vImage = new char[strlen(tmpDir) + validName.size() + 30];
sprintf(vImage, "%s/%s", tmpDir, validName.c_str());
vtkPNGWriter *rt_pngw = vtkPNGWriter::New();
rt_pngw->SetFileName(vImage);
rt_pngw->SetInput(image);
rt_pngw->Write();
rt_pngw->Delete();
delete [] vImage;
rt_shrink->Delete();
rt_gamma->Delete();
}
......
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