-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathreportvolume.m
58 lines (49 loc) · 1.6 KB
/
reportvolume.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
function reportvolume(varargin)
% Volume reporting tools
% Moved out from segment_main by Nisse Lundahl
%Invoke subfunction
macro_helper(varargin{:}); %future macro recording use
feval(varargin{:}); % FEVAL switchyard
%--------------------------
function curve_Callback(no,path,name) %#ok<DEFNU>
%--------------------------
%GUI for reporting the volume curve.
global SET NO DATA
if nargin == 0
no = NO;
end
if nargin <2
path = getpreferencespath;
end
if nargin <3
name = 'lvvolumeplot.png';
end
fig=figure('visible','off');
set(fig,'Name',dprintf('Volume curve'),'numbertitle','off');
t = 1000*((0:(SET(no).TSize-1))*SET(no).TIncr);
h = plot(t,SET(no).LVV,'r.-');
set(h,'linewidth',2);
hold on;
xlim([t(1) t(end)]);
% if (SET(no).EPV(1)>SET(no).LVV(1))
% h = plot(t,SET(no).EPV-SET(no).LVV,'g.-');set(h,'linewidth',2);
% h = plot([t(1) t(end)],[mean(SET(no).EPV-SET(no).LVV) mean(SET(no).EPV-SET(no).LVV)],'g:');
% %set(h,'linewidth',2);
% end;
legend(dprintf('LV volume [ml]'),'location','SouthEast'); %'Myocard volume [ml]','Mean myocard volume [ml]',
hold off;
grid on;
% h = title('Volume versus time');set(h,'fontsize',14);
h = xlabel(dprintf('Time [ms]')); set(h,'fontsize',14);
h = ylabel(dprintf('Volume [ml]')); set(h,'fontsize',14);
set(0, 'currentfigure', fig);
currentFolder = DATA.SegmentFolder;
cd(path)
print(fig,'-dpng', name)
cd(currentFolder)
delete(fig)
%---------------------
function loop_Callback %#ok<DEFNU>
%---------------------
%Reporter for volume loop (not yet implemented)
myfailed('Report volume loop is not yet implemented.');