[Insight-users] Transform point in LandmarkWarping2.cxx ?

M Miller croow at yahoo.com
Fri Feb 4 00:03:28 EST 2011


Thanks for your reply.
In particular I'm having trouble using the LandmarkWarping2 sample to transform 
a 2D point. Looking at the code it appears to me that the class 
DeformationFieldSource, which derives from ImageSource and not from Transform, 
does all the transforming work. It appears to me that DeformationFieldSource 
does not publicly implement TransformPoint.

Could you show me an example of using DeformationFieldSource to transform a 
point, or edits to LandmarkWarping2.cxx that would transform a point?

Thanks.



----- Original Message ----
From: Dan Mueller <dan.muel at gmail.com>
To: M Miller <croow at yahoo.com>
Cc: insight-users at itk.org
Sent: Tue, February 1, 2011 2:54:11 AM
Subject: Re: [Insight-users] Transform point in LandmarkWarping2.cxx ?

Hi,

All transforms implement the method TransformPoint, which transforms a
given input point (see Code/Common/itkTransform.h).

Moreover, all transform implement GetInverse which returns a boolean
indicating if the transform is reversible. If reversible, the
GetInverseTransform method can be used to obtain the inverse
transform. You will have to check if your transform supports this
inverse functionality (unfortunately I believe most
deformable/non-rigid transforms do not yet support this).

You may also be interested in the following Insight Journal article:
    Inverting deformation fields using a fixed point iteration scheme
    http://www.insight-journal.org/browse/publication/768

HTH

Cheers, Dan

On 1 February 2011 03:03, M Miller <croow at yahoo.com> wrote:
> I've had success following the LandmarkWarping2.cxx sample to transform my 2D
> images. Is there a way to use this same technique to transform 2D points?
>
> What about transforming in both directions (floating -> fixed; fixed ->
> floating)?
>
>
> Thanks



      


More information about the Insight-users mailing list