[Insight-users] WarpImageFilter
Luis Ibanez
luis.ibanez@kitware.com
Mon, 10 Feb 2003 13:07:37 -0500
Hi Lara,
The code of the WarpImageFilter is
relatively simple.
Looking at it, it seems that the potential
suspects are the spacing and origin of your
image.
This filter has a similar behavior to the
ResampleImageFilter.
Please make sure that you are calling
SetOutputOrigin()
SetOutputSpacing()
in the filter, before calling Update().
Also make sure that the spacing and origin
in your input image are set correctly.
For practical purposes you may see the
WarpImageFilter as a variation of the
ResampleImageFilter. The difference being
that it supports a deformation field instead
of a transform.
As the ResampleImageFilter, all the mapping
is done in spatial coordinates as opposed to
pixel coordinates. In order to do this consistently
you have to make sure that both input and output
have the spacing an origin well defined.
My quess is that you are mapping the output image
out of the spatial region where the input image
is defined.
Please let us know what you find.
Thanks
Luis
----------------------------
Lara Vigneron wrote:
> Dear all,
>
> I have a program to deform an image which includes the ITK
> WarpImageFilter (2 inputs: the input image, which one wants to deform,
> and the deformation field image). The program seems to run correctly.
> However, the output we obtain is a "zero image" (black). Is anyone
> experiencing the same or a similar problem with that filter? Can someone
> explain what is going on?
>
> Thanks for your answer,
>
> Lara
>
> --
> Lara VIGNERON
>
> Signal Processing Group
>
> University of Liege
> Institut Montefiore
> Sart-Tilman, Batiment B28
> B-4000 Liege
> BELGIUM
>
> Tel: +32-(0)4-366.26.42
> Fax: +32-(0)4-366.29.84
> Lara.Vigneron@ulg.ac.be
>
>