Skip to content

Commit 115c408

Browse files
Merge pull request #25 from mohsalvi/master
UI enhancements
2 parents 5f6a0a2 + 36e282f commit 115c408

File tree

4 files changed

+255
-3
lines changed

4 files changed

+255
-3
lines changed

FECGSYN_UI.m

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,6 +1452,15 @@ function populate_custom_view(p, foetus, ns)
14521452
end
14531453
set(input_noise_1, 'String', num2str(p.SNRfm));
14541454
set(input_noise_2, 'String', num2str(p.SNRmn));
1455+
% grey out the SNRmn if there is no noise source
1456+
if ns > 0
1457+
% if there is a noise source, then share the enable property with
1458+
% the SNRfm field. This makes sure that it stays greyed out when
1459+
% default scenarios are displayed
1460+
set(input_noise_2, 'enable', get(input_noise_1, 'enable'));
1461+
else
1462+
set(input_noise_2, 'enable', 'off')
1463+
end
14551464

14561465
% populate mother params
14571466
set(input_mother_1_1, 'String', num2str(p.mheart(1)));
@@ -1793,11 +1802,11 @@ function cb_run_button(hObject, eventdata)
17931802
fhrstring = ''; mhrstring = ''; mresstring = ''; fresstring = ''; timestring = '';
17941803

17951804
% time
1796-
if param.n/param.fs < 10
1805+
if param.n/param.fs < 15
17971806
param.n = 15000;
17981807
param.fs = 1000;
17991808
timeflag = 1;
1800-
timestring = sprintf('\n Minimum time of simulation = 10 seconds!');
1809+
timestring = sprintf('\n Minimum time of simulation = 15 seconds!');
18011810
end
18021811

18031812
% mhr
@@ -2126,6 +2135,9 @@ function cb_add_noise(hObject,eventdata)
21262135
set(list_noise_sources, 'String', noise_str);
21272136
set(list_noise_sources, 'Value', new_num_noise);
21282137

2138+
% Make SNRmn accessible, as we now have a noise source
2139+
set(input_noise_2, 'enable', 'on')
2140+
21292141
selected_ns = new_num_noise;
21302142

21312143
% Save new foetus in case user switches foetus immediately
@@ -2162,6 +2174,16 @@ function cb_remove_noise(hObject,eventdata)
21622174
set(list_noise_sources, 'Value', selected_ns);
21632175
set(list_noise_sources, 'String', ns_str);
21642176

2177+
% grey out the SNRmn if there is no noise source
2178+
if ~isempty(ns_str)
2179+
% if there is a noise source, then share the enable property with
2180+
% the SNRfm field. This makes sure that it stays greyed out when
2181+
% default scenarios are displayed
2182+
set(input_noise_2, 'enable', get(input_noise_1, 'enable'));
2183+
else
2184+
set(input_noise_2, 'enable', 'off')
2185+
end
2186+
21652187
populate_custom_view();
21662188

21672189
% Make sure the buttons are displayed correctly after this change

GUI/FECGSYN_UI_create_fecg_plots.m

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@
107107
ylabel('Amplitude [NU]');
108108
end
109109

110+
if ee ~= length(el)
111+
set(gca,'xtick',[])
112+
set(gca,'xticklabel',[])
113+
end
114+
110115
if ee == length(el)
111116
xlabel('Time [sec]')
112117
end
@@ -228,6 +233,11 @@
228233
ylabel('Amplitude [NU]');
229234
end
230235

236+
if ee ~= length(el)
237+
set(gca,'xtick',[])
238+
set(gca,'xticklabel',[])
239+
end
240+
231241
if ee == length(el)
232242
xlabel('Time [sec]')
233243
end

GUI/FECGSYN_UI_create_param_structs.m

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@
5252
param = param_struct{1};
5353

5454
param.title = 'Simple';
55-
55+
56+
param.n = 15000;
5657
param.fs = 1000; % sampling frequency [Hz]
5758
if ~isempty(mVCG); param.mvcg = mVCG; end;
5859
if ~isempty(fVCG); param.fvcg = fVCG; end;
@@ -66,6 +67,7 @@
6667

6768
param.title = 'Noise';
6869

70+
param.n = 15000;
6971
param.fs = 1000;
7072
param.ntype = {'MA'}; % noise types
7173
param.noise_fct = {1}; % constant SNR (each noise may be modulated by a function)
@@ -82,6 +84,7 @@
8284

