function [Out]=generate_fig3(dataset,DF,params)
% This code is a part of
%--------------------------------------------------------------------------
% [1]  Joy A, Paul J S. "Multi-channel MR Image Reconstruction using
%      Statistically Optimized Non-Linear Diffusion", Magnetic Resonance in 
%      Medicine, June 2017, doi:10.1002/mrm.26774.
% Email: ajin.joy@iiitmk.ac.in, j.paul@iiitmk.ac.in
%
% Coded by : Ajin Joy on March 2017
%--------------------------------------------------------------------------
Out   = cell(1,5);
tmp   = cell(1,6);
scale = [.2,.3,.5,.7,1,1.5].^2;
fprintf('Generating plot.. dataset')
for i=1:5
    for j=1:6
        fprintf('%d %d/%d',i,j,numel(scale));
        params.scale = scale(j);
        OutNL        = NLdiffusionMRI_stripped(dataset{i}.I,dataset{i}.mask,DF,params);
        tmp{j}       = OutNL.err;
        if j<6, fprintf(repmat('\b',1,5)); end
    end
    fprintf('\nGenerating plot.. dataset');
    Out{i} = tmp;
end
fprintf(repmat('\b',1,25));