0001 function dmri_mrview(struct_file)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 if nargin ~= 1
0021 error('Please check input argument.');
0022 end
0023 if exist(struct_file, 'file') ~= 2
0024 error('Specified file not found.');
0025 end
0026
0027
0028
0029
0030 nii_created = false;
0031 if strcmpi(struct_file(end-6:end), '.nii.gz')
0032 unzip_struct_file = strrep(struct_file, '.nii.gz', '.nii');
0033 if exist(unzip_struct_file, 'file') ~= 2
0034 nii_created = true;
0035 system(['gunzip -c -d ', struct_file ' > ' unzip_struct_file]);
0036 end
0037 struct_file = unzip_struct_file;
0038 end
0039
0040 dmri_system(['mrview ', struct_file, ' -debug'], '-echo');
0041
0042 if nii_created
0043 delete(unzip_struct_file);
0044 end
0045