Skip to content

Commit

Permalink
Per-Contrast RF sensitivity correction mode...
Browse files Browse the repository at this point in the history
Error thrown when no RF sensitivity maps provided for each available
contrast.
  • Loading branch information
EvelyneBalteau committed Sep 19, 2017
1 parent 5a47d16 commit 03daaba
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
10 changes: 10 additions & 0 deletions hmri_create_RFsens.m
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,16 @@
for ccon = 1:rfsens_params.ncon
raw_sens_field = sprintf('raw_sens_%s',rfsens_params.input(ccon).tag);
raw_sens_input = jobsubj.sensitivity.RF_per_contrast.(raw_sens_field);
if isempty(raw_sens_input)
fprintf(1,['\nERROR: when using per-contrast RF sensitivity correction, ' ...
'\nRF sensitivity maps must be provided for each contrast available. '...
'\nNo RF sensitivity map was found for %sw-contrast. Check you properly ' ...
'\nset the RF sensitivity inputs in your batch, or use "Single" mode ' ...
'\nwith a single set of RF sensitivity maps if you don''t have RF' ...
'\nsensitivity data for each contrast.\n'], ...
rfsens_params.input(ccon).tag);
error('Missing RF sensitivity input(s). Aborting.');
end
for csens=1:length(raw_sens_input)
tmprawfnam = spm_file(raw_sens_input{csens},'number','');
tmpfnam{csens} = fullfile(rfsens_params.calcpath,spm_file(tmprawfnam,'filename'));
Expand Down
12 changes: 9 additions & 3 deletions tbx_scfg_hmri_create.m
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,9 @@
sraws3MT.help = {'Select low resolution RF sensitivity maps acquired with the head and body coils respectively, in that order.'};
sraws3MT.filter = 'image';
sraws3MT.ufilter = '.*';
sraws3MT.num = [2 2];
% sraws3MT.num = [2 2];
sraws3MT.num = [0 2];
sraws3MT.val = {''};
% ---------------------------------------------------------------------
% Input images for RF sensitivity - RF sensitivity maps for PDw images
% ---------------------------------------------------------------------
Expand All @@ -261,7 +263,9 @@
sraws3PD.help = {'Select low resolution RF sensitivity maps acquired with the head and body coils respectively, in that order.'};
sraws3PD.filter = 'image';
sraws3PD.ufilter = '.*';
sraws3PD.num = [2 2];
% sraws3PD.num = [2 2];
sraws3PD.num = [0 2];
sraws3PD.val = {''};
% ---------------------------------------------------------------------
% Input images for RF sensitivity - RF sensitivity maps for T1w images
% ---------------------------------------------------------------------
Expand All @@ -271,7 +275,9 @@
sraws3T1.help = {'Select low resolution RF sensitivity maps acquired with the head and body coils respectively, in that order.'};
sraws3T1.filter = 'image';
sraws3T1.ufilter = '.*';
sraws3T1.num = [2 2];
% sraws3T1.num = [2 2];
sraws3T1.num = [0 2];
sraws3T1.val = {''};
% ---------------------------------------------------------------------
% x0 No RF sensitivity
% ---------------------------------------------------------------------
Expand Down

0 comments on commit 03daaba

Please sign in to comment.