change Yokogawa MRI(mm) coordinate to spm Right-hand coord. Vspm_right = vb_yokogawa_mri_to_spm_right(Vyokogawa_mri) --- Input Vyokogawa_mri : NV x 3 Yokogawa MRI(mm) coordinate --- Output Vspm_right : NV x 3 spm Right-hand voxcel coord --- Yokogawa MRI coordinate [Right-hand coordinate] X: Right(191/2) -> Left(-191/2) Y: Front(256/2) -> Back(-256/2) Z: Bottom(-256/2) -> Top(256/2) --- SPM coordinate [Right-hand coordinate] X: Left(-191/2) -> Right(191/2) Y: Back(-256/2) -> Front(256/2) Z: Bottom(-256/2) -> Top(256/2) written by M Osako 2006-06-14 Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function Vspm_right = vb_yokogawa_mri_to_spm_right(Vyokogawa_mri) 0002 % change Yokogawa MRI(mm) coordinate to spm Right-hand coord. 0003 % Vspm_right = vb_yokogawa_mri_to_spm_right(Vyokogawa_mri) 0004 % --- Input 0005 % Vyokogawa_mri : NV x 3 Yokogawa MRI(mm) coordinate 0006 % --- Output 0007 % Vspm_right : NV x 3 spm Right-hand voxcel coord 0008 % 0009 % --- Yokogawa MRI coordinate 0010 % 0011 % [Right-hand coordinate] 0012 % X: Right(191/2) -> Left(-191/2) 0013 % Y: Front(256/2) -> Back(-256/2) 0014 % Z: Bottom(-256/2) -> Top(256/2) 0015 % 0016 % --- SPM coordinate 0017 % 0018 % [Right-hand coordinate] 0019 % X: Left(-191/2) -> Right(191/2) 0020 % Y: Back(-256/2) -> Front(256/2) 0021 % Z: Bottom(-256/2) -> Top(256/2) 0022 % 0023 % written by M Osako 2006-06-14 0024 % 0025 % Copyright (C) 2011, ATR All Rights Reserved. 0026 % License : New BSD License(see VBMEG_LICENSE.txt) 0027 0028 0029 0030 Vspm_right = Vyokogawa_mri/1000; 0031 Vspm_right(:,1) = -Vspm_right(:,1); 0032 Vspm_right(:,2) = -Vspm_right(:,2); 0033