Trans - a 4x4 affine transformation matrix mapping from voxel coordinates to MNI-mm-coordinates XYZmni = Trans * [XYZvox; 1] Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function Vmni = trans_mni_coord(V, Trans) 0002 0003 % Trans - a 4x4 affine transformation matrix mapping from 0004 % voxel coordinates to MNI-mm-coordinates 0005 % XYZmni = Trans * [XYZvox; 1] 0006 % 0007 % Copyright (C) 2011, ATR All Rights Reserved. 0008 % License : New BSD License(see VBMEG_LICENSE.txt) 0009 0010 NP = size(V,1); 0011 Vmni = Trans * [V'; ones(1,NP)]; 0012 0013 Vmni = Vmni(1:3,:)'; 0014