git.schokokeks.org
Repositories
Help
Report an Issue
SVMCrossVal.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
87b08fd
Branches
Tags
master
SVMCrossVal.git
NIFTI_20090325
expand_nii_scan.m
searchlight ready. missing nifti-image-write support. added timing to FBS
Christoph Budziszewski
commited
87b08fd
at 2009-03-30 17:54:25
expand_nii_scan.m
Blame
History
Raw
% Expand a multiple-scan NIFTI file into multiple single-scan NIFTI files % % Usage: expand_nii_scan(multi_scan_filename, [img_idx], [path_to_save]) % % NIFTI data format can be found on: http://nifti.nimh.nih.gov % % - Jimmy Shen (jimmy@rotman-baycrest.on.ca) % function expand_nii_scan(filename, img_idx, newpath) if ~exist('newpath','var'), newpath = pwd; end if ~exist('img_idx','var'), img_idx = 1:get_nii_frame(filename); end for i=img_idx nii_i = load_nii(filename, i); fn = [nii_i.fileprefix '_' sprintf('%04d',i)]; pnfn = fullfile(newpath, fn); save_nii(nii_i, pnfn); end return; % expand_nii_scan