matRad_showQualityIndicators

Purpose ^

matRad display of quality indicators as table

Synopsis ^

function matRad_showQualityIndicators(qi)

Description ^

 matRad display of quality indicators as table
 
 call
   matRad_showQualityIndicators(qi)

 input
   qi: result struct from matRad_calcQualityIndicators

 output
   graphical display of quality indicators in table form   

 References
   -

 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 Copyright 2015 the matRad development team. 
 
 This file is part of the matRad project. It is subject to the license 
 terms in the LICENSE file found in the top-level directory of this 
 distribution and at https://github.com/e0404/matRad/LICENSES.txt. No part 
 of the matRad project, including this file, may be copied, modified, 
 propagated, or distributed except according to the terms contained in the 
 LICENSE file.

 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Cross-reference information ^

This function calls: This function is called by:

Source code ^

0001 function matRad_showQualityIndicators(qi)
0002 % matRad display of quality indicators as table
0003 %
0004 % call
0005 %   matRad_showQualityIndicators(qi)
0006 %
0007 % input
0008 %   qi: result struct from matRad_calcQualityIndicators
0009 %
0010 % output
0011 %   graphical display of quality indicators in table form
0012 %
0013 % References
0014 %   -
0015 %
0016 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0017 %
0018 % Copyright 2015 the matRad development team.
0019 %
0020 % This file is part of the matRad project. It is subject to the license
0021 % terms in the LICENSE file found in the top-level directory of this
0022 % distribution and at https://github.com/e0404/matRad/LICENSES.txt. No part
0023 % of the matRad project, including this file, may be copied, modified,
0024 % propagated, or distributed except according to the terms contained in the
0025 % LICENSE file.
0026 %
0027 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0028 
0029 matRad_cfg = MatRad_Config.instance();
0030 
0031 [env, vStr] = matRad_getEnvironment();
0032     
0033 % Create the column and row names in cell arrays
0034 rnames = {qi.name};
0035 qi = rmfield(qi,'name');
0036 cnames = fieldnames(qi);
0037 for i = 1:numel(cnames)
0038     ix = find(cnames{i}(4:end) == '_');
0039     if ~isempty(ix)
0040         cnames{i}(ix+3) = '.';
0041     end
0042 end
0043 
0044 %To avoid parse error in octave, replace empty qi values with '-'
0045 qi = (squeeze(struct2cell(qi)))';
0046 qiEmpty = cellfun(@isempty,qi);
0047 qi(qiEmpty) = {'-'};
0048 
0049 %since uitable is only available in newer octave versions, we try and catch
0050 try
0051     % Create the uitable
0052     table = uitable(gcf,'Data',qi,...
0053         'ColumnName',cnames,...
0054         'RowName',rnames,'ColumnWidth',{70});
0055     
0056     % Layout
0057     pos = get(gca,'position');
0058     set(table,'units','normalized','position',pos)
0059     axis off
0060 catch ME
0061     matRad_cfg.dispWarning('The uitable function is not implemented in %s v%s.',env,vStr);
0062 end

| Generated by m2html © 2005