[Insight-users] how to construct affine registration matrix from registration

pinpress sb_ji at yahoo.com
Mon Oct 27 20:23:29 EDT 2008


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: 

  // Software Guide : BeginCodeSnippet
  OptimizerType::ParametersType finalParameters =
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' = 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). 

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? 

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



More information about the Insight-users mailing list