Commit 6f612107 authored by Nickolas Davis's avatar Nickolas Davis 🥑 Committed by Kitware Robot
Browse files

Merge topic 'support-subdir-data-folders'

268e882c raise allowed num of error pixels a bit
78e3cbb5 Move regression test images into subdirs, implement io library support
d2545316

 Implement additional wireframer rendering regression tests
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland's avatarKenneth Moreland <kmorel@acm.org>
Merge-request: !2442
parents 62f6799f 268e882c
......@@ -183,6 +183,15 @@ stages:
- build/*.png
- build/*.pnm
- build/*.pmm
- build/*/*.png
- build/*/*.pnm
- build/*/*.pmm
- build/*/*/*.png
- build/*/*/*.pnm
- build/*/*/*.pmm
- build/*/*/*/*.png
- build/*/*/*/*.pnm
- build/*/*/*/*.pmm
.cmake_memcheck_linux: &cmake_memcheck_linux
stage: test
......
......@@ -41,7 +41,7 @@ inline VTKM_CONT ImageDifference::ImageDifference()
: vtkm::filter::FilterField<ImageDifference>()
, AverageRadius(0)
, PixelShiftRadius(0)
, AllowedPixelErrorRatio(0.0001f)
, AllowedPixelErrorRatio(0.00025f)
, PixelDiffThreshold(0.05f)
, ImageDiffWithinThreshold(true)
, SecondaryFieldName("image-2")
......@@ -122,9 +122,9 @@ inline VTKM_CONT vtkm::cont::DataSet ImageDifference::DoExecute(
"Difference within threshold: "
<< this->ImageDiffWithinThreshold
<< ", for pixels outside threshold: " << errorPixels.GetNumberOfValues()
<< ", with total number of pixels: " << thresholdOutput.GetNumberOfValues()
<< ", and an allowable percentage of errored pixels: "
<< this->AllowedPixelErrorRatio << ", with a total summed threshold error: "
<< ", with a total number of pixesl: " << thresholdOutput.GetNumberOfValues()
<< ", and an allowable pixel error ratio: " << this->AllowedPixelErrorRatio
<< ", with a total summed threshold error: "
<< vtkm::cont::Algorithm::Reduce(errorPixels, static_cast<FloatDefault>(0)));
vtkm::cont::DataSet clone;
......
......@@ -50,13 +50,12 @@ void TestContourFilterWedge()
result.PrintSummary(std::cout);
C canvas(512, 512);
M mapper;
vtkm::rendering::Scene scene;
auto view = vtkm::rendering::testing::GetViewPtr<M, C, V3>(
result, "gyroid", canvas, mapper, scene, colorTable, static_cast<vtkm::FloatDefault>(0.08));
VTKM_TEST_ASSERT(test_equal_images(view, "contour-wedge.png"));
vtkm::rendering::testing::RenderAndRegressionTest<M, C, V3>(
result,
"gyroid",
colorTable,
"filter/contour-wedge.png",
static_cast<vtkm::FloatDefault>(0.08));
}
void TestContourFilterUniform()
......@@ -84,14 +83,9 @@ void TestContourFilterUniform()
result.PrintSummary(std::cout);
C canvas(512, 512);
M mapper;
vtkm::rendering::Scene scene;
auto view = vtkm::rendering::testing::GetViewPtr<M, C, V3>(
result, "pointvar", canvas, mapper, scene, colorTable);
//Y axis Flying Edge algorithm has subtle differences at a couple of boundaries
VTKM_TEST_ASSERT(test_equal_images(view, "contour-uniform.png"));
vtkm::rendering::testing::RenderAndRegressionTest<M, C, V3>(
result, "pointvar", colorTable, "filter/contour-uniform.png");
}
void TestContourFilterTangle()
......@@ -117,14 +111,9 @@ void TestContourFilterTangle()
result.PrintSummary(std::cout);
C canvas(512, 512);
M mapper;
vtkm::rendering::Scene scene;
auto view = vtkm::rendering::testing::GetViewPtr<M, C, V3>(
result, "nodevar", canvas, mapper, scene, colorTable);
//Y axis Flying Edge algorithm has subtle differences at a couple of boundaries
VTKM_TEST_ASSERT(test_equal_images(view, "contour-tangle.png"));
vtkm::rendering::testing::RenderAndRegressionTest<M, C, V3>(
result, "nodevar", colorTable, "filter/contour-tangle.png");
}
void TestContourFilter()
......
......@@ -52,13 +52,8 @@ void TestPointTransform()
result = vectorMagnitude.Execute(result);
result.PrintSummary(std::cout);
C canvas(512, 512);
M mapper;
vtkm::rendering::Scene scene;
auto view = vtkm::rendering::testing::GetViewPtr<M, C, V3>(
result, "pointvar", canvas, mapper, scene, colorTable, static_cast<vtkm::FloatDefault>(0.0));
VTKM_TEST_ASSERT(test_equal_images(view, "point-transform.png"));
vtkm::rendering::testing::RenderAndRegressionTest<M, C, V3>(
result, "pointvar", colorTable, "filter/point-transform.png");
}
} // namespace
......
......@@ -45,13 +45,8 @@ void TestSplitSharpEdges()
auto result = splitSharpEdges.Execute(dataSet);
result.PrintSummary(std::cout);
C canvas(512, 512);
M mapper;
vtkm::rendering::Scene scene;
auto view = vtkm::rendering::testing::GetViewPtr<M, C, V3>(
result, "pointvar", canvas, mapper, scene, colorTable, static_cast<vtkm::FloatDefault>(0.0));
VTKM_TEST_ASSERT(test_equal_images(view, "split-sharp-edges.png"));
vtkm::rendering::testing::RenderAndRegressionTest<M, C, V3>(
result, "pointvar", colorTable, "filter/split-sharp-edges.png");
}
} // namespace
......
......@@ -68,13 +68,8 @@ void TestStreamline()
result = tube.Execute(result);
result.PrintSummary(std::cout);
C canvas(512, 512);
M mapper;
vtkm::rendering::Scene scene;
auto view = vtkm::rendering::testing::GetViewPtr<M, C, V3>(
result, "pointvar", canvas, mapper, scene, colorTable, static_cast<vtkm::FloatDefault>(0.0));
VTKM_TEST_ASSERT(test_equal_images(view, "streamline.png"));
vtkm::rendering::testing::RenderAndRegressionTest<M, C, V3>(
result, "pointvar", colorTable, "filter/streamline.png");
}
} // namespace
......
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