[vtk-developers] RenderWindow sizes for testing (was: is someone working on the bigmac failures?)

Bill Lorensen bill.lorensen at gmail.com
Wed Jul 5 10:59:13 EDT 2017


Folks,

Interesting.

When an image is passed through vtkWindowToImageFilter, the size of
the output image is reduced by 1 in each dimension.

So if you SetSize on a render window,
renderWindow->SetSize(n, m), the saved size will be n-1, m-1.

This has to do with the setting in vtkWindowTiImageFilter:
#define BORDER_PIXEL 2

I'm not sure of the logic using BORDER_PIXEL, but if I define it as 0,
the saved size matches the SetSize.

We can't change vtkWindowToImageFilter since it would break every
regression test.

I can fix the odd baseline issue by setting sizes in the failing tests
that take into account the logic in window to image filter.

Bill


On Mon, Jul 3, 2017 at 2:52 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> There are only 23 tests that have odd sizes and they are all python
> tests, oddly enough.
>
> I'll change them to have even sizes and I'll update the baselines. For
> those tests, I'll delete all baseline versions before I add the new
> one.
>
> Bill
>
>
> On Mon, Jul 3, 2017 at 12:54 PM, Sean McBride <sean at rogue-research.com> wrote:
>> On Fri, 30 Jun 2017 09:56:41 -0400, Shawn Waldon said:
>>
>>>Ping?  Is anyone still working on this?
>>
>> I'm not.  I don't believe we agreed on a plan either.
>>
>> I've asked on the cocoa-dev list and am pretty sure we are stuck with NSWindow's behaviour, which is: round sizes *up* to even integral sizes.
>>
>> David's suggestion of changing the testing system so that it tolerates a 1-pixel difference in the size in the images I agree is probably best, in the short term at least.  Still, if we were starting from scratch, it seems to me that having test output and baselines of identical sizes would be preferable.  Perhaps as tests are maintained, they should be updated to not use odd sizes?
>>
>> I wonder too if we ought to add a log/warning to SetSize() implementations when users of the API provide odd sizes?
>>
>> Sean
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtk-developers
>>
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com



-- 
Unpaid intern in BillsBasement at noware dot com


More information about the vtk-developers mailing list