[Insight-users] Re: Re:Affine Transformation...

Luis Ibanez luis . ibanez at kitware . com
Fri, 09 Aug 2002 10:07:30 -0400


Hi cspl,

The values in your Matrix are surprisingly big !

For a Rigid transformation they should be in the
range [-1:1] since they results from products of
sinus and cosinus.

In an Affine transform you can have any value
since anisotropic scaling and shering are possible,
However, factors of 8 and 4 is quite significant.

Here is what you are doing to your pixels:

    x' = 1.0*x  + 1.0*y + 1.0*z   +  1.0
    y' = 1.0*x  + 0.0*y + 8.0*z   +  2.0
    z' = 4.0*x  + 4.0*y + 1.0*z   +  0.0

It is pretty easy to put the image out of the
range of the output image with such transformation

An easy way to follow what is happening is to
repeat your filtering by progressively changing
the values of you matrix from the set that gives
you an output to the set that produce no output.

The resulting sequence of image will probably
show you how the mapped image is sliding out of
the frame of the output image.


   Luis


==========================
cspl wrote:

> Dear Luis,
>  Here I am enclosing the matrix values for which I could get the output and
> not get the output.
> 
> //Output
>  vector2[0] = 1.0;
>  vector2[1] = 2.0;
>  vector2[2] = 0.0;
>  matrix2[0][0] = 1.0;
>  matrix2[0][1] = 1.0;
>  matrix2[0][2] = 1.0;
>  matrix2[1][0] = 1.0;
>  matrix2[1][1] = 8.0;
>  matrix2[1][2] = 8.0;
>  matrix2[2][0] = 0.0;
>  matrix2[2][1] = 0.0;
>  matrix2[2][2] =1.0;
> 
> //No Output
>  vector2[0] = 1.0;
>  vector2[1] = 2.0;
>  vector2[2] = 0.0;
>  matrix2[0][0] = 1.0;
>  matrix2[0][1] = 1.0;
>  matrix2[0][2] = 1.0;
>  matrix2[1][0] = 1.0;
>  matrix2[1][1] = 0.0;
>  matrix2[1][2] = 8.0;
>  matrix2[2][0] = 4.0;
>  matrix2[2][1] = 1.0;
>  matrix2[2][2] =1.0;
> 
> Regards,
> CSPL