forked from e0404/matRad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
matRad_showQualityIndicators.m
62 lines (56 loc) · 1.79 KB
/
matRad_showQualityIndicators.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
function matRad_showQualityIndicators(qi)
% 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.
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
global matRad_cfg; matRad_cfg = MatRad_Config.instance();
[env, vStr] = matRad_getEnvironment();
% Create the column and row names in cell arrays
rnames = {qi.name};
qi = rmfield(qi,'name');
cnames = fieldnames(qi);
for i = 1:numel(cnames)
ix = find(cnames{i}(4:end) == '_');
if ~isempty(ix)
cnames{i}(ix+3) = '.';
end
end
%To avoid parse error in octave, replace empty qi values with '-'
qi = (squeeze(struct2cell(qi)))';
qiEmpty = cellfun(@isempty,qi);
qi(qiEmpty) = {'-'};
%since uitable is only available in newer octave versions, we try and catch
try
% Create the uitable
table = uitable(gcf,'Data',qi,...
'ColumnName',cnames,...
'RowName',rnames,'ColumnWidth',{70});
% Layout
pos = get(gca,'position');
set(table,'units','normalized','position',pos)
axis off
catch ME
matRad_cfg.dispWarning('The uitable function is not implemented in %s v%s.',env,vStr);
end