forked from LuxImagingAI/FastField
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.m
55 lines (34 loc) · 1.57 KB
/
example.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
% example
% clear all; %close all;
dir_fastfield='/Users/mehri.baniasadi/Documents/GitHub/FastField';
dir_patient = '/Users/mehri.baniasadi/Documents/GitHub/FastField/case_studies/case_study_1';
% Perc is the percentage assigned to each contact
% for segmented electrodes
% 1 is is the bottom contact, 8 is the topest contact
% 2,3,4 are each segment of the second ring from the bottom
% 5,6,7 are each segment of the third ring from the bottom
% for ring elecetrodes
% 1 is the bottom contact then 2 and 3,and 4 the topeset contact;
perc = [50 50 0 0 0 0 0 0];
amp=2.2;
side = 1; % Right is 1, Left is 2
Electrode_type = 'boston_vercise_directed'; %'medtronic_3389'; % 'boston_vercise';'medtronic_3387';
% Electrode_type = 'pins_l303' % 'boston_vercise_directed';
%'stjude_directed_short'; %'stjude_directed_long';
%'stjude_activetip_2mm'; 'stjude_activetip_3mm'
conductivity = 0.1;
Threshold = 200; % the treshold for Efield visualisation
plot_choice = 'vta';%vta_efield
amp_mode = 'mA'; %'mA'; % 'V'
% load resources
[standard_efield,grid_vec,electrode,electrode_patient,atlases] = load_files(dir_fastfield,dir_patient,Electrode_type,amp_mode);
% get the Efield
[Efield,xg,yg,zg,elfv,trans_mat] = fastfield_main(standard_efield,grid_vec,electrode,electrode_patient,perc,amp,side,conductivity,amp_mode);
brain_structures{1} = 'GPi2';
% for t=1:length(atlases.labels{1, 1})
% brain_structures{t} = atlases.labels{1, 1}{t};
% end
figure;
hold on;
plot_elec(elfv,electrode,perc);
plot_efield(Efield,xg,yg,zg,plot_choice,Threshold);