-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDialogBoxes_wdr.py
2409 lines (1570 loc) · 88.9 KB
/
DialogBoxes_wdr.py
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
# -*- coding: iso-8859-15 -*-
#-----------------------------------------------------------------------------
# Python source generated by wxDesigner from file: DialogBoxes.wdr
# Do not modify this file, all changes will be lost!
#-----------------------------------------------------------------------------
# Include wxPython modules
import wx
import wx.grid
# Window functions
ID_THRESHOLD_TYPE = 10000
ID_THRESHOLD_MODE = 10001
ID_TEXT_LEVEL = 10002
ID_THRESHOLD = 10003
ID_THRESHOLD_SLIDER = 10004
ID_PERCENT_TEXT = 10005
ID_PERCENT = 10006
def ThresholdDialogFunc( parent, call_fit = True, set_sizer = True ):
item0 = wx.BoxSizer( wx.VERTICAL )
item1 = wx.BoxSizer( wx.HORIZONTAL )
item2 = wx.RadioBox( parent, ID_THRESHOLD_TYPE, "Type", wx.DefaultPosition, wx.DefaultSize,
["Simple","Low Pass","High Pass "] , 1, wx.RA_SPECIFY_COLS )
item1.Add( item2, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item3 = wx.RadioBox( parent, ID_THRESHOLD_MODE, "Mode", wx.DefaultPosition, wx.DefaultSize,
["Standard ","Inverse"] , 1, wx.RA_SPECIFY_COLS )
item3.SetToolTip( wx.ToolTip("standard or inverse video") )
item1.Add( item3, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item0.Add( item1, 0, wx.ALIGN_CENTER|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item4 = wx.BoxSizer( wx.HORIZONTAL )
item5 = wx.StaticText( parent, ID_TEXT_LEVEL, "level:", wx.DefaultPosition, wx.DefaultSize, 0 )
item4.Add( item5, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item6 = wx.TextCtrl( parent, ID_THRESHOLD, "", wx.DefaultPosition, [46,-1], 0 )
item4.Add( item6, 0, wx.ALIGN_CENTER|wx.TOP|wx.BOTTOM, 0 )
item7 = wx.Slider( parent, ID_THRESHOLD_SLIDER, 0, 0, 255, wx.DefaultPosition, [128,-1], wx.SL_HORIZONTAL )
item4.Add( item7, 0, wx.ALIGN_CENTER, 5 )
item0.Add( item4, 0, wx.ALIGN_CENTER|wx.LEFT|wx.RIGHT|wx.BOTTOM, 5 )
item8 = wx.BoxSizer( wx.HORIZONTAL )
item9 = wx.StaticText( parent, ID_PERCENT_TEXT, "% of pixels above threshold:", wx.DefaultPosition, wx.DefaultSize, 0 )
item8.Add( item9, 0, wx.ALIGN_CENTER|wx.LEFT|wx.RIGHT, 5 )
item10 = wx.TextCtrl( parent, ID_PERCENT, "", wx.DefaultPosition, [55,-1], wx.TE_READONLY )
item8.Add( item10, 0, wx.ALIGN_CENTER|wx.LEFT|wx.RIGHT, 5 )
item0.Add( item8, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item11 = wx.BoxSizer( wx.HORIZONTAL )
item12 = wx.Button( parent, wx.ID_OK, "OK", wx.DefaultPosition, wx.DefaultSize, 0 )
item12.SetDefault()
item11.Add( item12, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item13 = wx.Button( parent, wx.ID_CANCEL, "Cancel", wx.DefaultPosition, wx.DefaultSize, 0 )
item11.Add( item13, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item0.Add( item11, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
if set_sizer == True:
parent.SetSizer( item0 )
if call_fit == True:
item0.SetSizeHints( parent )
return item0
ID_ANGLE90 = 10007
ID_ANGLE180 = 10008
ID_ANGLE270 = 10009
ID_ANGLEOTHER = 10010
ID_ANGLE = 10011
ID_ANGLEFLIP = 10012
ID_ANGLEFLOP = 10013
def GeometricPage1Func( parent, call_fit = True, set_sizer = True ):
item0 = wx.BoxSizer( wx.VERTICAL )
item2 = wx.StaticBox( parent, -1, "angle selection" )
item1 = wx.StaticBoxSizer( item2, wx.VERTICAL )
item3 = wx.RadioButton( parent, ID_ANGLE90, "90 degrees", wx.DefaultPosition, wx.DefaultSize, wx.RB_GROUP )
item1.Add( item3, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item4 = wx.RadioButton( parent, ID_ANGLE180, "180 degrees", wx.DefaultPosition, wx.DefaultSize, 0 )
item1.Add( item4, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item5 = wx.RadioButton( parent, ID_ANGLE270, "270 degrees", wx.DefaultPosition, wx.DefaultSize, 0 )
item1.Add( item5, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
item6 = wx.BoxSizer( wx.HORIZONTAL )
item7 = wx.RadioButton( parent, ID_ANGLEOTHER, "Other angle: ", wx.DefaultPosition, wx.DefaultSize, 0 )
item6.Add( item7, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.LEFT|wx.SHAPED, 5 )
item8 = wx.TextCtrl( parent, ID_ANGLE, "", wx.DefaultPosition, [60,-1], 0 )
item6.Add( item8, 0, wx.ALIGN_CENTER, 5 )
item1.Add( item6, 0, wx.ALIGN_CENTER|wx.LEFT|wx.RIGHT|wx.TOP, 0 )
item9 = wx.RadioButton( parent, ID_ANGLEFLIP, "Flip - horizontally", wx.DefaultPosition, wx.DefaultSize, 0 )
item1.Add( item9, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT, 5 )
item10 = wx.RadioButton( parent, ID_ANGLEFLOP, "Flop - vertically", wx.DefaultPosition, wx.DefaultSize, 0 )
item1.Add( item10, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item0.Add( item1, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
if set_sizer == True:
parent.SetSizer( item0 )
if call_fit == True:
item0.SetSizeHints( parent )
return item0
ID_TEXT = 10014
ID_TRANS_DISTANCE = 10015
ID_RADIOBOX2 = 10016
def GeometricPage2Func( parent, call_fit = True, set_sizer = True ):
item0 = wx.BoxSizer( wx.VERTICAL )
item1 = wx.BoxSizer( wx.VERTICAL )
item2 = wx.BoxSizer( wx.HORIZONTAL )
item3 = wx.StaticText( parent, ID_TEXT, "roll distance: ", wx.DefaultPosition, wx.DefaultSize, 0 )
item2.Add( item3, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item4 = wx.TextCtrl( parent, ID_TRANS_DISTANCE, "", wx.DefaultPosition, [60,-1], 0 )
item2.Add( item4, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item1.Add( item2, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item5 = wx.RadioBox( parent, ID_RADIOBOX2, "direction", wx.DefaultPosition, [90,-1],
["left","right","up","down"] , 1, wx.RA_SPECIFY_COLS )
item1.Add( item5, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item0.Add( item1, 0, 0, 10 )
if set_sizer == True:
parent.SetSizer( item0 )
if call_fit == True:
item0.SetSizeHints( parent )
return item0
ID_GEOMETRIC_DIALOG = 10017
def GeometricDialogFunc( parent, call_fit = True, set_sizer = True ):
item0 = wx.BoxSizer( wx.VERTICAL )
item2 = wx.Notebook( parent, ID_GEOMETRIC_DIALOG, wx.DefaultPosition, [220,220], 0 )
if wx.VERSION >= (2,5,2):
item1 = item2
else:
item1 = wx.NotebookSizer( item2 )
item3 = wx.Panel( item2, -1 )
GeometricPage1Func(item3, False)
item2.AddPage( item3, "Rotate" )
item4 = wx.Panel( item2, -1 )
GeometricPage2Func(item4, False)
item2.AddPage( item4, "Roll" )
item0.Add( item1, 0, wx.ALIGN_CENTER|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item5 = wx.BoxSizer( wx.HORIZONTAL )
item6 = wx.Button( parent, wx.ID_OK, "OK", wx.DefaultPosition, wx.DefaultSize, 0 )
item6.SetDefault()
item5.Add( item6, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item7 = wx.Button( parent, wx.ID_CANCEL, "Cancel", wx.DefaultPosition, wx.DefaultSize, 0 )
item5.Add( item7, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item0.Add( item5, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
if set_sizer == True:
parent.SetSizer( item0 )
if call_fit == True:
item0.SetSizeHints( parent )
return item0
ID_SCALE_UNITS = 10018
ID_UNITS_TEXT = 10019
ID_SCALE_PIXELS = 10020
ID_PIXEL_TEXT = 10021
ID_SCALE_TIME = 10022
ID_TIME_TEXT = 10023
ID_SAVE_SCALE_BUTTON = 10024
ID_LOAD_SCALE_BUTTON = 10025
ID_SCALE_RESET_BUTTON = 10026
def ScaleDialogFunc( parent, call_fit = True, set_sizer = True ):
item0 = wx.BoxSizer( wx.VERTICAL )
item2 = wx.StaticBox( parent, -1, "Spacial scale" )
item1 = wx.StaticBoxSizer( item2, wx.VERTICAL )
item3 = wx.FlexGridSizer( 0, 2, 0, 0 )
item4 = wx.TextCtrl( parent, ID_SCALE_UNITS, "", wx.DefaultPosition, [60,-1], 0 )
item3.Add( item4, 0, wx.ALIGN_CENTER|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item5 = wx.StaticText( parent, ID_UNITS_TEXT, "user units", wx.DefaultPosition, wx.DefaultSize, 0 )
item3.Add( item5, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item6 = wx.TextCtrl( parent, ID_SCALE_PIXELS, "", wx.DefaultPosition, [60,-1], 0 )
item3.Add( item6, 0, wx.ALIGN_CENTER|wx.LEFT|wx.RIGHT, 5 )
item7 = wx.StaticText( parent, ID_PIXEL_TEXT, "image units", wx.DefaultPosition, wx.DefaultSize, wx.ST_NO_AUTORESIZE )
item3.Add( item7, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT, 5 )
item1.Add( item3, 0, wx.ALIGN_CENTER, 5 )
item0.Add( item1, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item9 = wx.StaticBox( parent, -1, "Time scale" )
item8 = wx.StaticBoxSizer( item9, wx.VERTICAL )
item10 = wx.BoxSizer( wx.HORIZONTAL )
item11 = wx.TextCtrl( parent, ID_SCALE_TIME, "", wx.DefaultPosition, [60,-1], 0 )
item10.Add( item11, 0, wx.ALIGN_CENTER|wx.LEFT|wx.RIGHT, 5 )
item12 = wx.StaticText( parent, ID_TIME_TEXT, "frame rate (f/s)", wx.DefaultPosition, wx.DefaultSize, 0 )
item10.Add( item12, 0, wx.ALIGN_CENTER_VERTICAL|wx.RIGHT|wx.TOP, 5 )
item8.Add( item10, 0, wx.ALIGN_CENTER|wx.TOP, 5 )
item0.Add( item8, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item13 = wx.BoxSizer( wx.HORIZONTAL )
item14 = wx.Button( parent, ID_SAVE_SCALE_BUTTON, "Save", wx.DefaultPosition, [50,-1], 0 )
item13.Add( item14, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item15 = wx.Button( parent, ID_LOAD_SCALE_BUTTON, "Load", wx.DefaultPosition, [50,-1], 0 )
item13.Add( item15, 0, wx.ALIGN_CENTER|wx.TOP|wx.BOTTOM, 5 )
item16 = wx.Button( parent, ID_SCALE_RESET_BUTTON, "Reset", wx.DefaultPosition, [50,-1], 0 )
item13.Add( item16, 0, wx.ALIGN_CENTER|wx.LEFT|wx.TOP|wx.BOTTOM, 5 )
item0.Add( item13, 0, wx.ALIGN_CENTER|wx.RIGHT, 5 )
item17 = wx.BoxSizer( wx.HORIZONTAL )
item18 = wx.Button( parent, wx.ID_OK, "OK", wx.DefaultPosition, wx.DefaultSize, 0 )
item18.SetDefault()
item17.Add( item18, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item19 = wx.Button( parent, wx.ID_CANCEL, "Cancel", wx.DefaultPosition, wx.DefaultSize, 0 )
item17.Add( item19, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item0.Add( item17, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
if set_sizer == True:
parent.SetSizer( item0 )
if call_fit == True:
item0.SetSizeHints( parent )
return item0
ID_INTENSITY = 10027
ID_GRADIENT = 10028
ID_SECOND_DERIVATIVE = 10029
ID_EVEN_SPACING = 10030
ID_TOTAL_LENGTH = 10031
ID_FIXED = 10032
ID_NPOINTS = 10033
ID_VARIABLE = 10034
ID_RESULT_FORMAT = 10035
ID_VELOCITY_X = 10036
ID_VELOCITY_Y = 10037
ID_USE_VELOCITY = 10038
ID_TEXT_II = 10039
ID_IDEAL_INTENS = 10040
ID_TEXT_PIXSEARCH = 10041
ID_PIXELS_TO_SEARCH = 10042
ID_TEXT_IPR = 10043
ID_IPR = 10044
ID_RESET = 10045
ID_SLITHER = 10046
def SnakeDialogFunc( parent, call_fit = True, set_sizer = True ):
item0 = wx.BoxSizer( wx.HORIZONTAL )
item1 = wx.BoxSizer( wx.VERTICAL )
item3 = wx.StaticBox( parent, -1, "Energy function weights" )
item2 = wx.StaticBoxSizer( item3, wx.VERTICAL )
item4 = wx.BoxSizer( wx.HORIZONTAL )
item5 = wx.StaticText( parent, ID_TEXT, "Intensity", wx.DefaultPosition, wx.DefaultSize, 0 )
item4.Add( item5, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item6 = wx.TextCtrl( parent, ID_INTENSITY, "", wx.DefaultPosition, [50,23], 0 )
item4.Add( item6, 0, wx.ALIGN_CENTER|wx.ALL, 0 )
item2.Add( item4, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 5 )
item7 = wx.BoxSizer( wx.HORIZONTAL )
item8 = wx.StaticText( parent, ID_TEXT, "Gradient", wx.DefaultPosition, wx.DefaultSize, 0 )
item7.Add( item8, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item9 = wx.TextCtrl( parent, ID_GRADIENT, "", wx.DefaultPosition, [50,23], 0 )
item7.Add( item9, 0, wx.ALIGN_CENTER|wx.ALL, 0 )
item2.Add( item7, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 0 )
item10 = wx.BoxSizer( wx.HORIZONTAL )
item11 = wx.StaticText( parent, ID_TEXT, "Second derivative", wx.DefaultPosition, wx.DefaultSize, 0 )
item10.Add( item11, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item12 = wx.TextCtrl( parent, ID_SECOND_DERIVATIVE, "", wx.DefaultPosition, [50,23], 0 )
item10.Add( item12, 0, wx.ALIGN_CENTER|wx.ALL, 0 )
item2.Add( item10, 0, wx.ALIGN_CENTER, 0 )
item13 = wx.BoxSizer( wx.HORIZONTAL )
item14 = wx.StaticText( parent, ID_TEXT, "Even spacing", wx.DefaultPosition, wx.DefaultSize, 0 )
item13.Add( item14, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item15 = wx.TextCtrl( parent, ID_EVEN_SPACING, "", wx.DefaultPosition, [50,23], 0 )
item13.Add( item15, 0, wx.ALIGN_CENTER|wx.ALL, 0 )
item2.Add( item13, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 0 )
item16 = wx.BoxSizer( wx.HORIZONTAL )
item17 = wx.StaticText( parent, ID_TEXT, "Total length", wx.DefaultPosition, wx.DefaultSize, 0 )
item16.Add( item17, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item18 = wx.TextCtrl( parent, ID_TOTAL_LENGTH, "", wx.DefaultPosition, [50,23], 0 )
item16.Add( item18, 0, wx.ALIGN_CENTER|wx.ALL, 0 )
item2.Add( item16, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 0 )
item1.Add( item2, 0, wx.ALIGN_CENTER|wx.TOP, 5 )
item20 = wx.StaticBox( parent, -1, "Snake points" )
item19 = wx.StaticBoxSizer( item20, wx.VERTICAL )
item21 = wx.BoxSizer( wx.HORIZONTAL )
item22 = wx.RadioButton( parent, ID_FIXED, "fixed number", wx.DefaultPosition, wx.DefaultSize, wx.RB_GROUP )
item21.Add( item22, 0, wx.ALIGN_CENTER|wx.RIGHT, 0 )
item23 = wx.TextCtrl( parent, ID_NPOINTS, "", wx.DefaultPosition, [50,23], 0 )
item21.Add( item23, 0, wx.ALIGN_CENTER|wx.LEFT, 0 )
item19.Add( item21, 0, wx.ALIGN_CENTER_VERTICAL, 0 )
item24 = wx.BoxSizer( wx.HORIZONTAL )
item25 = wx.RadioButton( parent, ID_VARIABLE, "variable (%) ", wx.DefaultPosition, wx.DefaultSize, 0 )
item24.Add( item25, 0, wx.ALIGN_CENTER|wx.ALL, 0 )
item26 = wx.TextCtrl( parent, ID_PERCENT, "", wx.DefaultPosition, [50,23], 0 )
item24.Add( item26, 0, wx.ALIGN_CENTER|wx.LEFT, 0 )
item19.Add( item24, 0, wx.ALIGN_CENTER_VERTICAL, 0 )
item1.Add( item19, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item27 = wx.RadioBox( parent, ID_RESULT_FORMAT, "Result format", wx.DefaultPosition, wx.DefaultSize,
["short - centroid/radius","long - points under line"] , 1, wx.RA_SPECIFY_COLS )
item1.Add( item27, 0, wx.ALIGN_CENTER|wx.ALL, 0 )
item0.Add( item1, 0, wx.ALL, 5 )
item28 = wx.BoxSizer( wx.VERTICAL )
item30 = wx.StaticBox( parent, -1, "Velocity vector" )
item29 = wx.StaticBoxSizer( item30, wx.VERTICAL )
item31 = wx.BoxSizer( wx.HORIZONTAL )
item32 = wx.StaticText( parent, ID_TEXT, "X velocity", wx.DefaultPosition, wx.DefaultSize, 0 )
item31.Add( item32, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item33 = wx.TextCtrl( parent, ID_VELOCITY_X, "", wx.DefaultPosition, [50,23], 0 )
item31.Add( item33, 0, wx.ALIGN_CENTER|wx.ALL, 0 )
item29.Add( item31, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 5 )
item34 = wx.BoxSizer( wx.HORIZONTAL )
item35 = wx.StaticText( parent, ID_TEXT, "Y velocity", wx.DefaultPosition, wx.DefaultSize, 0 )
item34.Add( item35, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item36 = wx.TextCtrl( parent, ID_VELOCITY_Y, "", wx.DefaultPosition, [50,23], 0 )
item34.Add( item36, 0, wx.ALIGN_CENTER|wx.ALL, 0 )
item29.Add( item34, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 5 )
item37 = wx.CheckBox( parent, ID_USE_VELOCITY, "use velocity", wx.DefaultPosition, wx.DefaultSize, 0 )
item29.Add( item37, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item28.Add( item29, 0, wx.ALIGN_CENTER|wx.LEFT|wx.RIGHT|wx.BOTTOM, 5 )
item38 = wx.BoxSizer( wx.HORIZONTAL )
item39 = wx.StaticText( parent, ID_TEXT_II, "Ideal intensity", wx.DefaultPosition, wx.DefaultSize, 0 )
item38.Add( item39, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item40 = wx.TextCtrl( parent, ID_IDEAL_INTENS, "", wx.DefaultPosition, [50,23], 0 )
item38.Add( item40, 0, wx.ALIGN_CENTER|wx.RIGHT, 5 )
item28.Add( item38, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.TOP, 10 )
item41 = wx.BoxSizer( wx.HORIZONTAL )
item42 = wx.StaticText( parent, ID_TEXT_PIXSEARCH, "Pixels to search", wx.DefaultPosition, wx.DefaultSize, 0 )
item41.Add( item42, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item43 = wx.TextCtrl( parent, ID_PIXELS_TO_SEARCH, "", wx.DefaultPosition, [50,23], 0 )
item41.Add( item43, 0, wx.ALIGN_CENTER|wx.RIGHT, 5 )
item28.Add( item41, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.TOP, 0 )
item44 = wx.BoxSizer( wx.HORIZONTAL )
item45 = wx.StaticText( parent, ID_TEXT_IPR, "Processing Radius", wx.DefaultPosition, wx.DefaultSize, 0 )
item44.Add( item45, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item46 = wx.TextCtrl( parent, ID_IPR, "", wx.DefaultPosition, [50,23], 0 )
item44.Add( item46, 0, wx.ALIGN_CENTER|wx.RIGHT, 5 )
item28.Add( item44, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 5 )
item47 = wx.BoxSizer( wx.HORIZONTAL )
item48 = wx.Button( parent, ID_RESET, "Reset", wx.DefaultPosition, [65,-1], 0 )
item47.Add( item48, 0, wx.ALIGN_CENTER|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item49 = wx.Button( parent, ID_SLITHER, "Slither", wx.DefaultPosition, [65,-1], 0 )
item47.Add( item49, 0, wx.ALIGN_CENTER|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item28.Add( item47, 0, wx.ALIGN_CENTER|wx.TOP, 25 )
item50 = wx.BoxSizer( wx.HORIZONTAL )
item51 = wx.Button( parent, wx.ID_OK, "OK", wx.DefaultPosition, [65,-1], 0 )
item51.SetDefault()
item50.Add( item51, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item52 = wx.Button( parent, wx.ID_CANCEL, "Cancel", wx.DefaultPosition, [65,-1], 0 )
item50.Add( item52, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item28.Add( item50, 0, wx.ALIGN_CENTER|wx.TOP, 0 )
item0.Add( item28, 0, wx.ALIGN_CENTER|wx.RIGHT|wx.TOP|wx.BOTTOM, 5 )
if set_sizer == True:
parent.SetSizer( item0 )
if call_fit == True:
item0.SetSizeHints( parent )
return item0
ID_RIGHT = 10047
ID_LEFT = 10048
ID_UP = 10049
ID_DOWN = 10050
ID_RADIO_ANGLE = 10051
ID_THRESH_CONSTRAIN = 10052
ID_SEARCH_TO_LINE = 10053
ID_SEARCH_AOI = 10054
def ThresholdTrackingDialogFunc( parent, call_fit = True, set_sizer = True ):
item0 = wx.BoxSizer( wx.VERTICAL )
item1 = wx.BoxSizer( wx.HORIZONTAL )
item3 = wx.StaticBox( parent, -1, "Direction" )
item2 = wx.StaticBoxSizer( item3, wx.VERTICAL )
item4 = wx.RadioButton( parent, ID_RIGHT, "right", wx.DefaultPosition, wx.DefaultSize, wx.RB_GROUP )
item2.Add( item4, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item5 = wx.RadioButton( parent, ID_LEFT, "left", wx.DefaultPosition, wx.DefaultSize, 0 )
item2.Add( item5, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item6 = wx.RadioButton( parent, ID_UP, "up", wx.DefaultPosition, wx.DefaultSize, 0 )
item2.Add( item6, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item7 = wx.RadioButton( parent, ID_DOWN, "down", wx.DefaultPosition, wx.DefaultSize, 0 )
item2.Add( item7, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
item8 = wx.BoxSizer( wx.HORIZONTAL )
item9 = wx.RadioButton( parent, ID_RADIO_ANGLE, "angle: ", wx.DefaultPosition, wx.DefaultSize, 0 )
item8.Add( item9, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.LEFT|wx.SHAPED, 5 )
item10 = wx.TextCtrl( parent, ID_ANGLE, "", wx.DefaultPosition, [54,23], 0 )
item8.Add( item10, 0, wx.ALIGN_CENTER, 5 )
item2.Add( item8, 0, wx.ALIGN_CENTER|wx.LEFT|wx.RIGHT, 0 )
item1.Add( item2, 0, wx.ALIGN_CENTER|wx.TOP, 5 )
item11 = wx.BoxSizer( wx.VERTICAL )
item13 = wx.StaticBox( parent, -1, "Velocity vector" )
item12 = wx.StaticBoxSizer( item13, wx.VERTICAL )
item14 = wx.BoxSizer( wx.HORIZONTAL )
item15 = wx.StaticText( parent, ID_TEXT, "X velocity", wx.DefaultPosition, wx.DefaultSize, 0 )
item14.Add( item15, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item16 = wx.TextCtrl( parent, ID_VELOCITY_X, "", wx.DefaultPosition, [50,23], 0 )
item14.Add( item16, 0, wx.ALIGN_CENTER|wx.ALL, 0 )
item12.Add( item14, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 5 )
item17 = wx.BoxSizer( wx.HORIZONTAL )
item18 = wx.StaticText( parent, ID_TEXT, "Y velocity", wx.DefaultPosition, wx.DefaultSize, 0 )
item17.Add( item18, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item19 = wx.TextCtrl( parent, ID_VELOCITY_Y, "", wx.DefaultPosition, [50,23], 0 )
item17.Add( item19, 0, wx.ALIGN_CENTER|wx.ALL, 0 )
item12.Add( item17, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 5 )
item20 = wx.CheckBox( parent, ID_USE_VELOCITY, "use velocity", wx.DefaultPosition, wx.DefaultSize, 0 )
item12.Add( item20, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item11.Add( item12, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT|wx.BOTTOM, 5 )
item21 = wx.BoxSizer( wx.VERTICAL )
item22 = wx.CheckBox( parent, ID_THRESH_CONSTRAIN, "Constrain AOI to line", wx.DefaultPosition, wx.DefaultSize, 0 )
item21.Add( item22, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT|wx.BOTTOM, 5 )
item23 = wx.RadioButton( parent, ID_SEARCH_TO_LINE, "constrain search to line", wx.DefaultPosition, wx.DefaultSize, wx.RB_GROUP )
item21.Add( item23, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.BOTTOM, 5 )
item24 = wx.RadioButton( parent, ID_SEARCH_AOI, "allow full AOI search", wx.DefaultPosition, wx.DefaultSize, 0 )
item21.Add( item24, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT, 5 )
item11.Add( item21, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item1.Add( item11, 0, wx.ALIGN_CENTER|wx.LEFT|wx.TOP|wx.BOTTOM, 5 )
item0.Add( item1, 0, wx.ALIGN_CENTER|wx.LEFT, 5 )
item25 = wx.BoxSizer( wx.HORIZONTAL )
item26 = wx.Button( parent, wx.ID_OK, "OK", wx.DefaultPosition, wx.DefaultSize, 0 )
item26.SetDefault()
item25.Add( item26, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item27 = wx.Button( parent, wx.ID_CANCEL, "Cancel", wx.DefaultPosition, wx.DefaultSize, 0 )
item25.Add( item27, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item0.Add( item25, 0, wx.ALIGN_CENTER|wx.LEFT|wx.RIGHT|wx.BOTTOM, 5 )
if set_sizer == True:
parent.SetSizer( item0 )
if call_fit == True:
item0.SetSizeHints( parent )
return item0
ID_RADIO_FIRST = 10055
ID_GOTO_FIRST = 10056
ID_RADIO_LAST = 10057
ID_GOTO_LAST = 10058
ID_RADIO_SPECIFIC = 10059
ID_GOTO_SPECIFIC = 10060
def GotoFrameDialogFunc( parent, call_fit = True, set_sizer = True ):
item0 = wx.BoxSizer( wx.VERTICAL )
item1 = wx.FlexGridSizer( 0, 2, 0, 0 )
item2 = wx.RadioButton( parent, ID_RADIO_FIRST, "Goto first frame", wx.DefaultPosition, wx.DefaultSize, wx.RB_GROUP )
item1.Add( item2, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item3 = wx.TextCtrl( parent, ID_GOTO_FIRST, "", wx.DefaultPosition, [50,23], 0 )
item1.Add( item3, 0, wx.ALIGN_CENTER|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item4 = wx.RadioButton( parent, ID_RADIO_LAST, "Goto last frame", wx.DefaultPosition, wx.DefaultSize, 0 )
item1.Add( item4, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT, 5 )
item5 = wx.TextCtrl( parent, ID_GOTO_LAST, "", wx.DefaultPosition, [50,23], 0 )
item1.Add( item5, 0, wx.ALIGN_CENTER|wx.LEFT|wx.RIGHT, 5 )
item6 = wx.RadioButton( parent, ID_RADIO_SPECIFIC, "Goto specific frame", wx.DefaultPosition, wx.DefaultSize, 0 )
item1.Add( item6, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT|wx.BOTTOM, 5 )
item7 = wx.TextCtrl( parent, ID_GOTO_SPECIFIC, "", wx.DefaultPosition, [50,23], 0 )
item1.Add( item7, 0, wx.ALIGN_CENTER|wx.LEFT|wx.RIGHT|wx.BOTTOM, 5 )
item0.Add( item1, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item8 = wx.BoxSizer( wx.HORIZONTAL )
item9 = wx.Button( parent, wx.ID_OK, "OK", wx.DefaultPosition, wx.DefaultSize, 0 )
item9.SetDefault()
item8.Add( item9, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item10 = wx.Button( parent, wx.ID_CANCEL, "Cancel", wx.DefaultPosition, wx.DefaultSize, 0 )
item8.Add( item10, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item0.Add( item8, 0, wx.ALIGN_CENTER|wx.LEFT|wx.RIGHT|wx.BOTTOM, 5 )
if set_sizer == True:
parent.SetSizer( item0 )
if call_fit == True:
item0.SetSizeHints( parent )
return item0
ID_CENTER_OF_MASS = 10061
ID_CENTER_GRAYSCALE = 10062
ID_FOUR_SIDE_EDGE = 10063
ID_SAVE0 = 10064
ID_SAVE1 = 10065
ID_SAVE2 = 10066
ID_CENTER_VELOCITY_X = 10067
ID_CENTER_VELOCITY_Y = 10068
ID_CENTER_USE_VELOCITY = 10069
def CenterTrackingDialogFunc( parent, call_fit = True, set_sizer = True ):
item0 = wx.BoxSizer( wx.VERTICAL )
item1 = wx.BoxSizer( wx.VERTICAL )
item3 = wx.StaticBox( parent, -1, "Method" )
item2 = wx.StaticBoxSizer( item3, wx.VERTICAL )
item4 = wx.RadioButton( parent, ID_CENTER_OF_MASS, "center of mass - threshold", wx.DefaultPosition, wx.DefaultSize, wx.RB_GROUP )
item2.Add( item4, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item5 = wx.RadioButton( parent, ID_CENTER_GRAYSCALE, "center of mass - grayscale", wx.DefaultPosition, wx.DefaultSize, 0 )
item2.Add( item5, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item6 = wx.RadioButton( parent, ID_FOUR_SIDE_EDGE, "four side edge - threshold only", wx.DefaultPosition, wx.DefaultSize, 0 )
item2.Add( item6, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item1.Add( item2, 0, wx.ALIGN_CENTER|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item0.Add( item1, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item7 = wx.BoxSizer( wx.VERTICAL )
item9 = wx.StaticBox( parent, -1, "Save data to Results file" )
item8 = wx.StaticBoxSizer( item9, wx.VERTICAL )
item10 = wx.RadioButton( parent, ID_SAVE0, "center (x, y)", wx.DefaultPosition, wx.DefaultSize, wx.RB_GROUP )
item8.Add( item10, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item11 = wx.RadioButton( parent, ID_SAVE1, "center, width, height", wx.DefaultPosition, wx.DefaultSize, 0 )
item8.Add( item11, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item12 = wx.RadioButton( parent, ID_SAVE2, "center, width, height, p0, p90, p180, p270", wx.DefaultPosition, wx.DefaultSize, 0 )
item8.Add( item12, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item7.Add( item8, 0, wx.ALIGN_CENTER|wx.LEFT|wx.RIGHT, 5 )
item0.Add( item7, 0, wx.ALIGN_CENTER, 5 )
item13 = wx.BoxSizer( wx.VERTICAL )
item15 = wx.StaticBox( parent, -1, "Velocity vector" )
item14 = wx.StaticBoxSizer( item15, wx.VERTICAL )
item16 = wx.BoxSizer( wx.HORIZONTAL )
item17 = wx.StaticText( parent, ID_TEXT, "X velocity", wx.DefaultPosition, wx.DefaultSize, 0 )
item16.Add( item17, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item18 = wx.TextCtrl( parent, ID_CENTER_VELOCITY_X, "", wx.DefaultPosition, [50,23], 0 )
item16.Add( item18, 0, wx.ALIGN_CENTER|wx.ALL, 0 )
item14.Add( item16, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 5 )
item19 = wx.BoxSizer( wx.HORIZONTAL )
item20 = wx.StaticText( parent, ID_TEXT, "Y velocity", wx.DefaultPosition, wx.DefaultSize, 0 )
item19.Add( item20, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item21 = wx.TextCtrl( parent, ID_CENTER_VELOCITY_Y, "", wx.DefaultPosition, [50,23], 0 )
item19.Add( item21, 0, wx.ALIGN_CENTER|wx.ALL, 0 )
item14.Add( item19, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 5 )
item22 = wx.CheckBox( parent, ID_CENTER_USE_VELOCITY, "use velocity", wx.DefaultPosition, wx.DefaultSize, 0 )
item14.Add( item22, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item13.Add( item14, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item0.Add( item13, 0, wx.ALIGN_CENTER, 0 )
item23 = wx.BoxSizer( wx.HORIZONTAL )
item24 = wx.Button( parent, wx.ID_OK, "OK", wx.DefaultPosition, wx.DefaultSize, 0 )
item24.SetDefault()
item23.Add( item24, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item25 = wx.Button( parent, wx.ID_CANCEL, "Cancel", wx.DefaultPosition, wx.DefaultSize, 0 )
item23.Add( item25, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item0.Add( item23, 0, wx.ALIGN_CENTER|wx.LEFT|wx.RIGHT|wx.BOTTOM, 5 )
if set_sizer == True:
parent.SetSizer( item0 )
if call_fit == True:
item0.SetSizeHints( parent )
return item0
ID_MAX_RIGHT = 10070
ID_MAX_LEFT = 10071
ID_MAX_UP = 10072
ID_MAX_DOWN = 10073
ID_MAX_RADIO_ANGLE = 10074
ID_MAX_ANGLE = 10075
ID_MAX_CONSTRAIN = 10076
ID_MAX_VELOCITY_X = 10077
ID_MAX_VELOCITY_Y = 10078
ID_MAX_USE_VELOCITY = 10079
def LocalMaxDialogFunc( parent, call_fit = True, set_sizer = True ):
item0 = wx.BoxSizer( wx.VERTICAL )
item1 = wx.BoxSizer( wx.HORIZONTAL )
item3 = wx.StaticBox( parent, -1, "Direction" )
item2 = wx.StaticBoxSizer( item3, wx.VERTICAL )
item4 = wx.RadioButton( parent, ID_MAX_RIGHT, "right", wx.DefaultPosition, wx.DefaultSize, wx.RB_GROUP )
item2.Add( item4, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item5 = wx.RadioButton( parent, ID_MAX_LEFT, "left", wx.DefaultPosition, wx.DefaultSize, 0 )
item2.Add( item5, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item6 = wx.RadioButton( parent, ID_MAX_UP, "up", wx.DefaultPosition, wx.DefaultSize, 0 )
item2.Add( item6, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item7 = wx.RadioButton( parent, ID_MAX_DOWN, "down", wx.DefaultPosition, wx.DefaultSize, 0 )
item2.Add( item7, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
item8 = wx.BoxSizer( wx.HORIZONTAL )
item9 = wx.RadioButton( parent, ID_MAX_RADIO_ANGLE, "angle: ", wx.DefaultPosition, wx.DefaultSize, 0 )
item8.Add( item9, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.LEFT|wx.SHAPED, 5 )
item10 = wx.TextCtrl( parent, ID_MAX_ANGLE, "", wx.DefaultPosition, [50,23], 0 )
item8.Add( item10, 0, wx.ALIGN_CENTER, 5 )
item2.Add( item8, 0, wx.ALIGN_CENTER|wx.LEFT|wx.RIGHT|wx.TOP, 0 )
item11 = wx.CheckBox( parent, ID_MAX_CONSTRAIN, "Constrain to line", wx.DefaultPosition, wx.DefaultSize, 0 )
item2.Add( item11, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
item1.Add( item2, 0, wx.ALIGN_CENTER|wx.TOP, 5 )
item12 = wx.BoxSizer( wx.VERTICAL )
item14 = wx.StaticBox( parent, -1, "Velocity vector" )
item13 = wx.StaticBoxSizer( item14, wx.VERTICAL )
item15 = wx.BoxSizer( wx.HORIZONTAL )
item16 = wx.StaticText( parent, ID_TEXT, "X velocity", wx.DefaultPosition, wx.DefaultSize, 0 )
item15.Add( item16, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item17 = wx.TextCtrl( parent, ID_MAX_VELOCITY_X, "", wx.DefaultPosition, [50,23], 0 )
item15.Add( item17, 0, wx.ALIGN_CENTER|wx.ALL, 0 )
item13.Add( item15, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 5 )
item18 = wx.BoxSizer( wx.HORIZONTAL )
item19 = wx.StaticText( parent, ID_TEXT, "Y velocity", wx.DefaultPosition, wx.DefaultSize, 0 )
item18.Add( item19, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item20 = wx.TextCtrl( parent, ID_MAX_VELOCITY_Y, "", wx.DefaultPosition, [50,23], 0 )
item18.Add( item20, 0, wx.ALIGN_CENTER|wx.ALL, 0 )
item13.Add( item18, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 5 )
item21 = wx.CheckBox( parent, ID_MAX_USE_VELOCITY, "use velocity", wx.DefaultPosition, wx.DefaultSize, 0 )
item13.Add( item21, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item12.Add( item13, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item22 = wx.BoxSizer( wx.HORIZONTAL )
item23 = wx.Button( parent, wx.ID_OK, "OK", wx.DefaultPosition, [60,-1], 0 )
item23.SetDefault()
item22.Add( item23, 0, wx.ALIGN_CENTER|wx.RIGHT|wx.TOP|wx.BOTTOM, 5 )
item24 = wx.Button( parent, wx.ID_CANCEL, "Cancel", wx.DefaultPosition, [60,-1], 0 )
item22.Add( item24, 0, wx.ALIGN_CENTER|wx.RIGHT|wx.TOP|wx.BOTTOM, 5 )
item12.Add( item22, 0, wx.ALIGN_CENTER|wx.TOP, 15 )
item1.Add( item12, 0, wx.ALIGN_CENTER|wx.LEFT|wx.TOP|wx.BOTTOM, 5 )
item0.Add( item1, 0, wx.ALIGN_CENTER|wx.LEFT, 5 )
if set_sizer == True:
parent.SetSizer( item0 )
if call_fit == True:
item0.SetSizeHints( parent )
return item0
ID_MORPHO_TYPE = 10080
ID_ITERATIONS = 10081
ID_TEXT_ITERATIONS = 10082
def MorphologicalDialogFunc( parent, call_fit = True, set_sizer = True ):
item0 = wx.BoxSizer( wx.VERTICAL )
item1 = wx.RadioBox( parent, ID_MORPHO_TYPE, "Algorithms", wx.DefaultPosition, wx.DefaultSize,
["Erode","Dilate","Reconstruct","Outline","Skeleton","Hole fill","Hole extract","Border kill","Border line kill"] , 1, wx.RA_SPECIFY_COLS )
item0.Add( item1, 0, wx.ALIGN_CENTER|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item2 = wx.BoxSizer( wx.HORIZONTAL )
item3 = wx.ComboBox( parent, ID_ITERATIONS, "", wx.DefaultPosition, [60,-1],
["1","2","3","4","5","6","7","8","9"] , wx.CB_DROPDOWN )
item2.Add( item3, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item4 = wx.StaticText( parent, ID_TEXT_ITERATIONS, "iterations", wx.DefaultPosition, wx.DefaultSize, 0 )
item2.Add( item4, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item0.Add( item2, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item5 = wx.BoxSizer( wx.HORIZONTAL )
item6 = wx.Button( parent, wx.ID_OK, "OK", wx.DefaultPosition, wx.DefaultSize, 0 )
item6.SetDefault()
item5.Add( item6, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item7 = wx.Button( parent, wx.ID_CANCEL, "Cancel", wx.DefaultPosition, wx.DefaultSize, 0 )
item5.Add( item7, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item0.Add( item5, 0, wx.ALIGN_CENTER|wx.LEFT|wx.RIGHT|wx.BOTTOM, 5 )
if set_sizer == True:
parent.SetSizer( item0 )
if call_fit == True:
item0.SetSizeHints( parent )
return item0
ID_TEXT_WIDTH = 10083
ID_RESIZE_WIDTH = 10084
ID_TEXT_HEIGHT = 10085
ID_RESIZE_HEIGHT = 10086
ID_CONSTRAIN_ASPECT = 10087
ID_DIM_TYPE = 10088
def ResizeImageDialogFunc( parent, call_fit = True, set_sizer = True ):
item0 = wx.BoxSizer( wx.VERTICAL )
item1 = wx.BoxSizer( wx.HORIZONTAL )
item3 = wx.StaticBox( parent, -1, "Dimensions" )
item2 = wx.StaticBoxSizer( item3, wx.VERTICAL )
item4 = wx.BoxSizer( wx.HORIZONTAL )
item5 = wx.StaticText( parent, ID_TEXT_WIDTH, "Width:", wx.DefaultPosition, wx.DefaultSize, 0 )
item4.Add( item5, 0, wx.ALIGN_CENTER|wx.RIGHT|wx.TOP, 5 )
item6 = wx.TextCtrl( parent, ID_RESIZE_WIDTH, "", wx.DefaultPosition, [70,-1], 0 )
item4.Add( item6, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item2.Add( item4, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 5 )
item7 = wx.BoxSizer( wx.HORIZONTAL )
item8 = wx.StaticText( parent, ID_TEXT_HEIGHT, "Height:", wx.DefaultPosition, wx.DefaultSize, 0 )
item7.Add( item8, 0, wx.ALIGN_CENTER|wx.LEFT|wx.RIGHT|wx.BOTTOM, 5 )
item9 = wx.TextCtrl( parent, ID_RESIZE_HEIGHT, "", wx.DefaultPosition, [70,-1], 0 )
item7.Add( item9, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item2.Add( item7, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 5 )
item1.Add( item2, 0, wx.ALIGN_CENTER|wx.RIGHT|wx.TOP, 5 )
item10 = wx.BoxSizer( wx.VERTICAL )
item11 = wx.CheckBox( parent, ID_CONSTRAIN_ASPECT, "Constrain aspect ratio", wx.DefaultPosition, wx.DefaultSize, 0 )
item10.Add( item11, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.TOP|wx.BOTTOM, 5 )
item12 = wx.ComboBox( parent, ID_DIM_TYPE, "", wx.DefaultPosition, [100,-1],
["pixels","percent"] , wx.CB_DROPDOWN|wx.CB_READONLY )
item10.Add( item12, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
item1.Add( item10, 0, wx.ALIGN_CENTER|wx.TOP|wx.BOTTOM, 10 )
item0.Add( item1, 0, wx.ALIGN_CENTER|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
item13 = wx.BoxSizer( wx.HORIZONTAL )
item14 = wx.Button( parent, wx.ID_OK, "OK", wx.DefaultPosition, wx.DefaultSize, 0 )
item14.SetDefault()
item13.Add( item14, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item15 = wx.Button( parent, wx.ID_CANCEL, "Cancel", wx.DefaultPosition, wx.DefaultSize, 0 )
item13.Add( item15, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item0.Add( item13, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
if set_sizer == True:
parent.SetSizer( item0 )
if call_fit == True:
item0.SetSizeHints( parent )
return item0
ID_EXTRACT_FIELD = 10089
def ExtractFieldDialogFunc( parent, call_fit = True, set_sizer = True ):
item0 = wx.BoxSizer( wx.VERTICAL )
item1 = wx.RadioBox( parent, ID_EXTRACT_FIELD, "Extract", wx.DefaultPosition, wx.DefaultSize,
["Odd field","Even field","Swap field order"] , 1, wx.RA_SPECIFY_COLS )
item0.Add( item1, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item2 = wx.BoxSizer( wx.HORIZONTAL )
item3 = wx.Button( parent, wx.ID_OK, "OK", wx.DefaultPosition, [60,-1], 0 )
item3.SetDefault()
item2.Add( item3, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item4 = wx.Button( parent, wx.ID_CANCEL, "Cancel", wx.DefaultPosition, [60,-1], 0 )
item2.Add( item4, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item0.Add( item2, 0, wx.ALIGN_CENTER|wx.LEFT|wx.TOP|wx.BOTTOM, 5 )
if set_sizer == True:
parent.SetSizer( item0 )
if call_fit == True:
item0.SetSizeHints( parent )
return item0
ID_BOTH_FIELDS = 10090
ID_ODD_FIRST = 10091
ID_EVEN_FIRST = 10092
ID_STEP_SIZE = 10093
ID_SS_TEXT = 10094
ID_FRAMESTOTRACK = 10095
ID_NFT_TEXT = 10096
def NextStepOptionsDialogFunc( parent, call_fit = True, set_sizer = True ):
item0 = wx.BoxSizer( wx.VERTICAL )
item2 = wx.StaticBox( parent, -1, "Step between" )
item1 = wx.StaticBoxSizer( item2, wx.VERTICAL )
item3 = wx.RadioButton( parent, ID_BOTH_FIELDS, "frames (both fields)", wx.DefaultPosition, wx.DefaultSize, 0 )
item3.SetToolTip( wx.ToolTip("maintains 1 image frame for each video frame") )
item1.Add( item3, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
item4 = wx.RadioButton( parent, ID_ODD_FIRST, "fields (odd first)", wx.DefaultPosition, wx.DefaultSize, 0 )
item4.SetToolTip( wx.ToolTip("2 image frames per each video frame") )
item1.Add( item4, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT|wx.BOTTOM, 5 )
item5 = wx.RadioButton( parent, ID_EVEN_FIRST, "fields (even first)", wx.DefaultPosition, wx.DefaultSize, 0 )
item5.SetToolTip( wx.ToolTip("2 image frames per each video frame") )
item1.Add( item5, 0, wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT, 5 )
item0.Add( item1, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
item6 = wx.BoxSizer( wx.VERTICAL )
item7 = wx.BoxSizer( wx.HORIZONTAL )
item8 = wx.TextCtrl( parent, ID_STEP_SIZE, "", wx.DefaultPosition, [60,-1], 0 )