[vtkusers] vtkWarpInverseTransformPoint

David Gobbi david.gobbi at gmail.com
Mon Nov 19 11:21:16 EST 2018


Hi RK,

Take a look at the subclasses of vtkWarpTransform shown here:
https://www.vtk.org/doc/nightly/html/classvtkWarpTransform.html

The vtkGridTransform and vtkBSplineTransform subclasses probably already do
what you need, i.e. both of them can be used to invert a 3D displacement
field image.  The vtkGridTransform method is easier to use, while the
vtkBSplineTransform provides a smoother result.

More information about the vtkBSplineTransform is provided at the following
link (use the "Download Paper" button).  In order to use this class, the
displacement field image must be converted into spline coefficients via the
vtkBSplineCoefficients class.  The following code shows how
vtkBSplineCoefficients can be used for this purpose:
https://gitlab.kitware.com/vtk/vtk/blob/master/Filters/Hybrid/Testing/Cxx/TestBSplineTransform.cxx#L158

A description of the implementation of vtkWarpTransform and
vtkGridTransform is provided in the following publication. Apologies for
the paywall.  https://www.ncbi.nlm.nih.gov/pubmed/12631510

Regards,
   David


On Mon, Nov 19, 2018 at 8:57 AM Ruurd Kuiper <ruurd.kuiper at gmail.com> wrote:

> Dear all,
>
> I am trying to understand the vtkWarpTransform
> method vtkWarpInverseTransformPoint, so I can implement it in my own code.
> My goal is to inverse a 3D displacement field image (so 4 dimensions
> including the displacement vector). However, my results are always
> different from the results I get by using the vtk.
>
> I think my problem might be caused either by the way points that reside on
> the borders of the image are handled, or by a misunderstanding of
> TemplateTransformPoint(inverse,deltaP,derivative) (line 145) in
> vtkWarpTransform. I was not able to find the source code in which either of
> this is described. Does anyone have a link to this?
>
> Kind regards,
>
> RK
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181119/588f2584/attachment.html>


More information about the vtkusers mailing list