niftistruc.m 494 B

123456789101112131415161718
  1. function o = niftistruc(fmt)
  2. % Create a data structure describing NIFTI headers
  3. %__________________________________________________________________________
  4. % Copyright (C) 2005-2017 Wellcome Trust Centre for Neuroimaging
  5. %
  6. % $Id: niftistruc.m 7147 2017-08-03 14:07:01Z spm $
  7. if ~nargin, fmt = 'nifti1'; end
  8. switch lower(fmt)
  9. case {'nifti1','ni1','n+1'}
  10. o = nifti1struc;
  11. case {'nifti2','ni2','n+2'}
  12. o = nifti2struc;
  13. otherwise
  14. error('Unknown format.');
  15. end