-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdoCvMapping_CosineFit.m
More file actions
48 lines (43 loc) · 1.66 KB
/
doCvMapping_CosineFit.m
File metadata and controls
48 lines (43 loc) · 1.66 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
function [cv, cvX, interpCv] = doCvMapping_CosineFit( userdata, int )
% DOCVMAPPING_COSINEFIT Calculates conduction velocities using
% triangulation of electrode activation times
%
% Usage:
% [cv, cvX, interpCv] = doCvMapping_CosineFit( userdata, int )
% Where:
% userdata - see importcarto_mem
% int - see openEpDataInterpolator.m
% cv - the calculated conduction velocity data, in m/s
% cvX - the Cartesian co-ordinates at which conduction velocity data
% has been calculated. size(cvX) = [length(cv), 3].
% interpCv - conduction velocity data interpolated across the surface of
% the shell.
% size(interpCv) = [length(userdata.surface.triRep.X), 1].
%
% DOCVMAPPING_COSINEFIT Calculatess conduction velocities using
% cosine fit technique
%
% Author:
% SPDX-License-Identifier: Apache-2.0
%
% Modifications -
%
% Info on Code Testing:
% -----------------------------------s----------------------------
%
% ---------------------------------------------------------------
%
% ---------------------------------------------------------------
% code
% ---------------------------------------------------------------
% first perform global interpolation using cosine fit to
% calculate conduction velocities
% TODO
% accept only those conduction velocity values in proximity to electrodes?
% TODO. We should in some way limit cv and cvX only to values that are
% likely to be real; i.e. in close proximity; or at; mapping points.
% now do interpolation, using the interpolator specified, so we have a full
% dataset at each of the mesh nodes.
vtx = getVertices(userdata, 'used', false);
interpCv = int.interpolate(X, cv, vtx);
end