-
Notifications
You must be signed in to change notification settings - Fork 3
/
GUI_main.m
4515 lines (3825 loc) · 163 KB
/
GUI_main.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
function varargout = GUI_main(varargin)
% GUI_main MATLAB code for the toolbox of photoacoustic imaging
%
% H = GUI_main returns the handle to a new GUI_main or the handle to
% the existing singleton*.
%
% GUI_main('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in GUI_main.M with the given input arguments.
%
% GUI_main('Property','Value',...) creates a new GUI_main or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI_main before GUI_main_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to GUI_main_OpeningFcn via varargin.
%
% *See GUI_main Options on GUIDE's Tools menu. Choose "GUI_main allows only one
% instance to run (singleton)".
%
%
% Begin initialization code
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @GUI_main_OpeningFcn, ...
'gui_OutputFcn', @GUI_main_OutputFcn, ...
'gui_LayoutFcn', @GUI_main_LayoutFcn, ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before GUI_main is made visible.
function GUI_main_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to GUI_main (see VARARGIN)
%%%%%%%%%%%%%%%%%%%%% initialization %%%%%%%%%%%%%%%%%%%%%
% ----------------- create multi tabs panel for display ---------------- %
handles.tgroup = uitabgroup('Parent', handles.uipanelTabs,'TabLocation', 'top','Units','Normalized');
handles.tab1 = uitab('Parent', handles.tgroup, 'Title', 'Forward simulation');
handles.tab2 = uitab('Parent', handles.tgroup, 'Title', 'Reconstruction results');
handles.tab3 = uitab('Parent', handles.tgroup, 'Title', 'Spectra of coefficients');
% Place panels into each tab
set(handles.P1,'Parent',handles.tab1,'Units','Normalized')
set(handles.P2,'Parent',handles.tab2,'Units','Normalized')
set(handles.P3,'Parent',handles.tab3,'Units','Normalized')
% -------- add OA equation START--------------- %
axes(handles.axesFluenceEq)
I = imread('oa_equation.png');
imshow(I)
axis off
% -------- add OA equation END --------------- %
%set( findall( hObject, '-property', 'Units' ), 'Units', 'Normalized' )
% -------------- PARAMETERS ASSIGNMENT -------------------- %
% set number of lasers and geo
handles.numLasers = 5;
set(handles.editNumLaser, 'String', num2str(handles.numLasers))
set(handles.textContNumLaser, 'String', num2str(handles.numLasers))
dis1 = 20;
set(handles.editDis1, 'String', num2str(dis1))
set(handles.textContDis1, 'String', num2str(dis1))
handles.Vessel.pos = [0,dis1];
handles.Laser1.pos = [0,0]; %(r,z) --> (x,y)
dis2 = 40;
set(handles.editDis2,'String', num2str(dis2))
set(handles.textContDis2, 'String', num2str(dis2))
handles.Laser2.pos = [dis2,0];
axes(handles.axesModel)
plot_geo(handles.Vessel.pos, [ handles.Laser1.pos; handles.Laser2.pos], handles.numLasers);
% set wav for the plot_fluence
set(handles.sliderWav ,'Value',700)
set(handles.textWav, 'String', num2str(700));
% set default mode: single forward
set(handles.radiobuttonSingleForward,'Value',1)
set(handles.radiobuttonForearm,'Value',1)
set(handles.editStOvRef, 'String', num2str(0.98)) % artery
set(handles.editTHbRef, 'String', num2str(0.117)) % Jacques_PMB2013
set(handles.editStObRef, 'String', num2str(0.64))
set(handles.editCH2ORef, 'String', num2str(0.65)) % have not found this value
set(handles.editaRef, 'String', num2str(0.8))
set(handles.editbRef, 'String', num2str(0.2)) % a and b vary a lot, but this is reasonable.
set(handles.editNoiseLevel, 'String', num2str(0))
set(handles.textContNoiseLevel, 'String', num2str(0))
handles.StOv_range = [get(handles.sliderStOv, 'Min') get(handles.sliderStOv, 'Max')];
handles.TCHb_range = [get(handles.sliderTCHb, 'Min') get(handles.sliderTCHb, 'Max')];
handles.StOb_range = [get(handles.sliderStOb, 'Min') get(handles.sliderStOb, 'Max')];
handles.CH2O_range = [get(handles.sliderCH2O, 'Min') get(handles.sliderCH2O, 'Max')];
handles.CLipid_range = [get(handles.sliderCLipid, 'Min') get(handles.sliderCLipid, 'Max')];
handles.a_range = [get(handles.slidera, 'Min') get(handles.slidera, 'Max')];
handles.b_range = [get(handles.sliderb, 'Min') get(handles.sliderb, 'Max')];
set(handles.textSliderStOvL, 'String', num2str(handles.StOv_range(1)));
set(handles.textSliderStOvH, 'String', num2str(handles.StOv_range(2)));
set(handles.textSliderTCHbL, 'String', num2str(handles.TCHb_range(1)));
set(handles.textSliderTCHbH, 'String', num2str(handles.TCHb_range(2)));
set(handles.textSliderStObL, 'String', num2str(handles.StOb_range(1)));
set(handles.textSliderStObH, 'String', num2str(handles.StOb_range(2)));
set(handles.textSliderCH2OL, 'String', num2str(handles.CH2O_range(1)));
set(handles.textSliderCH2OH, 'String', num2str(handles.CH2O_range(2)));
set(handles.textSliderCLipidL, 'String', num2str(handles.CLipid_range(1)));
set(handles.textSliderCLipidH, 'String', num2str(handles.CLipid_range(2)));
set(handles.textSlideraL, 'String', num2str(handles.a_range(1)));
set(handles.textSlideraH, 'String', num2str(handles.a_range(2)));
set(handles.textSliderbL, 'String', num2str(handles.b_range(1)));
set(handles.textSliderbH, 'String', num2str(handles.b_range(2)));
StOvCont = 0.8;
TCHbCont = 0.09;
StObCont = 0.8;
CH2OCont = 0.4;
CLipidCont = 0.2;
aCont = 0.65;
bCont = 0.2;
set(handles.sliderStOv, 'Value', StOvCont)
set(handles.sliderTCHb, 'Value', TCHbCont)
set(handles.sliderStOb, 'Value', StObCont)
set(handles.sliderCH2O, 'Value', CH2OCont)
set(handles.sliderCLipid, 'Value', CLipidCont)
set(handles.slidera, 'Value', aCont)
set(handles.sliderb, 'Value', bCont)
set(handles.textStOvCont, 'String', num2str(StOvCont,3))
set(handles.textTCHbCont, 'String', num2str(TCHbCont,3))
set(handles.textStObCont, 'String', num2str(StObCont,3))
set(handles.textCH2OCont, 'String', num2str(CH2OCont,3))
set(handles.textCLipidCont, 'String', num2str(CLipidCont,3))
set(handles.textaCont, 'String', num2str(aCont,3))
set(handles.textbCont, 'String', num2str(bCont,3))
set(handles.editStOvInit, 'String', num2str(StOvCont,3))
set(handles.editTCHbInit, 'String', num2str(TCHbCont,3));
set(handles.editStObInit, 'String', num2str(StObCont,3));
set(handles.editCH2OInit, 'String', num2str(CH2OCont,3));
set(handles.editCLipidInit, 'String' , num2str(CLipidCont,3));
set(handles.editaInit, 'String', num2str(aCont,3));
set(handles.editbInit, 'String', num2str(bCont,3));
% -------------- PARAMETERS ASSIGNMENT END ---------------- %
%%%%%%%%%%%%%%%%%%%% initialization end %%%%%%%%%%%%%%%%%%%
% Choose default command line output for GUI_main
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes GUI_main wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = GUI_main_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% ---------------- plot_geo START-----------------%
handles.numLasers = str2double(get(handles.editNumLaser, 'String'));
set(handles.textContNumLaser, 'String', num2str(handles.numLasers))
if handles.numLasers == 1
dis1 = str2double(get(handles.editDis1, 'String'));
set(handles.textContDis1,'String', num2str(dis1));
handles.Vessel.pos = [0,dis1];
axes(handles.axesModel)
plot_geo(handles.Vessel.pos, handles.Laser1.pos,1);
else
dis1 = str2double(get(handles.editDis1, 'String'));
set(handles.textContDis1,'String', num2str(dis1));
handles.Vessel.pos = [0,dis1];
% handles.Laser1.pos = [0,0]; %(r,z) --> (x,y)
dis2 = str2double(get(handles.editDis2,'String'));
set(handles.textContDis2, 'String', num2str(dis2))
handles.Laser2.pos = [dis2,0];
axes(handles.axesModel)
plot_geo(handles.Vessel.pos, [ handles.Laser1.pos; handles.Laser2.pos], handles.numLasers);
end
% ---------------- plot_geo END-----------------%
if get(handles.radiobuttonSingleForward,'Value') == 1
% -------------- PARAMETERS ASSIGNMENT -------------------- %
% ----------------- get wavelengths START --------------%
wav_min = str2double(get(handles.editWavFrom,'String'));
wav_max = str2double(get(handles.editWavTo,'String'));
wav_step = str2double(get(handles.editWavStep,'String'));
handles.wavList = wav_min: wav_step: wav_max;
% ----------------- get wavelengths END ---------------%
handles.ref.wavList = handles.wavList;
handles.ref.StOv = str2double(get(handles.editStOvRef, 'String'));
handles.ref.TCHb = str2double(get(handles.editTHbRef, 'String'));
handles.ref.StOb = str2double(get(handles.editStObRef, 'String'));
handles.ref.COHb = handles.ref.TCHb * handles.ref.StOb;
handles.ref.CHHb = handles.ref.TCHb - handles.ref.COHb;
handles.ref.CH2O = str2double(get(handles.editCH2ORef, 'String'));
handles.ref.CLipid = str2double(get(handles.editCLipidRef, 'String'));
handles.ref.a = str2double(get(handles.editaRef, 'String'));
handles.ref.b = str2double(get(handles.editbRef, 'String'));
handles.NoiseLevel = 0.01*str2double(get(handles.editNoiseLevel, 'String'));
set(handles.textContNoiseLevel, 'String', num2str(100*handles.NoiseLevel));
% range of noise level = [0, 10]
if handles.NoiseLevel > 0.1
handles.NoiseLevel = 0.1;
end
handles.ref.vesselpos = handles.Vessel.pos;
handles.ref.laserpos = [handles.Laser1.pos ; handles.Laser2.pos]; %(r,z) --> (x,y)
handles.ref.numLasers = handles.numLasers;
% -------------- PARAMETERS ASSIGNMENT END ---------------- %
% % ----loop over wavs to find the max and min fluence and mua_vessel ---%
% [handles.MaxFluence, handles.MinFluence] = get_MaxMinFluence(handles.ref);
% [handles.MaxMuaVessel, handles.MinMuaVessel] = get_MaxMinMuaVessel(handles.ref);
%
% % -------------------- max and min end ------------------------------%
% ----------------- plot fluence START ------------------%
if get(handles.radiobuttonPlotFluence, 'Value') == 1
handles.plotF = handles.ref;
handles.plotF.wav = get(handles.sliderWav, 'Value');
handles.plotF.IsSound = get(handles.radiobuttonIsSound,'Value');
% axes(handles.axesFluence)
handles.plotF.axesFluence = handles.axesFluence;
handles.plotF.uiPanel = handles.uipanelFluence;
plot_fluence(handles.plotF)
end
% ----------------- plot fluence END ------------------%
% ----------------- Single Forward Start ------------------- %
if isfield(handles.ref, 'NoiseLevel')
handles.ref = rmfield(handles.ref,'NoiseLevel');
end
handles.ref.ForwardResult = forwardFcn(handles.ref);
% generate noisy result
handles.ref.NoiseLevel = handles.NoiseLevel;
handles.ref.rDataRefNoise = forwardFcn(handles.ref);
% ----------------- Single Forward End --------------------- %
% --------------------- DISPLAY RESULT -----------------------%
axes(handles.axesForwardResult)
cla
semilogy(handles.ref.ForwardResult,'-ob')
hold on
nn = length(handles.wavList);
numLasers = handles.numLasers;
COLORs=hsv(numLasers);
xlim([0 nn*numLasers])
ymin = min([handles.ref.ForwardResult handles.ref.rDataRefNoise]);
ymax = max([handles.ref.ForwardResult handles.ref.rDataRefNoise]);
ylim([ymin ymax]);
for ii = 1:numLasers
patch([ nn*(ii-1) nn*(ii-1)...
nn*ii nn*ii], [ymin ymax ymax ymin],...
COLORs(ii,:),'FaceAlpha' ,0.05)
text(mean([nn*(ii-1) nn*ii]),mean([ymax ymin]),2,...
['position ' num2str(ii)],...
'HorizontalAlignment','center','Color','k')
end
hf1 = semilogy(handles.ref.ForwardResult,'-ob');
hf2 = semilogy(handles.ref.rDataRefNoise,'-*r');
legend([hf1, hf2], {'reference signal','noisy reference'},...
'Location','northeastoutside')
ylabel(' \Delta P(\lambda_i) / \Delta P(\lambda_0)')
xlabel('data index')
hold off
% ------------------ DISPLAY RESULT END ---------------------%
%----------------- plot mu - C_chromophores ---------------------%
if get(handles.radiobuttonPlotMuaC,'Value') == 1
% axes(handles.axesPlotMuC1)
plot_mu_C_chromophores(handles.ref,...
handles.axesPlotMuC1,...
handles.axesPlotMuC2,...
handles.axesPlotMuC3)
% plot_ultra(handles.ref);
end
%--------------- plot mu - C_chromophores END -------------------%
%---------------- plot Ultrasound Signal -------------------------%
if get(handles.radiobuttonPlotUltraSignal, 'Value') == 1
axes(handles.axesUltra)
plot_ultra(handles.ref);
end
%---------------- plot Ultrasound Signal END ---------------------%
elseif get(handles.radiobuttonContForward,'Value') == 1
%%%%%%%%%%%%%%%%%%%%%%% Continuous mode STARR %%%%%%%%%%%%%%%%%%%%%%%
% -------------- PARAMETERS ASSIGNMENT -------------------- %
% ----------------- get wavelengths START --------------%
wav_min = str2double(get(handles.editWavFrom,'String'));
wav_max = str2double(get(handles.editWavTo,'String'));
wav_step = str2double(get(handles.editWavStep,'String'));
handles.wavList = wav_min: wav_step: wav_max;
% ----------------- get wavelengths END ---------------%
handles.cont.wavList = handles.wavList;
handles.cont.StOv = get(handles.sliderStOv, 'Value');
handles.cont.TCHb = get(handles.sliderTCHb, 'Value');
handles.cont.StOb = get(handles.sliderStOb, 'Value');
handles.cont.COHb = handles.cont.StOb * handles.cont.TCHb;
handles.cont.CHHb = handles.cont.TCHb - handles.cont.COHb;
handles.cont.CH2O = get(handles.sliderCH2O, 'Value');
handles.cont.CLipid = get(handles.sliderCLipid, 'value');
% following paras are the same with ref
handles.cont.a = get(handles.slidera, 'Value');
handles.cont.b = get(handles.sliderb, 'Value');
handles.cont.vesselpos = handles.Vessel.pos;
handles.cont.laserpos = [handles.Laser1.pos ; handles.Laser2.pos]; %(r,z) --> (x,y)
handles.cont.numLasers = handles.numLasers;
% -------------- PARAMETERS ASSIGNMENT END ---------------- %
% ----------------- plot fluence START ------------------%
if get(handles.radiobuttonPlotFluence, 'Value') == 1
handles.plotF = handles.cont;
handles.plotF.wav = get(handles.sliderWav, 'Value');
handles.plotF.IsSound = get(handles.radiobuttonIsSound,'Value');
% axes(handles.axesFluence)
handles.plotF.axesFluence = handles.axesFluence;
handles.plotF.uiPanel = handles.uipanelFluence;
plot_fluence(handles.plotF)
end
% ----------------- plot fluence END ------------------%
% ----------------- Cont Forward Start ------------------- %
handles.cont.ForwardResult = forwardFcn(handles.cont);
% ----------------- Cont Forward End --------------------- %
% --------------------- DISPLAY RESULT -----------------------%
axes(handles.axesForwardResult)
cla
hold on
if isfield(handles, 'ref')
cla
semilogy(handles.ref.ForwardResult,'-ob')
hold on
nn = length(handles.wavList);
numLasers = handles.numLasers;
COLORs=hsv(numLasers);
xlim([0 nn*numLasers])
ymin = min([handles.ref.ForwardResult handles.ref.rDataRefNoise...
handles.cont.ForwardResult]);
ymax = max([handles.ref.ForwardResult handles.ref.rDataRefNoise...
handles.cont.ForwardResult]);
ylim([ymin ymax]);
for ii = 1:numLasers
patch([ nn*(ii-1) nn*(ii-1)...
nn*ii nn*ii], [ymin ymax ymax ymin],...
COLORs(ii,:),'FaceAlpha' ,0.03)
text(mean([nn*(ii-1) nn*ii]),mean([ymax ymin]),2,...
['position ' num2str(ii)],...
'HorizontalAlignment','center','Color','k')
end
hf1 = semilogy(handles.ref.ForwardResult,'-ob');
hf2 = semilogy(handles.ref.rDataRefNoise,'-*r');
hf3 = semilogy(handles.cont.ForwardResult,'-oc');
legend([hf1, hf2, hf3], {'reference signal','noisy reference',...
'manual fitting'},'Location','northeastoutside')
ylabel(' \Delta P(\lambda_i) / \Delta P(\lambda_0)')
xlabel('data index')
else
cla
semilogy(handles.cont.ForwardResult,'-oc')
hold on
nn = length(handles.wavList);
numLasers = handles.numLasers;
COLORs=hsv(numLasers);
xlim([0 nn*numLasers])
ymin = min( handles.cont.ForwardResult);
ymax = max(handles.cont.ForwardResult);
ylim([ymin ymax]);
for ii = 1:numLasers
patch([ nn*(ii-1) nn*(ii-1)...
nn*ii nn*ii], [ymin ymax ymax ymin],...
COLORs(ii,:),'FaceAlpha' ,0.03)
text(mean([nn*(ii-1) nn*ii]),mean([ymax ymin]),2,...
['position ' num2str(ii)],...
'HorizontalAlignment','center','Color','k')
end
hf3 = semilogy(handles.cont.ForwardResult,'-oc');
legend(hf3, 'manual fitting','Location','northeastoutside')
ylabel(' \Delta P(\lambda_i) / \Delta P(\lambda_0)')
xlabel('data index')
hold off
end
if get(handles.radiobuttonPlotUltraSignal, 'Value') == 1
axes(handles.axesUltra)
plot_ultra(handles.cont);
end
%%%%%%%%%%%%%%%%%%%%%%% Continuous mode END %%%%%%%%%%%%%%%%%%%%%%%
elseif get(handles.radiobuttonRec,'Value') == 1
% -------------- PARAMETERS ASSIGNMENT -------------------- %
% ----------------- get wavelengths START --------------%
wav_min = str2double(get(handles.editWavFrom,'String'));
wav_max = str2double(get(handles.editWavTo,'String'));
wav_step = str2double(get(handles.editWavStep,'String'));
handles.wavList = wav_min: wav_step: wav_max;
% ----------------- get wavelengths END ---------------%
handles.init.wavList = handles.wavList;
handles.init.StOv = str2double(get(handles.editStOvInit, 'String'));
handles.init.TCHb = str2double(get(handles.editTCHbInit, 'String'));
handles.init.StOb = str2double(get(handles.editStObInit, 'String'));
handles.init.COHb = handles.init.TCHb * handles.init.StOb;
handles.init.CHHb = handles.init.TCHb - handles.init.COHb;
handles.init.CH2O = str2double(get(handles.editCH2OInit, 'String'));
handles.init.CLipid = str2double(get(handles.editCLipidInit, 'String'));
handles.init.a = str2double(get(handles.editaInit, 'String'));
handles.init.b = str2double(get(handles.editbInit, 'String'));
handles.init.vesselpos = handles.Vessel.pos;
handles.init.laserpos = [handles.Laser1.pos ; handles.Laser2.pos]; %(r,z) --> (x,y)
handles.init.numLasers = handles.numLasers;
handles.init.StOv_range = handles.StOv_range;
handles.init.TCHb_range = handles.TCHb_range;
handles.init.StOb_range = handles.StOb_range;
handles.init.CH2O_range = handles.CH2O_range;
handles.init.CLipid_range = handles.CLipid_range ;
handles.init.a_range = handles.a_range;
handles.init.b_range = handles.b_range;
handles.init.CHHb_range = handles.TCHb_range .* (1-fliplr(handles.StOb_range));
handles.init.COHb_range = handles.TCHb_range .* handles.StOb_range;
% -------------- PARAMETERS ASSIGNMENT END ---------------- %
% ---------------FOrward for init -------------------------- %
handles.init.RatioResult = forwardFcn(handles.init);
% --------------- FOrward for init end ----------------------%
% ----------------- RECONSTRUCTION START ------------------- %
if isfield(handles, 'ref')
handles.recResult = reconstructionFcn(handles.init, handles.ref.rDataRefNoise); % noisy reference forward result
handles.rec.StOv = handles.recResult(5);
handles.rec.CHHb = handles.recResult(1)/100; % it is actually a* CHHb
handles.rec.COHb = handles.recResult(2)/10; % a* COHb
handles.rec.CH2O = handles.recResult(3); % a* CH2O
handles.rec.CLipid = handles.recResult(4);
handles.rec.a = 1; % for forward result
handles.rec.b = handles.recResult(6);
handles.rec.StOb = handles.rec.COHb/ (handles.rec.COHb + handles.rec.CHHb);
else
% errorMSG = 'please generate reference forward result first before reconstruction !';
% error(errorMSG)
msgbox('Oops! No reference data available. Could you generate forward result first, please?');
end
% ------------------- RECONSTRUCTION END ------------------- %
% ---------------- DISPLAY RECONSTRUCTION RESULT ------------%
a = handles.init.a;
init = [a* handles.init.CHHb * 100,...
a* handles.init.COHb * 10, ...
a* handles.init.CH2O,...
a* handles.init.CLipid,...
handles.init.b];
a = handles.ref.a;
ref = [a* handles.ref.CHHb * 100,...
a* handles.ref.COHb * 10, ...
a* handles.ref.CH2O,...
a* handles.ref.CLipid,...
handles.ref.b];
axes(handles.axesRecResult)
plot(handles.recResult([1:4 6]),'ob', 'MarkerSize',10)
hold on
plot(ref,'*g', 'MarkerSize',10)
plot(init,'rx', 'MarkerSize',10)
legend('reconstruction', 'reference', 'initial guess','Location','northeast')
Labels = {'a*C_{HHb, bulk}', 'a*C_{OHb, bulk}', 'a*C_{H2O, bulk}', ...
'a*C_{Lipid, bulk}', 'b'};
set(gca, 'XTick', [1:5], 'XTickLabel', Labels);
ylabel('Value')
xlabel('parameters')
hold off
axes(handles.axesRecStO)
cla
Labels = {'Oxygenation of blood vessel'};
set(gca, 'XTick', 1, 'XTickLabel', Labels);
ymax = 1;
ymin = 0.3;
hold on
hf1 = plot([0:2],handles.ref.StOv*ones(size([0:2])),'--g','LineWidth',3);
hf2 = plot([0:2],handles.init.StOv*ones(size([0:2])),'--r','LineWidth',3);
ylim([ymin ,ymax])
set(gca,'ytick',[ymin:0.05:ymax]);
hf3 = bar(handles.rec.StOv, 'BaseValue', ymin, 'FaceAlpha',.3,'EdgeAlpha',.3);
legend([hf1 hf2 hf3], {'reference','initial guess','reconstructed'},...
'Location','northeastoutside')
title(['reconstructed value = ' num2str(handles.rec.StOv,3)])
%%% plot oxy for the bulk
axes(handles.axesRecStOBulk)
cla
Labels = {'Oxygenation of bulk'};
set(gca, 'XTick', 1, 'XTickLabel', Labels);
ymax = 1;
ymin = 0.3;
hold on
hf1 = plot([0:2],handles.ref.StOb*ones(size([0:2])),'--g','LineWidth',3);
hold on
hf2 = plot([0:2],handles.init.StOb*ones(size([0:2])),'--r','LineWidth',3);
ylim([ymin ,ymax])
set(gca,'ytick',[ymin:0.05:ymax]);
hf3 = bar(handles.rec.StOb, 'BaseValue', ymin,'FaceAlpha',.3,'EdgeAlpha',.3);
title(['reconstructed value = ' num2str(handles.rec.StOb,3)])
legend([hf1 hf2 hf3], {'reference','initial guess','reconstructed'},...
'Location','northeastoutside')
% display forward result for reconstructed values
% -------------- PARAMETERS ASSIGNMENT -------------------- %
handles.rec.vesselpos = handles.Vessel.pos;
handles.rec.laserpos = [handles.Laser1.pos ; handles.Laser2.pos]; %(r,z) --> (x,y)
handles.rec.numLasers = handles.numLasers;
% -------------- PARAMETERS ASSIGNMENT END ---------------- %
% ----------------- Forward for rec Start ------------------- %
handles.rec.wavList = handles.wavList;
handles.rec.RatioResult = forwardFcn(handles.rec);
% ----------------- Forward for rec End --------------------- %
% ----- plot forward result ----------------- %
axes(handles.axesForwardResult)
cla
semilogy(handles.rec.RatioResult, '-*k')
hold on
nn = length(handles.wavList);
numLasers = handles.numLasers;
COLORs=hsv(numLasers);
xlim([0 nn*numLasers])
ymin = min([handles.ref.ForwardResult handles.ref.rDataRefNoise...
handles.init.RatioResult handles.rec.RatioResult]);
ymax = max([handles.ref.ForwardResult handles.ref.rDataRefNoise...
handles.init.RatioResult handles.rec.RatioResult]);
ylim([ymin ymax]);
for ii = 1:numLasers
patch([ nn*(ii-1) nn*(ii-1)...
nn*ii nn*ii], [ymin ymax ymax ymin],...
COLORs(ii,:),'FaceAlpha' ,0.03)
text(mean([nn*(ii-1) nn*ii]),mean([ymax ymin]),2,...
['position ' num2str(ii)],...
'HorizontalAlignment','center','Color','k')
end
hf1 = semilogy(handles.init.RatioResult,'-oc');
hf2 = semilogy(handles.ref.ForwardResult,'-ob');
hf3 = semilogy(handles.ref.rDataRefNoise,'-*r');
hf4 = semilogy(handles.rec.RatioResult, '-*k');
legend([hf1 hf2 hf3 hf4],...
{'initial', 'reference', 'noisy reference', 'reconstructed'},...
'Location','northeastoutside')
ylabel(' \Delta P(\lambda_i) / \Delta P(\lambda_0)')
xlabel('data index')
hold off
% ---------------- DISPLAY RECONSTRUCTION RESULT END---------%
else
errorMSG = 'Please select a mode';
error(errorMSG)
end
guidata(hObject, handles);
function editStOvRef_Callback(hObject, eventdata, handles)
% hObject handle to editStOvRef (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of editStOvRef as text
% str2double(get(hObject,'String')) returns contents of editStOvRef as a double
% --- Executes during object creation, after setting all properties.
function editStOvRef_CreateFcn(hObject, eventdata, handles)
% hObject handle to editStOvRef (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on slider movement.
function sliderStOv_Callback(hObject, eventdata, handles)
% hObject handle to sliderStOv (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'Value') returns position of slider
% get(hObject,'Min') and get(hObject,'Max') to determine range of slider
% get value from slider
handles.cont.StOv = get(hObject, 'Value');
set(handles.textStOvCont, 'String', num2str(handles.cont.StOv,3));
set(handles.editStOvInit, 'String', num2str(handles.cont.StOv,3));
if get(handles.radiobuttonContForward,'Value') == 1
%%%%%%%%%%%%%%%%%%%%%%% Continuous mode START %%%%%%%%%%%%%%%%%%%%%%%
% -------------- PARAMETERS ASSIGNMENT -------------------- %
% ----------------- get wavelengths START --------------%
wav_min = str2double(get(handles.editWavFrom,'String'));
wav_max = str2double(get(handles.editWavTo,'String'));
wav_step = str2double(get(handles.editWavStep,'String'));
handles.wavList = wav_min: wav_step: wav_max;
% ----------------- get wavelengths END ---------------%
handles.cont.wavList = handles.wavList;
% handles.cont.StOv = get(handles.sliderStOv, 'Value');
handles.cont.TCHb = get(handles.sliderTCHb, 'Value');
handles.cont.StOb = get(handles.sliderStOb, 'Value');
handles.cont.COHb = handles.cont.StOb * handles.cont.TCHb;
handles.cont.CHHb = handles.cont.TCHb - handles.cont.COHb;
handles.cont.CH2O = get(handles.sliderCH2O, 'value');
handles.cont.CLipid = get(handles.sliderCLipid, 'value');
% following paras are the same with ref
handles.cont.a = get(handles.slidera, 'Value');
handles.cont.b = get(handles.sliderb, 'Value');
handles.cont.vesselpos = handles.Vessel.pos;
handles.cont.laserpos = [handles.Laser1.pos ; handles.Laser2.pos]; %(r,z) --> (x,y)
handles.cont.numLasers = handles.numLasers;
% -------------- PARAMETERS ASSIGNMENT END ---------------- %
% ----------------- plot fluence START ------------------%
if get(handles.radiobuttonPlotFluence, 'Value') == 1
handles.plotF = handles.cont;
handles.plotF.wav = get(handles.sliderWav, 'Value');
handles.plotF.IsSound = get(handles.radiobuttonIsSound,'Value');
% axes(handles.axesFluence)
handles.plotF.axesFluence = handles.axesFluence;
handles.plotF.uiPanel = handles.uipanelFluence;
plot_fluence(handles.plotF)
end
% ----------------- plot fluence END ------------------%
% ----------------- Cont Forward Start ------------------- %
handles.cont.ForwardResult = forwardFcn(handles.cont);
% ----------------- Cont Forward End --------------------- %
%---------------- plot Ultrasound Signal -------------------------%
if get(handles.radiobuttonPlotUltraSignal, 'Value') == 1
axes(handles.axesUltra)
plot_ultra(handles.cont);
end
%---------------- plot Ultrasound Signal END ---------------------%
% --------------------- DISPLAY RESULT -----------------------%
axes(handles.axesForwardResult)
cla
hold on
ylabel(' \Delta P(\lambda_i) / \Delta P(\lambda_0)')
xlabel('data index')
if isfield(handles, 'ref')
cla
semilogy(handles.ref.ForwardResult,'-ob')
hold on
nn = length(handles.wavList);
numLasers = handles.numLasers;
COLORs=hsv(numLasers);
xlim([0 nn*numLasers])
ymin = min([handles.ref.ForwardResult handles.ref.rDataRefNoise...
handles.cont.ForwardResult]);
ymax = max([handles.ref.ForwardResult handles.ref.rDataRefNoise...
handles.cont.ForwardResult]);
ylim([ymin ymax]);
for ii = 1:numLasers
patch([ nn*(ii-1) nn*(ii-1)...
nn*ii nn*ii], [ymin ymax ymax ymin],...
COLORs(ii,:),'FaceAlpha' ,0.03)
text(mean([nn*(ii-1) nn*ii]),mean([ymax ymin]),2,...
['position ' num2str(ii)],...
'HorizontalAlignment','center','Color','k')
end
hf1 = semilogy(handles.ref.ForwardResult,'-ob');
hf2 = semilogy(handles.ref.rDataRefNoise,'-*r');
hf3 = semilogy(handles.cont.ForwardResult,'-oc');
legend([hf1, hf2, hf3], {'reference signal','noisy reference',...
'manual fitting'},'Location','northeastoutside')
ylabel(' \Delta P(\lambda_i) / \Delta P(\lambda_0)')
xlabel('data index')
else
cla
semilogy(handles.cont.ForwardResult,'-oc')
hold on
nn = length(handles.wavList);
numLasers = handles.numLasers;
COLORs=hsv(numLasers);
xlim([0 nn*numLasers])
ymin = min( handles.cont.ForwardResult);
ymax = max(handles.cont.ForwardResult);
ylim([ymin ymax]);
for ii = 1:numLasers
patch([ nn*(ii-1) nn*(ii-1)...
nn*ii nn*ii], [ymin ymax ymax ymin],...
COLORs(ii,:),'FaceAlpha' ,0.03)
text(mean([nn*(ii-1) nn*ii]),mean([ymax ymin]),2,...
['position ' num2str(ii)],...
'HorizontalAlignment','center','Color','k')
end
hf3 = semilogy(handles.cont.ForwardResult,'-oc');
legend(hf3, 'manual fitting','Location','northeastoutside')
ylabel(' \Delta P(\lambda_i) / \Delta P(\lambda_0)')
xlabel('data index')
hold off
end
% --------------------- DISPLAY RESULT END ------------------%
%%%%%%%%%%%%%%%%%%%%%%% Continuous mode END %%%%%%%%%%%%%%%%%%%%%%%
end
guidata(hObject, handles);
% --- Executes during object creation, after setting all properties.
function sliderStOv_CreateFcn(hObject, eventdata, handles)
% hObject handle to sliderStOv (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: slider controls usually have a light gray background.
if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor',[.9 .9 .9]);
end
function editStOvInit_Callback(hObject, eventdata, handles)
% hObject handle to editStOvInit (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of editStOvInit as text
% str2double(get(hObject,'String')) returns contents of editStOvInit as a double
% --- Executes during object creation, after setting all properties.
function editStOvInit_CreateFcn(hObject, eventdata, handles)
% hObject handle to editStOvInit (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function editTHbRef_Callback(hObject, eventdata, handles)
% hObject handle to editTHbRef (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of editTHbRef as text
% str2double(get(hObject,'String')) returns contents of editTHbRef as a double
% --- Executes during object creation, after setting all properties.
function editTHbRef_CreateFcn(hObject, eventdata, handles)
% hObject handle to editTHbRef (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function editStObRef_Callback(hObject, eventdata, handles)
% hObject handle to editStObRef (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of editStObRef as text
% str2double(get(hObject,'String')) returns contents of editStObRef as a double
% --- Executes during object creation, after setting all properties.
function editStObRef_CreateFcn(hObject, eventdata, handles)
% hObject handle to editStObRef (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function editaRef_Callback(hObject, eventdata, handles)
% hObject handle to editaRef (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of editaRef as text
% str2double(get(hObject,'String')) returns contents of editaRef as a double
% --- Executes during object creation, after setting all properties.
function editaRef_CreateFcn(hObject, eventdata, handles)
% hObject handle to editaRef (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function editbRef_Callback(hObject, eventdata, handles)
% hObject handle to editbRef (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of editbRef as text
% str2double(get(hObject,'String')) returns contents of editbRef as a double
% --- Executes during object creation, after setting all properties.
function editbRef_CreateFcn(hObject, eventdata, handles)
% hObject handle to editbRef (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function editNoiseLevel_Callback(hObject, eventdata, handles)
% hObject handle to editNoiseLevel (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of editNoiseLevel as text
% str2double(get(hObject,'String')) returns contents of editNoiseLevel as a double
% --- Executes during object creation, after setting all properties.
function editNoiseLevel_CreateFcn(hObject, eventdata, handles)
% hObject handle to editNoiseLevel (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on slider movement.
function slider2_Callback(hObject, eventdata, handles)
% hObject handle to sliderStOv (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'Value') returns position of slider
% get(hObject,'Min') and get(hObject,'Max') to determine range of slider
% --- Executes during object creation, after setting all properties.
function slider2_CreateFcn(hObject, eventdata, handles)
% hObject handle to sliderStOv (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: slider controls usually have a light gray background.
if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor',[.9 .9 .9]);
end
% --- Executes on slider movement.
function sliderTCHb_Callback(hObject, eventdata, handles)
% hObject handle to sliderTCHb (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'Value') returns position of slider
% get(hObject,'Min') and get(hObject,'Max') to determine range of slider
handles.cont.TCHb = get(hObject, 'Value');
set(handles.textTCHbCont, 'String', num2str(handles.cont.TCHb,3));
set(handles.editTCHbInit, 'String', num2str(handles.cont.TCHb,3));
if get(handles.radiobuttonContForward,'Value') == 1
%%%%%%%%%%%%%%%%%%%%%%% Continuous mode START %%%%%%%%%%%%%%%%%%%%%%%
% -------------- PARAMETERS ASSIGNMENT -------------------- %
% ----------------- get wavelengths START --------------%
wav_min = str2double(get(handles.editWavFrom,'String'));
wav_max = str2double(get(handles.editWavTo,'String'));
wav_step = str2double(get(handles.editWavStep,'String'));
handles.wavList = wav_min: wav_step: wav_max;
% ----------------- get wavelengths END ---------------%
handles.cont.wavList = handles.wavList;
handles.cont.StOv = get(handles.sliderStOv, 'Value');
% handles.cont.TCHb = get(handles.sliderTCHb, 'Value');
handles.cont.StOb = get(handles.sliderStOb, 'Value');
handles.cont.COHb = handles.cont.StOb * handles.cont.TCHb;
handles.cont.CHHb = handles.cont.TCHb - handles.cont.COHb;
handles.cont.CH2O = get(handles.sliderCH2O, 'value');
handles.cont.CLipid = get(handles.sliderCLipid, 'value');
% following paras are the same with ref
handles.cont.a = get(handles.slidera, 'Value');
handles.cont.b = get(handles.sliderb, 'Value');
handles.cont.vesselpos = handles.Vessel.pos;
handles.cont.laserpos = [handles.Laser1.pos ; handles.Laser2.pos]; %(r,z) --> (x,y)
handles.cont.numLasers = handles.numLasers;
% -------------- PARAMETERS ASSIGNMENT END ---------------- %
% ----------------- plot fluence START ------------------%
if get(handles.radiobuttonPlotFluence, 'Value') == 1
handles.plotF = handles.cont;
handles.plotF.wav = get(handles.sliderWav, 'Value');
handles.plotF.IsSound = get(handles.radiobuttonIsSound,'Value');
% axes(handles.axesFluence)
handles.plotF.axesFluence = handles.axesFluence;
handles.plotF.uiPanel = handles.uipanelFluence;
plot_fluence(handles.plotF)
end
% ----------------- plot fluence END ------------------%
% ----------------- Cont Forward Start ------------------- %
handles.cont.ForwardResult = forwardFcn(handles.cont);
% ----------------- Cont Forward End --------------------- %
%---------------- plot Ultrasound Signal -------------------------%
if get(handles.radiobuttonPlotUltraSignal, 'Value') == 1
axes(handles.axesUltra)