david.gobbi at gmail.com
Mon Nov 19 11:21:16 EST 2018
Take a look at the subclasses of vtkWarpTransform shown here:
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:
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
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,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers