-
Notifications
You must be signed in to change notification settings - Fork 6
/
getReferenceAnnotation.m
52 lines (49 loc) · 1.46 KB
/
getReferenceAnnotation.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
function ref = getReferenceAnnotation(userdata, varargin)
% GETREFERENCEANNOTATION Returns the value of the reference annotation
%
% Usage:
% ref = getReferenceAnnotation( userdata )
% Where:
% userdata - see importcarto_mem
% ref - the value of the reference annotation
%
% GETREFERENCEANNOTATION accepts the following parameter-value pairs
% 'iegm' {:} | integer | array
% - The electrogram point(s) for which the reference annotation is
% required
%
% GETREFERENCEANNOTATION Returns the value fo the reference annotation.
%
% Author: Steven Williams (2020) (Copyright)
% SPDX-License-Identifier: Apache-2.0
%
% Modifications -
%
% Info on Code Testing:
% ---------------------------------------------------------------
% woi = getReferenceAnnotation(userdata)
% woi = getReferenceAnnotation(userdata, 'iegm', 1)
% ---------------------------------------------------------------
%
% ---------------------------------------------------------------
% code
% ---------------------------------------------------------------
nStandardArgs = 1;
iEgm = ':';
if nargin > nStandardArgs
for i = 1:2:nargin-nStandardArgs
switch lower(varargin{i})
case 'iegm'
iEgm = varargin{i+1};
end
end
end
ref = [];
if isstr(iEgm) && strcmpi(iEgm, ':')
ref = userdata.electric.annotations.referenceAnnot;
else
for i = 1:numel(iEgm)
ref(i,1) = userdata.electric.annotations.referenceAnnot(iEgm(i),1);
end
end
end