forked from tduriez/LFD_MPIV_toolbox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLFD_MPIV_Interface.m
More file actions
executable file
·1660 lines (1448 loc) · 55.8 KB
/
LFD_MPIV_Interface.m
File metadata and controls
executable file
·1660 lines (1448 loc) · 55.8 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
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] = LFD_MPIV_Interface(varargin)
%LFD_MPIV_INTERFACE M-file for LFD_MPIV_Interface.fig
% LFD_MPIV_INTERFACE, by itself, creates a new LFD_MPIV_INTERFACE or raises the existing
% singleton*.
%
% H = LFD_MPIV_INTERFACE returns the handle to a new LFD_MPIV_INTERFACE or the handle to
% the existing singleton*.
%
% LFD_MPIV_INTERFACE('Property','Value',...) creates a new LFD_MPIV_INTERFACE using the
% given property value pairs. Unrecognized properties are passed via
% varargin to LFD_MPIV_Interface_OpeningFcn. This calling syntax produces a
% warning when there is an existing singleton*.
%
% LFD_MPIV_INTERFACE('CALLBACK') and LFD_MPIV_INTERFACE('CALLBACK',hObject,...) call the
% local function named CALLBACK in LFD_MPIV_INTERFACE.M with the given input
% arguments.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Copyright (c) 2017, Thomas Duriez (Distributed under GPLv3)
%% Copyright
% Copyright (c) 2017, Thomas Duriez
%
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program. If not, see <http://www.gnu.org/licenses/>.
% Edit the above text to modify the response to help LFD_MPIV_Interface
% Last Modified by GUIDE v2.5 08-May-2017 20:16:23
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @LFD_MPIV_Interface_OpeningFcn, ...
'gui_OutputFcn', @LFD_MPIV_Interface_OutputFcn, ...
'gui_LayoutFcn', @LFD_MPIV_Interface_LayoutFcn, ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
if ~isempty(strfind(varargin{1},'Callback')) || ~isempty(strfind(varargin{1},'CreateFcn'))
gui_State.gui_Callback = str2func(varargin{1});
end
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 LFD_MPIV_Interface is made visible.
function LFD_MPIV_Interface_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 unrecognized PropertyName/PropertyValue pairs from the
% command line (see VARARGIN)
% Choose default command line output for LFD_MPIV_Interface
if numel(varargin)
if ischar(varargin{1})
handles.dflt_folder=varargin{1};
else
handles.dflt_folder=[];
end
else
handles.dflt_folder=[];
end
handles.current_parameters=LFD_MPIV_parameters;
set(handles.version_txt,'String',sprintf('LFD_MPIV Toolbox v%s',handles.current_parameters.release));
%handles.cxd_folder='';
%handles.cxd='';
handles.parameters=[];
handles.current_frame=0;
if numel(varargin)==2
handles.parameters=varargin{2};
display_expe(handles);
end
update_import_options(handles);
update_PIV_options(handles);
update_synchro_options(handles);
update_images_options(handles);
update_options(handles);
% Update handles structure
guidata(hObject, handles);
set(hObject,'closeRequestFcn',[])
set(hObject, 'Position', get(0,'Screensize')); % Maximize figure.
% UIWAIT makes LFD_MPIV_Interface wait for user response (see UIRESUME)
uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = LFD_MPIV_Interface_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)
set(hObject,'closeRequestFcn','closereq');
% Get default command line output from handles structure
varargout{1} = handles.parameters;
close(hObject);
% --- Executes on selection change in list_cxd.
function list_cxd_Callback(hObject, eventdata, handles)
% hObject handle to list_cxd (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
idx = get(hObject,'Value');
idx=idx(1);
display_image(fullfile(handles.cxd_folder,handles.cxd{idx}),handles.current_parameters,...
handles.axes1,2*handles.current_frame+4*get(handles.show_mask_box,'Value')+8*get(handles.showroi_box,'Value'));
% Hints: contents = cellstr(get(hObject,'String')) returns list_cxd contents as cell array
% contents{get(hObject,'Value')} returns selected item from list_cxd
% --- Executes during object creation, after setting all properties.
function list_cxd_CreateFcn(hObject, eventdata, handles)
% hObject handle to list_cxd (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: listbox 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 button press in set_cxd_button.
function set_cxd_button_Callback(hObject, eventdata, handles)
% hObject handle to set_cxd_button (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
handles.cxd_folder=uigetdir(handles.dflt_folder);
d1=dir(fullfile(handles.cxd_folder,'*.cxd'));
d2=dir(fullfile(handles.cxd_folder,'*.CXD'));
d=[d1 d2];
handles.cxd=cell(1,numel(d));
for i=1:numel(d)
handles.cxd{i}=d(i).name;
end
set(handles.list_cxd,'String',handles.cxd,'Max',numel(d),'Value',1);
idx = get(handles.list_cxd,'Value');
idx=idx(1);
display_image(fullfile(handles.cxd_folder,handles.cxd{idx}),handles.current_parameters,...
handles.axes1,2*handles.current_frame+4*get(handles.show_mask_box,'Value')+8*get(handles.showroi_box,'Value'));
guidata(hObject,handles);
% --- Executes on selection change in list_expe.
function list_expe_Callback(hObject, eventdata, handles)
% hObject handle to list_expe (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns list_expe contents as cell array
% contents{get(hObject,'Value')} returns selected item from list_expe
% --- Executes during object creation, after setting all properties.
function list_expe_CreateFcn(hObject, eventdata, handles)
% hObject handle to list_expe (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: listbox 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 button press in edt_PIV.
function edt_PIV_Callback(hObject, eventdata, handles)
% hObject handle to edt_PIV (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
handles.current_parameters=Inter_PIV_options(handles.current_parameters);
update_PIV_options(handles);
guidata(hObject,handles);
function update_PIV_options(handles);
text_PIV=handles.current_parameters.display('PIV');
set(handles.text_PIV_options,'String',text_PIV);
% --- Executes on button press in synchro_bttn.
function synchro_bttn_Callback(hObject, eventdata, handles)
% hObject handle to synchro_bttn (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
idx_selected_cxd=get(handles.list_cxd,'Value');
cxd=get(handles.list_cxd,'String');
% if isempty(handles.current_parameters.ttl_folder);
% handles.current_parameters.ttl_folder=pwd;
% end
%handles.current_parameters=Inter_synchro(handles.current_parameters,cxd(idx_selected_cxd));
Inter_synchro(handles.current_parameters,cxd(idx_selected_cxd));
update_synchro_options(handles);
guidata(hObject,handles);
function update_synchro_options(handles)
text_PIV=handles.current_parameters.display('synchro');
set(handles.synchro_txt,'String',text_PIV);
% --- Executes on button press in im_setting_bttn.
function im_setting_bttn_Callback(hObject, eventdata, handles)
% hObject handle to im_setting_bttn (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
selected_cxd=get(handles.list_cxd,'Value');
cxd_files=get(handles.list_cxd,'String');
Inter_im_options(handles.current_parameters,fullfile(handles.cxd_folder,cxd_files{selected_cxd(1)}));
update_images_options(handles);
guidata(hObject,handles);
idx = get(handles.list_cxd,'Value');
idx=idx(1);
display_image(fullfile(handles.cxd_folder,handles.cxd{idx}),handles.current_parameters,...
handles.axes1,2*handles.current_frame+4*get(handles.show_mask_box,'Value')+8*get(handles.showroi_box,'Value'));
function update_images_options(handles);
text_PIV=handles.current_parameters.display('frames');
set(handles.im_list,'String',text_PIV);
% --- Executes on selection change in im_list.
function im_list_Callback(hObject, eventdata, handles)
% hObject handle to im_list (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns im_list contents as cell array
% contents{get(hObject,'Value')} returns selected item from im_list
% --- Executes during object creation, after setting all properties.
function im_list_CreateFcn(hObject, eventdata, handles)
% hObject handle to im_list (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: listbox 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 button press in add_selec_bttn.
function add_selec_bttn_Callback(hObject, eventdata, handles)
% hObject handle to add_selec_bttn (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
handles.height=Inter_field_height(handles.cxd,get(handles.list_cxd,'Value'));
handles.parameters=add_expe_structure(handles);
display_expe(handles);
guidata(hObject,handles);
function parameters=add_expe_structure(handles)
%get number of cxd files
idx=get(handles.list_cxd,'Value');
new_parameters=repmat(LFD_MPIV_parameters,[1 numel(idx)]);
if numel(idx)>1
for i=2:numel(idx)
new_parameters(i)=LFD_MPIV_parameters;
end
end
for i=1:numel(idx)
new_parameters(i).update(handles.current_parameters);
new_parameters(i).height=handles.height(i);
new_parameters(i).cxd_file=fullfile(handles.cxd_folder,handles.cxd{idx(i)});
end
parameters=[handles.parameters new_parameters];
function display_expe(handles)
expe_list=cell(1,numel(handles.parameters));
for i=1:numel(handles.parameters);
[~,cxd,~]=fileparts(handles.parameters(i).cxd_file);
expe_list{i}=sprintf('%d: %s,',i,handles.parameters(i).case_name);
expe_list{i}=sprintf('%s %s',expe_list{i},cxd);
expe_list{i}=sprintf('%s y=%.2f,',expe_list{i},handles.parameters(i).height);
expe_list{i}=sprintf('%s IntWin:%s, %d%% ',expe_list{i},sprintf('%d ',handles.parameters(i).IntWin),handles.parameters(i).overlap(1));
% if isempty(handles.parameters(i).ttl_folder)
% expe_list{i}=sprintf('%s Acq. Feq.: %.2f',expe_list{i},handles.parameters(i).acq_freq);
% else
% expe_list{i}=sprintf('%s Acq. Sync. TTL',expe_list{i});
% end
expe_list{i}=sprintf('%s full info: %s',expe_list{i},handles.parameters(i).display('list'));
end
idx=get(handles.list_expe,'Value');
idx(idx>numel(handles.parameters))=numel(handles.parameters);
idx(idx<1)=1;
idx=unique(idx);
set(handles.list_expe,'String',expe_list,'Value',idx,'Max',numel(expe_list));
% --- Executes on button press in remove_bttn.
function remove_bttn_Callback(hObject, eventdata, handles)
% hObject handle to remove_bttn (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
idx=get(handles.list_expe,'Value');
handles.parameters=handles.parameters(setxor(idx,1:numel(handles.parameters)));
display_expe(handles);
guidata(hObject,handles);
% --- Executes on button press in close_bttn.
function close_bttn_Callback(hObject, eventdata, handles)
% hObject handle to close_bttn (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
uiresume;
% --- Executes on button press in export_bttn.
function export_bttn_Callback(hObject, eventdata, handles)
% hObject handle to export_bttn (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% hObject handle to im_setting_bttn (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
Inter_export(handles.current_parameters);
update_options(handles);
guidata(hObject,handles);
function update_options(handles);
text_PIV=handles.current_parameters.display('export');
set(handles.export_list,'String',text_PIV);
% --- Executes on selection change in export_list.
function export_list_Callback(hObject, eventdata, handles)
% hObject handle to export_list (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns export_list contents as cell array
% contents{get(hObject,'Value')} returns selected item from export_list
% --- Executes during object creation, after setting all properties.
function export_list_CreateFcn(hObject, eventdata, handles)
% hObject handle to export_list (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: listbox 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 button press in PIV_bttn.
function PIV_bttn_Callback(hObject, eventdata, handles)
% hObject handle to PIV_bttn (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
LFD_MPIV_CommandLine(handles.parameters);
% --- Executes on button press in import_bttn.
function import_bttn_Callback(hObject, eventdata, handles)
% hObject handle to import_bttn (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
selected_cxd=get(handles.list_cxd,'Value');
cxd_files=get(handles.list_cxd,'String');
Inter_import(handles.current_parameters,fullfile(handles.cxd_folder,cxd_files{selected_cxd(1)}));
update_import_options(handles);
guidata(hObject,handles);
function update_import_options(handles);
text_PIV=handles.current_parameters.display('import');
idx=strfind(text_PIV,char(10));
text_PIV=text_PIV(idx+1:end);
set(handles.import_list,'String',text_PIV)
% --- Executes on selection change in import_list.
function import_list_Callback(hObject, eventdata, handles)
% hObject handle to import_list (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns import_list contents as cell array
% contents{get(hObject,'Value')} returns selected item from import_list
% --- Executes during object creation, after setting all properties.
function import_list_CreateFcn(hObject, eventdata, handles)
% hObject handle to import_list (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: listbox 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 button press in showroi_box.
function showroi_box_Callback(hObject, eventdata, handles)
% hObject handle to showroi_box (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
idx = get(handles.list_cxd,'Value');
idx=idx(1);
display_image(fullfile(handles.cxd_folder,handles.cxd{idx}),handles.current_parameters,...
handles.axes1,2*handles.current_frame+4*get(handles.show_mask_box,'Value')+8*get(hObject,'Value'));
% Hint: get(hObject,'Value') returns toggle state of showroi_box
% --- Executes on button press in show_mask_box.
function show_mask_box_Callback(hObject, eventdata, handles)
% hObject handle to show_mask_box (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
idx = get(handles.list_cxd,'Value');
idx=idx(1);
display_image(fullfile(handles.cxd_folder,handles.cxd{idx}),handles.current_parameters,...
handles.axes1,2*handles.current_frame+4*get(hObject,'Value')+8*get(handles.showroi_box,'Value'));
% Hint: get(hObject,'Value') returns toggle state of show_mask_box
% --- Executes on button press in change_frame_bttn.
function change_frame_bttn_Callback(hObject, eventdata, handles)
% hObject handle to change_frame_bttn (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
if handles.current_frame==0
handles.current_frame=1;
set(handles.current_frame_txt,'String','B');
else
handles.current_frame=0;
set(handles.current_frame_txt,'String','A');
end
idx = get(handles.list_cxd,'Value');
idx=idx(1);
display_image(fullfile(handles.cxd_folder,handles.cxd{idx}),handles.current_parameters,...
handles.axes1,2*handles.current_frame+4*get(handles.show_mask_box,'Value')+8*get(handles.showroi_box,'Value'));
guidata(hObject,handles);
% --- Creates and returns a handle to the GUI figure.
function h1 = LFD_MPIV_Interface_LayoutFcn(policy)
% policy - create a new figure or use a singleton. 'new' or 'reuse'.
persistent hsingleton;
if strcmpi(policy, 'reuse') & ishandle(hsingleton)
h1 = hsingleton;
return;
end
appdata = [];
appdata.GUIDEOptions = struct(...
'active_h', [], ...
'taginfo', struct(...
'figure', 2, ...
'text', 23, ...
'listbox', 8, ...
'pushbutton', 14, ...
'edit', 18, ...
'checkbox', 10, ...
'radiobutton', 2, ...
'uipanel', 2, ...
'axes', 2, ...
'popupmenu', 2), ...
'override', 1, ...
'release', [], ...
'resize', 'simple', ...
'accessibility', 'callback', ...
'mfile', 1, ...
'callbacks', 1, ...
'singleton', 1, ...
'syscolorfig', 1, ...
'blocking', 0, ...
'lastSavedFile', '/home/thomas/Documents/00_gits_reps/LFD_MPIV_toolbox/LFD_MPIV_Interface.m', ...
'lastFilename', '/home/thomas/Documents/00_gits_reps/LFD_MPIV_toolbox/LFD_MPIV_Interface.fig');
appdata.lastValidTag = 'figure1';
appdata.GUIDELayoutEditor = [];
appdata.initTags = struct(...
'handle', [], ...
'tag', 'figure1');
h1 = figure(...
'Units','characters',...
'Position',[135.714285714286 17.5 171.428571428571 39.9375],...
'Visible',get(0,'defaultfigureVisible'),...
'Color',get(0,'defaultfigureColor'),...
'CurrentAxesMode','manual',...
'IntegerHandle','off',...
'MenuBar','none',...
'Name','LFD_MPIV_Interface',...
'NumberTitle','off',...
'Resize',get(0,'defaultfigureResize'),...
'PaperPosition',get(0,'defaultfigurePaperPosition'),...
'ScreenPixelsPerInchMode','manual',...
'ChildrenMode','manual',...
'ParentMode','manual',...
'HandleVisibility','callback',...
'Tag','figure1',...
'CreateFcn', {@local_CreateFcn, blanks(0), appdata} );
appdata = [];
appdata.lastValidTag = 'axes1';
h2 = axes(...
'Parent',h1,...
'FontUnits',get(0,'defaultaxesFontUnits'),...
'Units',get(0,'defaultaxesUnits'),...
'CameraMode',get(0,'defaultaxesCameraMode'),...
'CameraPosition',[0.5 0.5 9.16025403784439],...
'CameraPositionMode',get(0,'defaultaxesCameraPositionMode'),...
'CameraTarget',[0.5 0.5 0.5],...
'CameraTargetMode',get(0,'defaultaxesCameraTargetMode'),...
'CameraViewAngle',6.60861036031192,...
'CameraViewAngleMode',get(0,'defaultaxesCameraViewAngleMode'),...
'Position',[0.415 0.00938967136150235 0.334166666666667 0.284820031298905],...
'ActivePositionProperty','position',...
'ActivePositionPropertyMode',get(0,'defaultaxesActivePositionPropertyMode'),...
'LooseInset',[0.232488822652757 0.234132205252902 0.169895678092399 0.159635594490615],...
'LooseInsetMode',get(0,'defaultaxesLooseInsetMode'),...
'DataSpaceMode',get(0,'defaultaxesDataSpaceMode'),...
'PlotBoxAspectRatio',[1 0.453865336658354 0.453865336658354],...
'PlotBoxAspectRatioMode',get(0,'defaultaxesPlotBoxAspectRatioMode'),...
'ColorSpaceMode',get(0,'defaultaxesColorSpaceMode'),...
'ChildContainerMode',get(0,'defaultaxesChildContainerMode'),...
'DecorationContainerMode',get(0,'defaultaxesDecorationContainerMode'),...
'XRulerMode',get(0,'defaultaxesXRulerMode'),...
'XTick',[0 0.2 0.4 0.6 0.8 1],...
'XTickMode',get(0,'defaultaxesXTickMode'),...
'XTickLabel',{ '0'; '0.2'; '0.4'; '0.6'; '0.8'; '1' },...
'XTickLabelMode',get(0,'defaultaxesXTickLabelMode'),...
'XBaselineMode',get(0,'defaultaxesXBaselineMode'),...
'YRulerMode',get(0,'defaultaxesYRulerMode'),...
'YTick',[0 0.2 0.4 0.6 0.8 1],...
'YTickMode',get(0,'defaultaxesYTickMode'),...
'YTickLabel',{ '0'; '0.2'; '0.4'; '0.6'; '0.8'; '1' },...
'YTickLabelMode',get(0,'defaultaxesYTickLabelMode'),...
'YBaselineMode',get(0,'defaultaxesYBaselineMode'),...
'ZRulerMode',get(0,'defaultaxesZRulerMode'),...
'ZBaselineMode',get(0,'defaultaxesZBaselineMode'),...
'AmbientLightSourceMode',get(0,'defaultaxesAmbientLightSourceMode'),...
'SortMethod','childorder',...
'SortMethodMode',get(0,'defaultaxesSortMethodMode'),...
'Tag','axes1',...
'ParentMode','manual',...
'CreateFcn', {@local_CreateFcn, blanks(0), appdata} );
h3 = get(h2,'title');
set(h3,...
'Parent',h2,...
'Units','data',...
'FontUnits','points',...
'DecorationContainer',[],...
'DecorationContainerMode','auto',...
'Color',[0 0 0],...
'ColorMode','auto',...
'Position',[0.500001663579013 1.01510989010989 0.499999999999998],...
'PositionMode','auto',...
'Interpreter','tex',...
'InterpreterMode','auto',...
'Rotation',0,...
'RotationMode','auto',...
'FontName','Helvetica',...
'FontNameMode','auto',...
'FontUnitsMode','auto',...
'FontSize',11,...
'FontSizeMode','auto',...
'FontAngle','normal',...
'FontAngleMode','auto',...
'FontWeight','bold',...
'FontWeightMode','auto',...
'HorizontalAlignment','center',...
'HorizontalAlignmentMode','auto',...
'VerticalAlignment','bottom',...
'VerticalAlignmentMode','auto',...
'EdgeColor','none',...
'EdgeColorMode','auto',...
'LineStyle','-',...
'LineStyleMode','auto',...
'LineWidth',0.5,...
'LineWidthMode','auto',...
'BackgroundColor','none',...
'BackgroundColorMode','auto',...
'Margin',3,...
'MarginMode','auto',...
'Clipping','off',...
'ClippingMode','auto',...
'Layer','middle',...
'LayerMode','auto',...
'FontSmoothing','on',...
'FontSmoothingMode','auto',...
'UnitsMode','auto',...
'IncludeRenderer','on',...
'IsContainer','off',...
'IsContainerMode','auto',...
'HG1EraseMode','auto',...
'BusyAction','queue',...
'Interruptible','on',...
'SelectionHighlight','on',...
'SelectionHighlightMode','auto',...
'HitTest','on',...
'HitTestMode','auto',...
'PickableParts','visible',...
'PickablePartsMode','auto',...
'XLimInclude','on',...
'XLimIncludeMode','auto',...
'YLimInclude','on',...
'YLimIncludeMode','auto',...
'ZLimInclude','on',...
'ZLimIncludeMode','auto',...
'CLimInclude','on',...
'CLimIncludeMode','auto',...
'ALimInclude','on',...
'ALimIncludeMode','auto',...
'Description','Axes Title',...
'DescriptionMode','auto',...
'Visible','on',...
'VisibleMode','auto',...
'Serializable','on',...
'SerializableMode','auto',...
'HandleVisibility','off',...
'HandleVisibilityMode','auto',...
'TransformForPrintFcnImplicitInvoke','on',...
'TransformForPrintFcnImplicitInvokeMode','auto');
h4 = get(h2,'xlabel');
set(h4,...
'Parent',h2,...
'Units','data',...
'FontUnits','points',...
'DecorationContainer',[],...
'DecorationContainerMode','auto',...
'Color',[0.15 0.15 0.15],...
'ColorMode','auto',...
'Position',[0.500000476837158 -0.130036627252897 0],...
'PositionMode','auto',...
'Interpreter','tex',...
'InterpreterMode','auto',...
'Rotation',0,...
'RotationMode','auto',...
'FontName','Helvetica',...
'FontNameMode','auto',...
'FontUnitsMode','auto',...
'FontSize',11,...
'FontSizeMode','auto',...
'FontAngle','normal',...
'FontAngleMode','auto',...
'FontWeight','normal',...
'FontWeightMode','auto',...
'HorizontalAlignment','center',...
'HorizontalAlignmentMode','auto',...
'VerticalAlignment','top',...
'VerticalAlignmentMode','auto',...
'EdgeColor','none',...
'EdgeColorMode','auto',...
'LineStyle','-',...
'LineStyleMode','auto',...
'LineWidth',0.5,...
'LineWidthMode','auto',...
'BackgroundColor','none',...
'BackgroundColorMode','auto',...
'Margin',3,...
'MarginMode','auto',...
'Clipping','off',...
'ClippingMode','auto',...
'Layer','back',...
'LayerMode','auto',...
'FontSmoothing','on',...
'FontSmoothingMode','auto',...
'UnitsMode','auto',...
'IncludeRenderer','on',...
'IsContainer','off',...
'IsContainerMode','auto',...
'HG1EraseMode','auto',...
'BusyAction','queue',...
'Interruptible','on',...
'SelectionHighlight','on',...
'SelectionHighlightMode','auto',...
'HitTest','on',...
'HitTestMode','auto',...
'PickableParts','visible',...
'PickablePartsMode','auto',...
'XLimInclude','on',...
'XLimIncludeMode','auto',...
'YLimInclude','on',...
'YLimIncludeMode','auto',...
'ZLimInclude','on',...
'ZLimIncludeMode','auto',...
'CLimInclude','on',...
'CLimIncludeMode','auto',...
'ALimInclude','on',...
'ALimIncludeMode','auto',...
'Description','NumericRuler Label',...
'DescriptionMode','auto',...
'Visible','on',...
'VisibleMode','auto',...
'Serializable','on',...
'SerializableMode','auto',...
'HandleVisibility','off',...
'HandleVisibilityMode','auto',...
'TransformForPrintFcnImplicitInvoke','on',...
'TransformForPrintFcnImplicitInvokeMode','auto');
h5 = get(h2,'ylabel');
set(h5,...
'Parent',h2,...
'Units','data',...
'FontUnits','points',...
'DecorationContainer',[],...
'DecorationContainerMode','auto',...
'Color',[0.15 0.15 0.15],...
'ColorMode','auto',...
'Position',[-0.0756442212156723 0.500000476837158 0],...
'PositionMode','auto',...
'Interpreter','tex',...
'InterpreterMode','auto',...
'Rotation',90,...
'RotationMode','auto',...
'FontName','Helvetica',...
'FontNameMode','auto',...
'FontUnitsMode','auto',...
'FontSize',11,...
'FontSizeMode','auto',...
'FontAngle','normal',...
'FontAngleMode','auto',...
'FontWeight','normal',...
'FontWeightMode','auto',...
'HorizontalAlignment','center',...
'HorizontalAlignmentMode','auto',...
'VerticalAlignment','bottom',...
'VerticalAlignmentMode','auto',...
'EdgeColor','none',...
'EdgeColorMode','auto',...
'LineStyle','-',...
'LineStyleMode','auto',...
'LineWidth',0.5,...
'LineWidthMode','auto',...
'BackgroundColor','none',...
'BackgroundColorMode','auto',...
'Margin',3,...
'MarginMode','auto',...
'Clipping','off',...
'ClippingMode','auto',...
'Layer','back',...
'LayerMode','auto',...
'FontSmoothing','on',...
'FontSmoothingMode','auto',...
'UnitsMode','auto',...
'IncludeRenderer','on',...
'IsContainer','off',...
'IsContainerMode','auto',...
'HG1EraseMode','auto',...
'BusyAction','queue',...
'Interruptible','on',...
'SelectionHighlight','on',...
'SelectionHighlightMode','auto',...
'HitTest','on',...
'HitTestMode','auto',...
'PickableParts','visible',...
'PickablePartsMode','auto',...
'XLimInclude','on',...
'XLimIncludeMode','auto',...
'YLimInclude','on',...
'YLimIncludeMode','auto',...
'ZLimInclude','on',...
'ZLimIncludeMode','auto',...
'CLimInclude','on',...
'CLimIncludeMode','auto',...
'ALimInclude','on',...
'ALimIncludeMode','auto',...
'Description','NumericRuler Label',...
'DescriptionMode','auto',...
'Visible','on',...
'VisibleMode','auto',...
'Serializable','on',...
'SerializableMode','auto',...
'HandleVisibility','off',...
'HandleVisibilityMode','auto',...
'TransformForPrintFcnImplicitInvoke','on',...
'TransformForPrintFcnImplicitInvokeMode','auto');
h6 = get(h2,'zlabel');
set(h6,...
'Parent',h2,...
'Units','data',...
'FontUnits','points',...
'DecorationContainer',[],...
'DecorationContainerMode','auto',...
'Color',[0.15 0.15 0.15],...
'ColorMode','auto',...
'Position',[0 0 0],...
'PositionMode','auto',...
'Interpreter','tex',...
'InterpreterMode','auto',...
'Rotation',0,...
'RotationMode','auto',...
'FontName','Helvetica',...
'FontNameMode','auto',...
'FontUnitsMode','auto',...
'FontSize',10,...
'FontSizeMode','auto',...
'FontAngle','normal',...
'FontAngleMode','auto',...
'FontWeight','normal',...
'FontWeightMode','auto',...
'HorizontalAlignment','left',...
'HorizontalAlignmentMode','auto',...
'VerticalAlignment','middle',...
'VerticalAlignmentMode','auto',...
'EdgeColor','none',...
'EdgeColorMode','auto',...
'LineStyle','-',...
'LineStyleMode','auto',...
'LineWidth',0.5,...
'LineWidthMode','auto',...
'BackgroundColor','none',...
'BackgroundColorMode','auto',...
'Margin',3,...
'MarginMode','auto',...
'Clipping','off',...
'ClippingMode','auto',...
'Layer','middle',...
'LayerMode','auto',...
'FontSmoothing','on',...
'FontSmoothingMode','auto',...
'UnitsMode','auto',...
'IncludeRenderer','on',...
'IsContainer','off',...
'IsContainerMode','auto',...
'HG1EraseMode','auto',...
'BusyAction','queue',...
'Interruptible','on',...
'SelectionHighlight','on',...
'SelectionHighlightMode','auto',...
'HitTest','on',...
'HitTestMode','auto',...
'PickableParts','visible',...
'PickablePartsMode','auto',...
'XLimInclude','on',...
'XLimIncludeMode','auto',...
'YLimInclude','on',...
'YLimIncludeMode','auto',...
'ZLimInclude','on',...
'ZLimIncludeMode','auto',...
'CLimInclude','on',...
'CLimIncludeMode','auto',...
'ALimInclude','on',...
'ALimIncludeMode','auto',...
'Description','NumericRuler Label',...
'DescriptionMode','auto',...
'Visible','off',...
'VisibleMode','auto',...
'Serializable','on',...
'SerializableMode','auto',...
'HandleVisibility','off',...
'HandleVisibilityMode','auto',...
'TransformForPrintFcnImplicitInvoke','on',...
'TransformForPrintFcnImplicitInvokeMode','auto');
appdata = [];
appdata.lastValidTag = 'text20';
h7 = uicontrol(...
'Parent',h1,...
'FontUnits',get(0,'defaultuicontrolFontUnits'),...
'Units','normalized',...
'String','Staged operations',...
'Style','text',...
'Position',[0.386666666666667 0.918622848200313 0.238333333333333 0.0625978090766823],...
'Children',[],...
'ParentMode','manual',...
'Tag','text20',...
'FontSize',20,...
'CreateFcn', {@local_CreateFcn, blanks(0), appdata} );
appdata = [];
appdata.lastValidTag = 'list_cxd';
h8 = uicontrol(...
'Parent',h1,...
'FontUnits',get(0,'defaultuicontrolFontUnits'),...
'Units','normalized',...
'String','CXD files',...
'Style','listbox',...
'Value',1,...
'ValueMode',get(0,'defaultuicontrolValueMode'),...
'Position',[0.0166666666666667 0.137715179968701 0.149166666666667 0.780907668231612],...
'Callback',@(hObject,eventdata)LFD_MPIV_Interface('list_cxd_Callback',hObject,eventdata,guidata(hObject)),...
'Children',[],...
'ParentMode','manual',...
'CreateFcn', {@local_CreateFcn, @(hObject,eventdata)LFD_MPIV_Interface('list_cxd_CreateFcn',hObject,eventdata,guidata(hObject)), appdata} ,...
'Tag','list_cxd');
appdata = [];
appdata.lastValidTag = 'set_cxd_button';
h9 = uicontrol(...
'Parent',h1,...
'FontUnits',get(0,'defaultuicontrolFontUnits'),...
'Units','normalized',...
'String','Set CXD folder',...
'Style',get(0,'defaultuicontrolStyle'),...
'Position',[0.0225 0.943661971830986 0.1025 0.0328638497652582],...
'Callback',@(hObject,eventdata)LFD_MPIV_Interface('set_cxd_button_Callback',hObject,eventdata,guidata(hObject)),...
'Children',[],...
'ParentMode','manual',...
'CreateFcn', {@local_CreateFcn, blanks(0), appdata} ,...
'Tag','set_cxd_button');
appdata = [];
appdata.lastValidTag = 'list_expe';
h10 = uicontrol(...
'Parent',h1,...
'FontUnits',get(0,'defaultuicontrolFontUnits'),...
'Units','normalized',...
'String','Pending PIV',...
'Style','listbox',...
'Value',1,...
'ValueMode',get(0,'defaultuicontrolValueMode'),...
'Position',[0.385 0.370892018779343 0.5725 0.549295774647887],...
'Callback',@(hObject,eventdata)LFD_MPIV_Interface('list_expe_Callback',hObject,eventdata,guidata(hObject)),...
'Children',[],...
'KeyPressFcn',blanks(0),...
'ParentMode','manual',...
'CreateFcn', {@local_CreateFcn, @(hObject,eventdata)LFD_MPIV_Interface('list_expe_CreateFcn',hObject,eventdata,guidata(hObject)), appdata} ,...
'DeleteFcn',blanks(0),...
'ButtonDownFcn',blanks(0),...
'Tag','list_expe');
appdata = [];
appdata.lastValidTag = 'edt_PIV';
h11 = uicontrol(...
'Parent',h1,...
'FontUnits',get(0,'defaultuicontrolFontUnits'),...
'Units','normalized',...
'String','PIV Settings',...
'Style',get(0,'defaultuicontrolStyle'),...
'Position',[0.173333333333333 0.366197183098592 0.105 0.0516431924882629],...