0001 function [obj] = brain_file_maker_set_parm(obj, parm)
0002
0003
0004
0005
0006
0007
0008
0009
0010 if ~exist('obj', 'var')
0011 error('obj is a required parameter.');
0012 end
0013 if ~exist('parm', 'var')
0014 error('parm is a required parameter.');
0015 end
0016
0017
0018
0019
0020 if isfield(parm, 'analyze_file')
0021 obj.analyze_file = parm.analyze_file;
0022 obj.analyze_info = vb_analyze_info_new(parm.analyze_file);
0023 end
0024
0025
0026 if isfield(parm, 'std_brain')
0027 obj.product_type = 1;
0028 elseif isfield(parm, 'subj_mask')
0029 obj.product_type = 2;
0030 else
0031 error('invalid parameter was specified.');
0032 end
0033
0034
0035 if isfield(parm, 'comment')
0036 obj.comment = parm.comment;
0037 end
0038
0039
0040 if isfield(parm, 'spm_normalization_file')
0041 obj.spm_norm_file = parm.spm_normalization_file;
0042 end
0043
0044
0045 if isfield(parm, 'brain_file')
0046 obj.output_brain_file = parm.brain_file;
0047
0048
0049 global vbmeg_inst;
0050 [p_, f_, e_] = vb_get_file_parts(obj.output_brain_file);
0051 obj.brain_file_output_dir = p_;
0052 obj.brain_file_output_filename = ...
0053 strrep([f_, e_], vbmeg_inst.const.BRAIN_EXTENSION, '');
0054 end
0055 if isfield(parm, 'area_file')
0056 obj.output_area_file = parm.area_file;
0057 end
0058 if isfield(parm, 'act_file')
0059 obj.output_act_file = parm.act_file;
0060 end
0061
0062
0063 if isfield(parm, 'subj_mask')
0064 obj.output_mask_file = parm.subj_mask;
0065 end
0066
0067
0068
0069 guidata(obj.H.figure, obj);
0070
0071 [obj] = brain_file_maker_update_display(obj);
0072
0073
0074
0075
0076 if nargout ~= 1
0077 error('function caller should received obj.');
0078 end