[Insight-users] Problem with wrapping itk

Luis Ibanez luis.ibanez at kitware.com
Tue Dec 1 19:31:01 EST 2009


Alex,

You could also follow a more manual approach,
and

1) Get the final transform parameters from the
    registration class,
2) Set them in the Transform
3) Set the transform in the Resample filter.

This is how most of the registration examples in

           Insight/Examples/Registration

are configured.



(Using WrapITK 2.0, and keeping your current code
would probably be a more elegant solution though..)


       Regards,


                Luis


-------------------------------------------------
On Mon, Nov 30, 2009 at 10:50 PM, alex sando <yejun.alex at gmail.com> wrote:
>         hi all, i was trying the registration examples of ITK using WrapITK,
> but i got a problem....
>        Here is my code:
>
>         registration_object =
> itk.ImageRegistrationMethod[itk.Image.F2,itk.Image.F2].New()
>         #...registration codes...
>         resampler = itk.ResampleImageFilter[itk.Image.F2,
> itk.Image.F2].New()
>         resampler.SetInput(i1)
>         resampler.SetTransform(registration_object.GetOutput().Get())
>
> ~~~~~~~AttributeError: 'str' object has no attribute 'Get'
>         Any suggestions? thanks in advance~~
>
>         alex
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>


More information about the Insight-users mailing list