function [d]=fmris_read_minc(file,Z,T) file_l = length(file); sep = '/'; sep_list = findstr(file,sep); if ~isempty(sep_list) d.file_path = file(1:sep_list(length(sep_list))); d.file_name = file((sep_list(length(sep_list))+1):length(file)); else d.file_path = [pwd sep]; d.file_name = file; end d.dim = fliplr(miinquire(file,'imagesize')'); d.dim = d.dim + (d.dim == 0); if nargin == 1 Z = 1:d.dim(3); T = 1:d.dim(4); end if (T~=0)|(Z~=0) %if T == 1 if d.dim(4)==1 images = mireadimages(file,Z-1); else images = mireadimages(file,Z-1,T-1); end d.data = reshape(images,[d.dim(1:2) length(Z) length(T)]); d.calib = [min(min(min(min(d.data)))) max(max(max(max(d.data))))]; end [x_vox, y_vox, z_vox] = miinquire(file,'attvalue','xspace','step','attvalue','yspace','step','attvalue','zspace','step'); d.vox = [x_vox y_vox z_vox]; d.vox_units = ''; d.vox_offset = 0; d.precision = ''; d.calib_units = ''; [x_origin, y_origin, z_origin] = miinquire(file,'attvalue','xspace','start','attvalue','yspace','start','attvalue','zspace','start'); d.origin = [x_origin y_origin z_origin]; d.descrip = ''; return;