Thanks, that helps a lot! zrinka On Tuesday, July 16, 2002, at 11:00 PM, Mark Jenkinson wrote: > Hi, > > There are, unfortunately, lots of different conventions in how to > interpret > coordinates and transformation parameters and matrices. No two pieces > of software (to my knowledge) adopt the same conventions, so it is never > safe to compare matrices, transformation parameters or even coordinates > between methods. > > The details of the matrix stored in the .mat files is described below. > If the resulting images look the same though, it is likely that they > have indeed > had the same transformation applied to them. > In flirt version 4.0 and above there is a -paddingsize which allows you > to adjust > how much of the top and bottom of the brain to "keep". > > All the best, > Mark > > > > The coordinates that flirt uses are not defined with respect to anatomy > but with respect to data storage block. That is, when going through > the data block byte by byte, the coordinates are: (0,0,0) then (1,0,0) > then (2,0,0) then ... then (0,1,0) then (1,1,0) then ... (0,0,1) then > (1,0,1) then ... etc. > So, the position in the data block of a voxel coordinate (x,y,z) is > given > by (x + N_x * (y + N_y * z)) where (N_x,N_y,N_z) are the number of > voxels in the x, y and z directions. Note that x is always in the > range 0 to (N_x - 1), and similarly for y and z. > > Consequently, the orientation of the axes with respect to the anatomy > depends on the type of scanning and reslicing that's been done (e.g. > axial or coronal or sagittal acquistions) > > This defines the *voxel* coordinate conventions. > However, the matrices always use mm coordinates. > These are defined as the voxel coordinates multiplied by the voxel > dimensions. > > For example, if the voxel coordinate of interest was (30,20,10) and > the voxel dimensions were (4,4,6) mm then the mm coordinate would be > (120,80,60) mm. FLIRT uses mm coordinates in all images so that the > voxel dimensions and FOV do not need to be stored in the transformation > matrix. > > So, a flirt matrix represents the transformation: > new mm coordinates = matrix * old mm coordinates > where each coordinate is represented by as a standard homogeneous > coordinate column vector (i.e. [ x_mm y_mm z_mm 1 ]' ) > > > > > > Zrinka Bilusic wrote: > >> hi, >> I am trying to register two structurals and I am actually comparing >> FLIRT to AIR (alignlinear and reslice). I can display the >> transformation >> matrix from air in mm/rad but when I look at the *.mat file from FLIRT >> the numbers are quite different. The results are more or less the same >> except that AIR takes off more brain from the bottom as well as from >> the >> top. What are the units for the matrix in *.mat file? >> >> Thanks! >> >> Zrinka Bilusic-Vezmar >> UCLA Brain Mapping > > Zrinka Bilusic-Vezmar UCLA Brain Mapping 660 Charles Young Drive South Los Angeles, CA 90095 310-794-5060 [log in to unmask] www.brainmapping.org