> I have read “Understanding fnirt displacements” (Dec 2010) in mail lists. In that mail, you mentioned that
> (1)“if we assume (x,y,z) are in "mm coordinates" and corresponds to the index (i,j,k) in the reference image , then the transform is given by
> (x',y',z',1).T() = A.inv()*(x,y,z,1).T() + (d_x(i,j,k),d_y(i,j,k),d_z(i,j,k),0).T()”
> Where A.inv() denotes the inverse of the affine matrix.
> But in FSL website, the nonlinear transformation is given by
> (x',y',z',1).T() = A*(x,y,z,1).T() + (dx,dy,dz,0).T()
> What’s the difference of the two formulas?
They are really no different in the sense that A in the second formulation could signify A.inv in the former. In both cases it is an affine transform.
If we assume that A is the matrix given by flirt then A.inv is the correct formulation. It is for "historical reasons" that the affine matrix written by flirt is the inverse of that actually used in the internal calculations.
> (2)“A.inv() denotes the inverse of the affine matrix stored in the header of the warp file. An easier option is to use the --withaff option when you run fnirtfileutils, which means that the affine component gets added to the displacements.”
> Is ‘A’ the same as the 4*4 affine matrix derived from ‘flirt’?