-
Notifications
You must be signed in to change notification settings - Fork 6
/
getMappingPointsWithinWoI.m
41 lines (39 loc) · 1.34 KB
/
getMappingPointsWithinWoI.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
function iPoint = getMappingPointsWithinWoI( userdata )
% GETMAPPINGPOINTSWITHINWOI Returns the indices of the mapping points with
% annotated local activation time within the window of interest
%
% Usage:
% iPoint = getMappingPointsWithinWoI( userdata )
% Where:
% userdata - see importcarto_mem
% iPoint - logicla array list of valid points; indexes into userdata.electric
%
% GETMAPPINGPOINTSWITHINWOI Returns the indices of the mapping points with
% annotated local activation time within the window of interest
%
% Author: Steven Williams (2020) (Copyright)
% SPDX-License-Identifier: Apache-2.0
%
% Modifications -
%
% See also GETMAPPINGPOINTSWITHINMESH
%
% Info on Code Testing:
% ---------------------------------------------------------------
% iPoint = getMappingPointsWithinWoI( userdata );
% ---------------------------------------------------------------
%
% ---------------------------------------------------------------
% code
% ---------------------------------------------------------------
referenceAnnot = userdata.electric.annotations.referenceAnnot;
woi = userdata.electric.annotations.woi;
woi = woi + [referenceAnnot referenceAnnot];
mapAnnot = userdata.electric.annotations.mapAnnot;
iPoint = true(size(mapAnnot));
for i = 1:numel(mapAnnot)
if mapAnnot(i)<woi(i,1) || mapAnnot(i)>woi(i,2)
iPoint(i) = false;
end
end
end