[Insight-users] ResampleImageFilter
Luis Ibanez
luis.ibanez@kitware.com
Mon, 18 Nov 2002 12:08:45 -0500
Hi Mark,
During a registration process, the Transform that
is computed by ITK methods is the one mapping points
from the fixed-image space into the moving-image
space.
That is, if you take on pixel P in the fixed image,
and you want to obtain the coordinates of the
corresponding matching pixel P' on the moving image,
you can take the transform T resulting from the
registration process and compute T(P). The point P'
will be the result of the mapping: P' = T( P ).
If what you want to achieve with the ResampleImageFilter
is to convert the moving-image into the reference frame
of the fixed-image, you may have to provide the Inverse
transform to the ResampleImageFilter. This can be easily
done by invoking the GetInverse() method in the Rigid3D
transform.
The GetInverse() method will compute the inverse rotational
matrix and reverse the translations for you. So it should
be as simple as:
resampleImageFilter->SetTransform( transform->GetInverse() );
This seems to be a frequent source of confusion....
Please let us know if you have further question.
Thanks
Luis
================================================
Mark Hastenteufel wrote:
> Hallo everybody!
>
> I've a question concerning the ResampleImageFilter.
> I want to apply a Rigig3D transformation to an
> object (image).
>
> So I used the ResampleImageFilter and set the
> transform to Rigid3D. But the result isn't what
> I expected. The ResampleImageFilter does a backward
> transformation, that means f.e. a translational part
> of (10,10,10) becomes (-10,-10,-10). I think that
> is due to Registration framework, where the moving
> Image is transformed (backward) to the fixed image.
>
> What is the best way to apply a "forward" Rigid3D
> transformation to an object. Should a use the inverse
> offset as well the inverse rotation matrix or are
> there other ways?
>
>
> Thanks in advance,
>
> Mark
>
>
>