0001 function weights = prt_cfg_weights
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 infile = cfg_files;
0013 infile.tag = 'infile';
0014 infile.name = 'Load PRT.mat';
0015 infile.filter = 'mat';
0016 infile.num = [1 1];
0017 infile.help = {['Select PRT.mat (file containing data/design/models ',...
0018 'structure).']};
0019
0020
0021
0022
0023 model_name = cfg_entry;
0024 model_name.tag = 'model_name';
0025 model_name.name = 'Model name';
0026 model_name.help = {'Name of a model. Must correspond with one ' ...
0027 'specified in ''Run model'' and ''Specify model'''...
0028 'batch modules.' };
0029 model_name.strtype = 's';
0030 model_name.num = [1 Inf];
0031
0032
0033
0034
0035 img_name = cfg_entry;
0036 img_name.tag = 'img_name';
0037 img_name.name = 'Image name (optional)';
0038 img_name.help = {['Name of the file with weights (optional). If left empty ',...
0039 ' an automatic name will be generated.']};
0040 img_name.strtype = 's';
0041 img_name.num = [0 Inf];
0042 img_name.val = {''};
0043
0044
0045
0046
0047 weights = cfg_exbranch;
0048 weights.tag = 'weights';
0049 weights.name = 'Compute weights';
0050 weights.val = {infile model_name img_name};
0051 weights.help = {[
0052 'Compute weights. This module computes the linear weights of a classifier ',...
0053 'and saves them as a 4D image. 3 dimensions correspond to the image dimensions specified in ',...
0054 'the second-level mask, while the extra dimension corresponds to the number of folds. ',...
0055 'There is one 3D weights image per fold.']};
0056 weights.prog = @prt_run_weights;
0057 weights.vout = @vout_data;
0058
0059
0060 function cdep = vout_data(job)
0061
0062
0063 cdep(1) = cfg_dep;
0064 cdep(1).sname = 'PRT.mat file';
0065 cdep(1).src_output = substruct('.','files');
0066 cdep(1).tgt_spec = cfg_findspec({{'filter','mat','strtype','e'}});
0067