0001 function import_T1(p)
0002
0003
0004
0005
0006
0007 disp(mfilename);
0008
0009
0010 d = dir(fullfile(p.t1_dicom_dir, ['*', p.t1_dicom_extension]));
0011 input_dicom_file = fullfile(p.t1_dicom_dir, d(1).name);
0012
0013
0014 output_dir = fullfile(p.proj_root, p.t1_dirname);
0015 if exist(output_dir, 'dir') ~= 7
0016 mkdir(output_dir);
0017 end
0018
0019
0020 [t1_nifti_file] = convert_dicom_nifti(input_dicom_file, output_dir);
0021
0022
0023 t1_out_file = fullfile(output_dir, [p.struct_name '.nii']);
0024 movefile(t1_nifti_file, t1_out_file);
0025
0026 disp(sprintf('T1 NIfTI file is created : %s', t1_out_file));