function [hdr,otherendian] = ica_read_hdr(fname)
% Read (SPM customised) Analyze header
% fname       - .hdr filename
% hdr         - structure containing Analyze header
% otherendian - byte swapping necessary flag
%_______________________________________________________________________
% Copyright (C) 2005 Wellcome Department of Imaging Neuroscience

% John Ashburner
% $Id: spm_read_hdr.m 112 2005-05-04 18:20:52Z john $
neuromark_defaults;
% global  NIFTI_GZ;
% global GZIPINFO;
 
% if (isempty(NIFTI_GZ))
%     NIFTI_GZ = 1;
% end
 


otherendian = 0;
fname = deblank(fname);
% if (strcmpi(fname(end-2:end), '.gz'))
%     if (~NIFTI_GZ)
%         hdr = read_gzip_nii(fname, 'read_hdr_only', 1);
%         return;
%     else
%         try
%             temporary_gz_dir = GZIPINFO.tempdir;
%         catch
%             temporary_gz_dir = tempdir;
%         end
%         gzfn = gunzip (fname, temporary_gz_dir);
%         orig_gzfn = char(gzfn);
%         fname = orig_gzfn;
%     end
% end


nf = nifti(fname);
hdr = nf.hdr;
hdr.dime.dim = hdr.dim;
otherendian = [];