8385
param.title = 'Respiration';
8486

87+
param.n = 30000;
8588
param.fs = 1000;
8689
param.mres = 0.25; % mother respiration frequency
8790
param.fres = 0.8; % foetus respiration frequency
@@ -98,6 +101,7 @@
98101

99102
param.title = 'Foetal movement';
100103

104+
param.n = 30000;
101105
param.fs = 1000;
102106
param.ftraj{1} = 'helix'; % giving spiral-like movement to fetus
103107
if ~isempty(mVCG); param.mvcg = mVCG; end;
@@ -116,6 +120,7 @@
116120
param.mtypeacc = 'nsr';
117121
param.ftypeacc = {'nsr'};
118122

123+
param.n = 30000;
119124
param.fs = 1000;
120125
if ~isempty(mVCG); param.mvcg = mVCG; end;
121126
if ~isempty(fVCG); param.fvcg = fVCG; end;
@@ -167,6 +172,7 @@
167172

168173
param.title = 'Ectopic beats';
169174

175+
param.n = 15000;
170176
param.fs = 1000; % sampling frequency [Hz]
171177
if ~isempty(mVCG); param.mvcg = mVCG; end;
172178
if ~isempty(fVCG); param.fvcg = fVCG; end;
@@ -181,6 +187,7 @@
181187

182188
param.title = 'Multiple pregnancies';
183189

190+
param.n = 15000;
184191
param.fs = 1000;
185192
param.fhr = [120 150];
186193
param.fres = [0 0];

