[vtk-developers] Class design for spline visualizations

Lin M majcjc at gmail.com
Thu Apr 30 20:13:15 EDT 2015


Hi Dr. Thompson,

Is there any dataset for precomputed Bezier interpolation? I'm currently
comparing the result with my manual calculating. In this way I can not test
many examples and it's quite low efficient.

Best,
Lin

On Mon, Apr 27, 2015 at 1:46 PM, David Thompson <david.thompson at kitware.com>
wrote:

> Hi Lin,
>
> > ... I changed the method to compute binomial coefficient from
> vtkMath::Binomial to vtkMath::Factorial using our memoization improvement
> and tried to merge from Lin.Ma/filter-bezier to Spline/filter-bezier.
>
> Great! I can see that you were able to merge to the branch.
>
> > What do you think is the proper thing to do next?
>
> Right now, it looks like TestPatchInterpolation is modifying the array
> holding control point coordinates. I think it would be a good idea to write
> the interpolated points to a separate array and then make the test verify
> that Bernstein polynomial is being computed properly.
>
> There are 2 ways to verify things: value tests and image tests.
>
> 1. Value testing. Interpolate a few different r values on a few different
> sets of control points and compare the resulting point coordinates to
> values you know are good. The comparison must allow for small differences
> due to the differences in floating-point arithmetic implementations on
> different platforms.
>
> 2. Image testing. Plot the interpolated points and compare the rendering
> of the interpolated points to one you have verified is correct. While not
> as accurate as value testing, it can often be easier to debug a failing
> test with a rendered image. VTK provides utilities for comparing images
> (also allowing for small differences due to floating-point math, OpenGL
> implementations, and so on). The image baselines that get compared to your
> test's rendering are stored outside of the git repository to keep the
> repository from getting bloated. Instead, the MD5 sum of the baseline
> images are stored in the git repository and the images are stored
> separately on Kitware's servers, which can be queried to find a file with a
> given MD5 sum.
>
> Please take a look at this documentation on adding test data and baseline
> images to VTK:
>
>
> https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/data.md
>
> and see if you can add an image-based test of the patch interpolation.
>
>         David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150430/48b237f7/attachment.html>


More information about the vtk-developers mailing list