⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rest_tal2mni.m

📁 While resting-state fMRI is drawing more and more attention, there has not been a software for its d
💻 M
字号:
function outpoints = rest_tal2mni(inpoints)% Converts coordinates to MNI brain best guess% from Talairach coordinates% FORMAT outpoints = tal2mni(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 MNI points% Matthew Brett 2/2/01dimdim = 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 ACrotn = rest_spm_matrix([0 0 0 0.05]);upz = rest_spm_matrix([0 0 0 0 0 0 0.99 0.97 0.92]);downz = rest_spm_matrix([0 0 0 0 0 0 0.99 0.97 0.84]);inpoints = [inpoints; ones(1, size(inpoints, 2))];% Apply inverse translationinpoints = inv(rotn)*inpoints;tmp = inpoints(3,:)<0;  % 1 if below ACinpoints(:, tmp) = inv(downz) * inpoints(:, tmp);inpoints(:, ~tmp) = inv(upz) * inpoints(:, ~tmp);outpoints = inpoints(1:3, :);if dimdim == 2  outpoints = outpoints';end

⌨️ 快捷键说明

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