[Mne_analysis] raw.info.dev_head_t.trans
Matti Hamalainen
msh at nmr.mgh.harvard.edu
Mon Sep 29 19:55:45 EDT 2008
Hi Elena,
On Sep 29, 2008, at 4:20 PM, elena at nmr.mgh.harvard.edu wrote:
> Hi
>
> In raw data Matlab structure
> raw.info.dev_head_t.trans
> have 4 raws and 4 columns:
>
> 0.9974 -0.0710 0.0093 -0.0008
> 0.0704 0.9964 0.0482 -0.0100
> -0.0127 -0.0474 0.9988 0.0659
> 0 0 0 1.0000
>
> What is the 4th column? Is it the head origin in device coordinates
> (x,y,z
> in meters)?
>
> Thanks,
> Elena
It is actually the device coordinate origin in head coordinates. The
name of the field indicates that it is the transformation from device
to head coordinates. This is, in fact, also coded in the from and to
fields of dev_head_t. If your head coordinate location is x y z given
in meters, you augment this location vector with one to get
r_dev = [x y z 1]'
and then you get
r_head = raw.info.dev_head_t.trans*r_dev;
If you want to transform an orientation with orientation cosines cx,
cy, and cz, you do
ori_dev = [ cx cy cz 0]';
and
ori_head = raw.info.dev_head_t.trans*ori_dev;
because orientation vectors should not be translated.
- Matti
More information about the Mne_analysis
mailing list