[vtkusers] vtkLandmarkTransform incorrect results?

Wes Turner wes.turner at kitware.com
Fri Nov 13 13:23:50 EST 2009


David,

I didn't use your Paraview plug in, but I did run this by hand using the
vtk.exe Tcl/Tk environment.  After reading in the two files, generating a
landmark transform, setting the Source/TargetLandmarks to the source and
target points, setting the transform type to Affine, and updating, I get the
following matrix:


% [l GetMatrix] Print
vtkMatrix4x4 (0780E5D0)
  Debug: Off
  Modified Time: 54371
  Reference Count: 1
  Registered Events:
    Registered Observers:
      vtkObserver (077E6A88)
        Event: 2
        EventName: DeleteEvent
        Command: 077E69D8
        Priority: 0
        Tag: 1
  Elements:
    0.5 0 0 0
    -5.12758e-012 1 -8.20414e-011 -5
    0 0 1 0
    0 0 0 1

It is within 10e-11 of the exact answer.  This was using all 21 points of
the source and target PolyDatas.  I am fairly confident saying that any
problem isn't within the vtkLandmarkTransform ...

- Wes

On Thu, Nov 12, 2009 at 6:09 PM, David Doria
<daviddoria+vtk at gmail.com<daviddoria%2Bvtk at gmail.com>
> wrote:

> On Tue, Nov 10, 2009 at 2:57 PM, David Gobbi <david.gobbi at gmail.com>
> wrote:
> > On Tue, Nov 10, 2009 at 11:59 AM, David Doria <daviddoria+vtk at gmail.com<daviddoria%2Bvtk at gmail.com>>
> wrote:
> >> On Tue, Nov 10, 2009 at 11:06 AM, David Gobbi <david.gobbi at gmail.com>
> wrote:
> >>> Hi David,
> >>>
> >>> The vtkLandmarkTransform requires that the two sets of vtkPoints are
> >>> homologous with each other, i.e. they must each represent the same set
> >>> of landmarks listed in the same order.  Using it to register polydata
> >>> by taking the points from each data set is a bad idea, since the
> >>> points are probably not going to be homologous.  You should use
> >>> iterative closest point instead.
> >>>
> >>>    David
>
> David,
>
> Here is a good example:
> http://www.rpi.edu/~doriad/Paraview_List/LandmarkFilter/Data/
>
> If you use Source.vtp for both the Source Dataset AND the Source
> Landmarks (because we want to use all of the points anyway)
>
> and use Target.vtp for Target Landmarks, you will see that the
> resulting alignment is way off.
>
> Source.vtp was generated FROM Target.vtp by scaling it [2,1,1] and
> then translating it [0,5,0]. The resulting inverse transformation
> should then be
>
>    1.0000         0         0   -5.0000
>         0    0.5000         0         0
>         0         0    1.0000         0
>         0         0         0    1.0000
>
> Please let me know what you find.
>
> Thanks,
>
> David
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



-- 
Wesley D. Turner, Ph.D.
Kitware, Inc.
Technical Leader
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4920
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091113/dc7c72ad/attachment.htm>


More information about the vtkusers mailing list