Hi,
I've got another question concerning this issue:
Is it possible to compute the absolute values for translation (in mm),
rotation (in degrees), shearing (in degrees) and scaling
out of the homogeneus transformation matrix ?
Thanks for help,
Bernd Didinger.
luis hernandez-garcia wrote:
> thanks a lot
>
> -L
>
> On May 24, 2004, at 6:28 PM, Mark Jenkinson wrote:
>
>> Hi,
>>
>>> Amatrix = load ('original2standard')
>>> xyz2 = Amatrix * [ x y z 0]'
>>>
>>> The actual questions:
>>> 1) Should the xyz2 coordinates should be the coordinates for the
>>> same structure after the transformation (ie- registered.img)?
>>
>> Yes, that's right.
>>
>>> 2) is the frame of reference for that rotation the same as the one
>>> in the reference image, the original image (ie- origin, voxel
>>> sizes...), or is it relative to the first voxel in the file?
>>
>> The coordinates are all in mm, not voxels, with 0,0,0 located at the
>> voxel in the lower-left corner of the image (that is, the first voxel
>> in
>> the img file) So, to get mm coordinates from voxel coordinates, just
>> multiply by the appropriate voxel dimensions (in mm).
>>
>>> 3) I should also be able to invert the transformation matrix and go
>>> back and forth between the spaces, no?
>>
>> Yep, as everything is in mm, all you need to do is invert the matrix.
>>
>>> 4) Do all these things hold true in the case of 12DOF
>>> transformations? I'm thinking they should ...
>>
>> Yes, it holds for all DOF.
>>
>>> 5) what is the .xfm file for?
>>
>> They are MEDx transforms (for historical reasons...)
>>
>>> I'm sorry if this is a newbie question...I've been trying to test
>>> these
>>> questions on a synthetic image made up of a few dots but I'm getting
>>> weird results. Maybe I'm using the functions wrong ...
>>
>> Your problems are probably to do with your choice of coordinate
>> unit (mm vs voxels) and coordinate centre/origin. Once these are
>> consistent things should work OK.
>>
>> All the best,
>> Mark
>>
>>
>>
>>
>>> thanks a lot
>>>
>>> -Luis
>>>
>>>
>>>
>>>
>>> --
>>> ( http://www.eecs.umich.edu/~hernan )
|