0001 function [result, cancelled] = brain_file_maker_make_brainfiles_from_standard_model(...
0002 obj, parm, comment)
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026 if ~exist('obj', 'var'), error('obj is a required parameter.'); end
0027 if ~exist('parm', 'var'), error('parm is a required parameter.'); end
0028 if ~exist('comment', 'var'),
0029 comment = '';
0030 end
0031
0032
0033
0034
0035 global vbmeg_inst;
0036 result = FAILURE;
0037 cancelled = true;
0038
0039
0040
0041 proj_root = obj.proj_root;
0042 parm.comment = comment;
0043 parm.std_brain = vbmeg_inst.const.STD_BRAIN_CORTEX_FILE;
0044 parm.spm_normalization_file = obj.spm_norm_file;
0045 parm.analyze_file = ...
0046 [vb_analyze_info_get_file_prefix(obj.analyze_info), '.hdr'];
0047
0048 parm.brain_file = obj.output_brain_file;
0049 parm.area_file = obj.output_area_file;
0050 parm.act_file = obj.output_act_file;
0051
0052
0053 if exist([proj_root, filesep, parm.brain_file], 'file') == 2
0054 res = questdlg('Cortical model file already exists. overwrite?',...
0055 'confirm', 'Yes', 'No', 'Yes');
0056 if strcmp(res, 'No')
0057 cancelled = true;
0058 return;
0059 end
0060 end
0061
0062 h = brain_file_maker_show_wait_dialog;
0063 vb_job_brain_model_std2sbj(proj_root, parm);
0064 brain_file_maker_delete_wait_dialog(h);
0065
0066 result = SUCCESS;
0067 cancelled = false;
0068
0069
0070
0071