mfbox_read_spmfiles.m
来自「toolbox for spm 5 for data, model free a」· M 代码 · 共 52 行
M
52 行
function data=mfbox_read_spmfiles(filename)% data=mfbox_read_spmfiles(filename)% read in image data from spm ANALYZE files%% Copyright by Peter Gruber, Fabian J. Theis and Ingo R. Keck% Signal Processing & Information Theory group% Institute of Biophysics, University of Regensburg, Germany% Homepage: http://research.fabian.theis.name% http://www-aglang.uni-regensburg.de%% This file is free software, subject to the % GNU GENERAL PUBLIC LICENSE, see gpl.txtdata = {};%load file infoswarning off allV = spm_vol(filename);warning query alldata.timesteps = 0;data.dim = [0,0];while (1) no_volumes = numel(V); if (no_volumes == 0) return end n = 1; while (all(V(1).dim == V(n).dim)) if (n == no_volumes) break; end, n=n+1; end if (n == no_volumes) break; else questdlg(sprintf('Not all volumes share the same dimensions\nCannot import\n'),'Info','Ok','Ok'); return endendimagedim = V(1).dim; % the new image dimensionsdata.private = V;data.timesteps = no_volumes;data.dim = imagedim;return
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?