forked from e0404/matRad
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmatRad_showQualityIndicators.m
More file actions
61 lines (57 loc) · 1.85 KB
/
Copy pathmatRad_showQualityIndicators.m
File metadata and controls
61 lines (57 loc) · 1.85 KB
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
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.
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if ~isdeployed
matRadRootDir = fileparts(mfilename('fullpath'));
addpath(fullfile(matRadRootDir,'tools'))
end
[env, ~] = 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
switch env
case 'MATLAB'
% Create the uitable
table = uitable(gcf,'Data',(squeeze(struct2cell(qi)))',...
'ColumnName',cnames,...
'RowName',rnames,'ColumnWidth',{70});
% Layout
pos = get(gca,'position');
set(table,'units','normalized','position',pos)
axis off
case 'OCTAVE'
warning('the uitable function is not yet implemented in Octave')
end