No subject


Sun Oct 26 02:42:03 EDT 2008


matrix is set up correctly. But the part in brackets means the other way =
of sorting.

My understanding (maybe I'm wrong):

parameters: 1 2 3 4

column-major order:

1 3
2 4

column index varies the fastest:

1 2
3 4

A way to get the correct matrix could be to instantiate a new =
itkAffineTransform and call SetParameters() with your parameters array. =
If you now call GetMatrix() you should get the correct matrix. Maybe you =
could also have a look on how the matrix is updated internally after =
SetParameters() to understand how to set up your own matrix from the =
parameters array.

Best regards,
Daniel

---

Dipl.-Inform. Med. Daniel Stein
German Cancer Research Center
Div. Medical and Biological Informatics
Im Neuenheimer Feld 280
D-69120 Heidelberg, Germany
Phone:  (+49) 6221/42-3547
Fax:    (+49) 6221/42-2345
http://www.dkfz-heidelberg.de/de/mbi/
Homepage: http://www.dkfz-heidelberg.de/de/mbi/people/Daniel_Stein.html



-----Urspr=FCngliche Nachricht-----
Von: insight-users-bounces at itk.org im Auftrag von pinpress
Gesendet: Di 28.10.2008 01:23
An: insight-users at itk.org
Betreff: [Insight-users] how to construct affine registration matrix =
from registration
=20

Hi,

I was able to run Registration Example code ImageRegistration9.cxx to
perform affine registration between two 3D image volumes (I had to =
modify
the variable "Dimension" in the code to "3").  However, I have some =
problems
interpreting the return results. After registration, there is one line =
of
code:=20

  // Software Guide : BeginCodeSnippet
  OptimizerType::ParametersType finalParameters =3D
registration->GetLastTransformParameters();

Basically it retrieves the latest parameters, which is composed of 12
values: finalParameters[0] through [11] for 3D data set. My question is, =
how
do I construct the affine transformation matrix A that establishes the
relationship of: P' =3D A*P in the physical space? Is it true that the =
first 3
of the 12 values are the first 3 value of the first column of A (i.e.,
A(1:3, 1); and the second 3 of the 12 values are A(1:3,2), and the third =
3
of the 12 values are A(1:3,3); while the last 3 values are A(1:3,4)? In
other words, the first 9 values are really A(1:3, 1:3) specifying the
rotation, scaling, shearing, while the last 3 values are translation =
A(1:3,
4). The last row of A is just (0 0 0 1).=20

However, when I used the above understanding to transform segmented =
contour
lines from the moving image to the fixed image, it does not match the =
same
feature, which really questions whether my understanding of A is correct =
or
not. Also, I assume that the units of the translation should be in =
physical
units, i.e., in mm, right?=20

Thanks a lot for your help here.=20
--=20
View this message in context: =
http://www.nabble.com/how-to-construct-affine-registration-matrix-from-re=
gistration-tp20199253p20199253.html
Sent from the ITK - Users mailing list archive at Nabble.com.

_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list