rest_mni2tal.m

来自「While resting-state fMRI is drawing more」· M 代码 · 共 34 行

M
34
字号
function outpoints = rest_mni2tal(inpoints)% Converts coordinates from MNI brain to best guess% for equivalent Talairach coordinates% FORMAT outpoints = mni2tal(inpoints)% Where inpoints is N by 3 or 3 by N matrix of coordinates%  (N being the number of points)% outpoints is the coordinate matrix with Talairach points% Matthew Brett 10/8/99dimdim = find(size(inpoints) == 3);if isempty(dimdim)  error('input must be a N by 3 or 3 by N matrix')endif dimdim == 2  inpoints = inpoints';end% Transformation matrices, different zooms above/below ACupT = rest_spm_matrix([0 0 0 0.05 0 0 0.99 0.97 0.92]);downT = rest_spm_matrix([0 0 0 0.05 0 0 0.99 0.97 0.84]);tmp = inpoints(3,:)<0;  % 1 if below ACinpoints = [inpoints; ones(1, size(inpoints, 2))];inpoints(:, tmp) = downT * inpoints(:, tmp);inpoints(:, ~tmp) = upT * inpoints(:, ~tmp);outpoints = inpoints(1:3, :);if dimdim == 2  outpoints = outpoints';end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?