fecgsyn.prj

Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<deployment-project plugin="plugin.ezdeploy" plugin-version="1.0">
3+
<configuration target="target.ezdeploy.standalone" target-name="MATLAB Compiler for Standalone Applications" name="fecgsyn" location="/Users/Mohsalvi/Mohsan/oxford/DPhil_CDT/FECG_GUI/github" file="/Users/Mohsalvi/Mohsan/oxford/DPhil_CDT/FECG_GUI/github/fecgsyn.prj" preferred-package-type="package.type.app" build-checksum="1582656284" preferred-package-location="/Users/Mohsalvi/Mohsan/oxford/DPhil_CDT/FECG_GUI/github/fecgsyn/for_redistribution">
4+
<param.appname>fecgsyn</param.appname>
5+
<param.authnamewatermark>Mohsan S. Alvi</param.authnamewatermark>
6+
<param.email>[email protected]</param.email>
7+
<param.company>University of Oxford</param.company>
8+
<param.icon>${PROJECT_ROOT}/fecgsyn_resources/icon.icns</param.icon>
9+
<param.icons>
10+
<file>${PROJECT_ROOT}/fecgsyn_resources/icon_48.png</file>
11+
<file>${PROJECT_ROOT}/fecgsyn_resources/icon_32.png</file>
12+
<file>${PROJECT_ROOT}/fecgsyn_resources/icon_24.png</file>
13+
<file>${PROJECT_ROOT}/fecgsyn_resources/icon_16.png</file>
14+
</param.icons>
15+
<param.summary>fecgsyngui: A GUI Interface to fecgsyn for Simulation of Maternal-Foetal Activity Mixtures on Abdominal Electrocardiogram Recordings</param.summary>
16+
<param.description>FECGSYN Graphical user interface.
17+
18+
FECGSYN is fruit of the collaboration between the Department of Engineering
19+
Science, University of Oxford (DES-OX) and the Institute of Biomedical Engineering,
20+
TU Dresden (IBMT-TUD). The authors are Joachim Behar (DES-OX), Fernando Andreotti
21+
(IBMT-TUD), Julien Oster (DES-OX), Sebastian Zaunseder (IBMT-TUD) and
22+
Gari Clifford (DES-OX).
23+
24+
The present user interface was contributed by Mohsan Alvi (DES-OX) under
25+
the supervision of Joachim Behar (DES-OX) and Fernando Andreotti (IBMT-TUD).
26+
27+
This program is free software: you can redistribute it and/or modify
28+
it under the terms of the GNU General Public License as published by
29+
the Free Software Foundation, either version 3 of the License, or
30+
(at your option) any later version.
31+
32+
This program is distributed in the hope that it will be useful,
33+
but WITHOUT ANY WARRANTY; without even the implied warranty of
34+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35+
GNU General Public License for more details.
36+
37+
You should have received a copy of the GNU General Public License
38+
along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</param.description>
39+
<param.screenshot>${PROJECT_ROOT}/GUI/FrenchFlag.png</param.screenshot>
40+
<param.version>1.0</param.version>
41+
<param.namespace>fecgsyn</param.namespace>
42+
<param.guid />
43+
<param.installpath.string>/University of Oxford/fecgsyn/</param.installpath.string>
44+
<param.installpath.combo>option.installpath.systemwideapp</param.installpath.combo>
45+
<param.logo>${PROJECT_ROOT}/GUI/FrenchFlag.png</param.logo>
46+
<param.install.notes />
47+
<param.intermediate>${PROJECT_ROOT}/fecgsyn/for_testing</param.intermediate>
48+
<param.output>${PROJECT_ROOT}/fecgsyn/for_redistribution</param.output>
49+
<param.embed.ctf>true</param.embed.ctf>
50+
<param.target.type>subtarget.standalone</param.target.type>
51+
<param.classorg />
52+
<param.web.mcr>true</param.web.mcr>
53+
<param.package.mcr>true</param.package.mcr>
54+
<param.no.mcr>false</param.no.mcr>
55+
<param.web.mcr.name>MyAppInstaller_web</param.web.mcr.name>
56+
<param.package.mcr.name>MyAppInstaller_mcr</param.package.mcr.name>
57+
<param.no.mcr.name>MyAppInstaller_app</param.no.mcr.name>
58+
<param.user.defined.mcr.options />
59+
<param.windows.command.prompt>true</param.windows.command.prompt>
60+
<param.user.only.registration>false</param.user.only.registration>
61+
<param.mads.no.java>false</param.mads.no.java>
62+
<param.mads.exclusive.mcr>false</param.mads.exclusive.mcr>
63+
<param.net.framework>option.net.framework.default</param.net.framework>
64+
<param.assembly.type>false</param.assembly.type>
65+
<param.encryption.key.file />
66+
<param.net.enable.remoting>false</param.net.enable.remoting>
67+
<param.net.tsa.enable>false</param.net.tsa.enable>
68+
<param.net.tsa.assembly />
69+
<param.net.tsa.interface />
70+
<param.net.tsa.namespace>fecgsyn</param.net.tsa.namespace>
71+
<param.net.tsa.superclass />
72+
<param.net.tsa.metadata />
73+
<param.net.tsa.metadata.assembly>/Users/Mohsalvi/Documents/MATLAB</param.net.tsa.metadata.assembly>
74+
<param.create.log>false</param.create.log>
75+
<param.log.file />
76+
<unset>
77+
<param.version />
78+
<param.namespace />
79+
<param.guid />
80+
<param.installpath.string />
81+
<param.install.notes />
82+
<param.intermediate />
83+
<param.output />
84+
<param.embed.ctf />
85+
<param.target.type />
86+
<param.classorg />
87+
<param.web.mcr />
88+
<param.no.mcr />
89+
<param.web.mcr.name />
90+
<param.package.mcr.name />
91+
<param.no.mcr.name />
92+
<param.user.defined.mcr.options />
93+
<param.windows.command.prompt />
94+
<param.user.only.registration />
95+
<param.mads.no.java />
96+
<param.mads.exclusive.mcr />
97+
<param.net.framework />
98+
<param.assembly.type />
99+
<param.encryption.key.file />
100+
<param.net.enable.remoting />
101+
<param.net.tsa.enable />
102+
<param.net.tsa.assembly />
103+
<param.net.tsa.interface />
104+
<param.net.tsa.namespace />
105+
<param.net.tsa.superclass />
106+
<param.net.tsa.metadata />
107+
<param.net.tsa.metadata.assembly />
108+
<param.create.log />
109+
<param.log.file />
110+
</unset>
111+
<fileset.main>
112+
<file>${PROJECT_ROOT}/FECGSYN_UI.m</file>
113+
</fileset.main>
114+
<fileset.resources>
115+
<file>${PROJECT_ROOT}/FECGSYN_UI.m</file>
116+
<file>${PROJECT_ROOT}/GUI/.DS_Store</file>
117+
<file>${PROJECT_ROOT}/GUI/FECGSYN_UI_add_default_params.m</file>
118+
<file>${PROJECT_ROOT}/GUI/FECGSYN_UI_create_electrode_plot.m</file>
119+
<file>${PROJECT_ROOT}/GUI/FECGSYN_UI_create_fecg_plots.m</file>
120+
<file>${PROJECT_ROOT}/GUI/FECGSYN_UI_create_param_structs.m</file>
121+
<file>${PROJECT_ROOT}/GUI/FrenchFlag.png</file>
122+
<file>${PROJECT_ROOT}/GUI/oxlogo_big.png</file>
123+
<file>${PROJECT_ROOT}/GUI/tu_logo.jpg</file>
124+
<file>${PROJECT_ROOT}/LICENSE.txt</file>
125+
<file>${PROJECT_ROOT}/README.md</file>
126+
<file>${PROJECT_ROOT}/fecgsyn.prj</file>
127+
<file>${PROJECT_ROOT}/fecgsyn_resources/icon_16.png</file>
128+
<file>${PROJECT_ROOT}/fecgsyn_resources/icon_24.png</file>
129+
<file>${PROJECT_ROOT}/fecgsyn_resources/icon_32.png</file>
130+
<file>${PROJECT_ROOT}/fecgsyn_resources/icon_48.png</file>
131+
<file>${PROJECT_ROOT}/main_fecg_model.m</file>
132+
<file>${PROJECT_ROOT}/noise_sources/BW.mat</file>
133+
<file>${PROJECT_ROOT}/noise_sources/EM.mat</file>
134+
<file>${PROJECT_ROOT}/noise_sources/MA.mat</file>
135+
<file>${PROJECT_ROOT}/noise_sources/readme</file>
136+
<file>${PROJECT_ROOT}/run_ecg_generator.m</file>
137+
<file>${PROJECT_ROOT}/script_ica_pca.m</file>
138+
<file>${PROJECT_ROOT}/subfunctions/FECGx_kf_PhaseCalc.m</file>
139+
<file>${PROJECT_ROOT}/subfunctions/add_cardiacdipole.m</file>
140+
<file>${PROJECT_ROOT}/subfunctions/add_noisedipole.m</file>
141+
<file>${PROJECT_ROOT}/subfunctions/adjust_mqrs_location.m</file>
142+
<file>${PROJECT_ROOT}/subfunctions/arrow.m</file>
143+
<file>${PROJECT_ROOT}/subfunctions/ecg_model.m</file>
144+
<file>${PROJECT_ROOT}/subfunctions/generate_breathing.m</file>
145+
<file>${PROJECT_ROOT}/subfunctions/generate_ecg_mixture.m</file>
146+
<file>${PROJECT_ROOT}/subfunctions/generate_hrv.m</file>
147+
<file>${PROJECT_ROOT}/subfunctions/jade.m</file>
148+
<file>${PROJECT_ROOT}/subfunctions/load_gparam.m</file>
149+
<file>${PROJECT_ROOT}/subfunctions/mecg_cancellation.m</file>
150+
<file>${PROJECT_ROOT}/subfunctions/phase2qrs.m</file>
151+
<file>${PROJECT_ROOT}/subfunctions/plot3_volume.m</file>
152+
<file>${PROJECT_ROOT}/subfunctions/qrs_detect.m</file>
153+
<file>${PROJECT_ROOT}/subfunctions/rotatexyz.m</file>
154+
<file>${PROJECT_ROOT}/subfunctions/rrprocess.m</file>
155+
<file>${PROJECT_ROOT}/subfunctions/stats.m</file>
156+
<file>${PROJECT_ROOT}/subfunctions/traject_generator.m</file>
157+
<file>${PROJECT_ROOT}/vcg_sets/EctopicBeatGaussians.mat</file>
158+
<file>${PROJECT_ROOT}/vcg_sets/GaussianParam_s0273lre_channel_x.mat</file>
159+
<file>${PROJECT_ROOT}/vcg_sets/GaussianParam_s0273lre_channel_y.mat</file>
160+
<file>${PROJECT_ROOT}/vcg_sets/GaussianParam_s0273lre_channel_z.mat</file>
161+
<file>${PROJECT_ROOT}/vcg_sets/GaussianParam_s0291lre_channel_x.mat</file>
162+
<file>${PROJECT_ROOT}/vcg_sets/GaussianParam_s0291lre_channel_y.mat</file>
163+
<file>${PROJECT_ROOT}/vcg_sets/GaussianParam_s0291lre_channel_z.mat</file>
164+
<file>${PROJECT_ROOT}/vcg_sets/GaussianParam_s0302lre_channel_x.mat</file>
165+
<file>${PROJECT_ROOT}/vcg_sets/GaussianParam_s0302lre_channel_y.mat</file>
166+
<file>${PROJECT_ROOT}/vcg_sets/GaussianParam_s0302lre_channel_z.mat</file>
167+
<file>${PROJECT_ROOT}/vcg_sets/GaussianParam_s0303lre_channel_x.mat</file>
168+
<file>${PROJECT_ROOT}/vcg_sets/GaussianParam_s0303lre_channel_y.mat</file>
169+
<file>${PROJECT_ROOT}/vcg_sets/GaussianParam_s0303lre_channel_z.mat</file>
170+
<file>${PROJECT_ROOT}/vcg_sets/GaussianParam_s0306lre_channel_x.mat</file>
171+
<file>${PROJECT_ROOT}/vcg_sets/GaussianParam_s0306lre_channel_y.mat</file>
172+
<file>${PROJECT_ROOT}/vcg_sets/GaussianParam_s0306lre_channel_z.mat</file>
173+
<file>${PROJECT_ROOT}/vcg_sets/GaussianParam_s0486_re_channel_x.mat</file>
174+
<file>${PROJECT_ROOT}/vcg_sets/GaussianParam_s0486_re_channel_y.mat</file>
175+
<file>${PROJECT_ROOT}/vcg_sets/GaussianParam_s0486_re_channel_z.mat</file>
176+
<file>${PROJECT_ROOT}/vcg_sets/GaussianParam_s0491_re_channel_x.mat</file>
177+
<file>${PROJECT_ROOT}/vcg_sets/GaussianParam_s0491_re_channel_y.mat</file>
178+
<file>${PROJECT_ROOT}/vcg_sets/GaussianParam_s0491_re_channel_z.mat</file>
179+
<file>${PROJECT_ROOT}/vcg_sets/GaussianParam_s0533_re_channel_x.mat</file>
180+
<file>${PROJECT_ROOT}/vcg_sets/GaussianParam_s0533_re_channel_y.mat</file>
181+
<file>${PROJECT_ROOT}/vcg_sets/GaussianParam_s0533_re_channel_z.mat</file>
182+
</fileset.resources>
183+
<fileset.package />
184+
<build-deliverables>
185+
<file name="readme.txt" location="${PROJECT_ROOT}/fecgsyn/for_testing" optional="true">/Users/Mohsalvi/Mohsan/oxford/DPhil_CDT/FECG_GUI/github/fecgsyn/for_testing/readme.txt</file>
186+
<file name="fecgsyn.app" location="${PROJECT_ROOT}/fecgsyn/for_testing" optional="false">/Users/Mohsalvi/Mohsan/oxford/DPhil_CDT/FECG_GUI/github/fecgsyn/for_testing/fecgsyn.app</file>
187+
<file name="run_fecgsyn.sh" location="${PROJECT_ROOT}/fecgsyn/for_testing" optional="false">/Users/Mohsalvi/Mohsan/oxford/DPhil_CDT/FECG_GUI/github/fecgsyn/for_testing/run_fecgsyn.sh</file>
188+
</build-deliverables>
189+
<workflow />
190+
<matlab>
191+
<root>/Applications/MATLAB_R2013b.app</root>
192+
<toolboxes>
193+
<toolbox name="fixedpoint" />
194+
</toolboxes>
195+
</matlab>
196+
<platform>
197+
<unix>true</unix>
198+
<mac>true</mac>
199+
<windows>false</windows>
200+
<win2k>false</win2k>
201+
<winxp>false</winxp>
202+
<vista>false</vista>
203+
<linux>false</linux>
204+
<solaris>false</solaris>
205+
<osver>10.9.4</osver>
206+
<os32>false</os32>
207+
<os64>true</os64>
208+
<arch>maci64</arch>
209+
<matlab>true</matlab>
210+
</platform>
211+
</configuration>
212+
</deployment-project>
213+

0 commit comments

Comments
 (0)