<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, May 4, 2018 at 1:24 PM, Marcus D. Hanwell <span dir="ltr"><<a href="mailto:marcus.hanwell@kitware.com" target="_blank">marcus.hanwell@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Fri, May 4, 2018 at 9:34 AM, Marcus D. Hanwell <span dir="ltr"><<a href="mailto:marcus.hanwell@kitware.com" target="_blank">marcus.hanwell@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>A while ago I opened issue <a href="https://gitlab.kitware.com/vtk/vtk/issues/17201" target="_blank">https://gitlab.kitware.com/vtk<wbr>/vtk/issues/17201</a> that talked about a bug on Windows where setting the precision to 0 resulted in 6 precision on Windows. There was a test, but it was passing even on Windows, this week we had a new employee start and I thought it would be a good first bug to create a failing test, and then make it pass by addressing the issue.</div><div><br></div><div>I thought that TestAxes was a little crowded, and that had perhaps been enough to throw the image diff off. So he wrote a test that just had this axis in, made a baseline for what was expected, and then changed it so that we could see the test fail. Changing to 6 or 8 is still showing passing test:</div><div><br><img src="cid:ii_jgrzw7zj0_1632b57082296690" width="100" height="100"><img src="cid:ii_jgrzzhzy1_1632b595d87f0c7e" width="100" height="100"><br><br></div><div>This looks like a good difference to me (not sure if we are allowed attachments, but I tried). The ImageError is being shown as 0. We could make the text bigger, but there are a few chart tests where we use text of this size and I thought they would fail with extra numbers like this.</div></div></blockquote><div><br></div></span><div>Digging into this for anyone following, I can change vtkTesting.cxx to use 'rtId->SetAllowShift(0);' which removes the single pixel shift logic, and I get a diff showing my extra digits, as I would expect. We likely have this on for a reason, and the text is pretty tiny, so I could see a nearest neighbor search turning up no difference for every character added.</div><div><br></div><div>As the docs say this is not symmetric - the testing does shoe a diff if the image on the right is the baseline, and the characters get removed.</div></div></div></div>
</blockquote></div><br></div><div class="gmail_extra">Lots of tests fail when this is turned off, we can actually make the text larger and see the expected failure in the axis test. We could redo the TestAxes to use a larger font, or perhaps add an option to disable the pixel shift on a per test basis (I didn't see anything exposing that in the test driver.</div><div class="gmail_extra"><br></div><div class="gmail_extra">It is something people should be aware of, and it is unfortunate our default text size appears to be small enough that obviously different images will show a zero error. Thoughts? Anything we missed when looking into this?</div></div>