-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdesign_interface.kv
More file actions
421 lines (416 loc) · 13.8 KB
/
design_interface.kv
File metadata and controls
421 lines (416 loc) · 13.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
<ToggleButton>
font_size: 15
background_normal:''
background_color:(24/255.0, 192/255.0, 214/255.0, 1)
valign: 'middle'
halign: 'center'
<CheckBox>
color:(1,1,1,2)
size_hint: (.04, .06)
<MyApp>
id: my_app
FloatLayout:
size: root.width, root.height
Label:
text:'Nouveau'
group: 'mode'
size_hint: (.04, .03)
pos_hint: {'x':.01, 'top':.97}
Label:
text:'Ouvrir'
group: 'mode'
halign:'left'
size_hint: (.03, .03)
pos_hint: {'x':.01, 'top':.93}
CheckBox:
id:check_new
pos_hint: {'x':.045, 'top':.97}
size_hint: (.03, .03)
CheckBox:
id:check_open
pos_hint: {'x':.045, 'top':.93}
size_hint: (.03, .03)
Label:
text:'Entrez le chemin vers le répertoire ou le fichier (.raw) :'
size_hint: (.28, .04)
pos_hint: {'x':.08, 'top':.99}
TextInput:
id: path_input
multiline: False
font_size: 12
on_text_validate: root.im_select()
size_hint: (.28, .04)
pos_hint: {'x':.08, 'top':.95}
Label:
id: nb_marqueurs
text: 'Nombre de marqueurs :'
font_size: 15
size_hint: (.1, .05)
pos_hint:{'x':.38, 'top':.98}
color: 1,1,1,1
TextInput:
id: marq_nb_input
text: ''
font_size: 15
size_hint: (.02, .045)
pos_hint:{'x':.49, 'top':.98}
multiline: False
on_text_validate: root.nb_marqueurs_input()
Label:
id: label_ready
text:''
size_hint: (.38, .04)
pos_hint: {'x':.01, 'top':.9}
Image: #séquence d'images (.jpg)
id: image_show
size_hint: ((.78/(600/root.height)*(500/root.width)), .78)
background_color:(0,0,0,0)
pos_hint: {'x':.025, 'top':.85}
allow_stretch: True
keep_ratio: False
on_touch_down: root.pos_marqueur(args[1].pos)
on_touch_down: root.labelize_manual(args[1].pos)
Label: #indicateur (0,0) de l'image
id:origine
pos_hint: {'x':.03, 'top':.85}
size_hint: (.033, .02)
text: '(0, 0)'
font_size: 12
color: 1,1,1,1
Label:
id:width
pos_hint: {'x':.3262, 'top':.85}
size_hint: (.033, .02)
font_size: 12
color: 1,1,1,1
Label:
id:height
pos_hint: {'x':.03, 'top':.095}
size_hint: (.035, .02)
font_size: 12
color: 1,1,1,1
Slider:
id: slider
min: 1
max: 1
step: 1
orientation:'horizontal' #default horizontal
size_hint: (.35, .04)
pos_hint: {'x':.02, 'top':.06}
on_value: root.slider_pos(*args) # *args include name of the slider and position number
BoxLayout:
orientation:"vertical"
spacing:5
pos_hint:{'x':.38, 'top':.92}
size_hint:{.14, .62}
ToggleButton:
id: button_showmarks
text:"Afficher les\nmarqueurs"
on_press: root.press_color()
on_press: root.show_marqueurs()
# ToggleButton:
# id: button_tapir
# text:"TAPIR"
# on_press: root.press_color()
# on_press: root.tapir()
ToggleButton:
id: labelize_manual
text:"Activer la\nlabellisation manuelle"
on_press: root.press_color()
ToggleButton:
id: button_verif_nb
text: "Vérifier le nombre\nde marqueurs"
disabled: True
on_press: root.press_color()
on_press: root.verif_nb()
Button:
id: button_delete
font_size: 15
background_normal:''
background_color:(24/255.0, 192/255.0, 214/255.0, 1)
valign: 'middle'
halign: 'center'
text: "Supprimer les\nmauvaises détections"
disabled: True
on_press: root.press_color()
on_press: root.delete_by_continuity()
ToggleButton:
id: button_interpolate
text: "Ajouter des marqueurs\npar interpolation"
disabled: True
on_press: root.press_color()
on_press: root.add_by_continuity()
ToggleButton:
id: button_verif_continuity
text: "Vérifier la continuité\ndes marqueurs"
disabled: True
on_press: root.press_color()
on_press: root.verif_continuity()
ToggleButton:
id: button_graph_continuity
text: "Afficher les graphiques\nde continuité"
group: 'graph'
disabled: True
on_press: root.press_color()
on_press: root.graph_continuity()
ToggleButton:
id: button_analyze
text: "Confirmer et\nlancer l'analyse"
group: 'graph'
disabled: True
on_press: root.press_color()
on_press: root.analyse()
ToggleButton:
id: button_distances
text: "Afficher les distances\nentre marqueurs"
disabled: True
on_press: root.press_color()
on_press: root.toggle_distances()
ToggleButton:
id: button_profondeur
text: "Afficher les cartes\nde profondeur"
disabled: True
on_press: root.press_color()
on_press: root.rotate_markers()
on_press: root.show_profondeur()
GridLayout:
pos_hint:{'x':.38, 'top':.29}
size_hint:{.14, .08}
cols: 5
rows: 2
spacing: 2
orientation:'lr-tb'
ToggleButton:
id: marq_C7
custom_value: 'marq_C7'
text: 'C7'
on_press: root.label_in(self)
ToggleButton:
id: marq_Tsup
custom_value: 'marq_Tsup'
text: 'Tsup'
on_press: root.label_in(self)
ToggleButton:
id: marq_Tap
custom_value: 'marq_Tap'
text: 'Tap'
on_press: root.label_in(self)
ToggleButton:
id: marq_Tinf
custom_value: 'marq_Tinf'
text: 'Tinf'
on_press: root.label_in(self)
ToggleButton:
id: marq_Lap
custom_value: 'marq_Lap'
text: 'Lap'
on_press: root.label_in(self)
ToggleButton:
id: marq_Linf
custom_value: 'marq_Linf'
text: 'Linf'
on_press: root.label_in(self)
ToggleButton:
id: marq_ScG
custom_value: 'marq_ScG'
text: 'ScG'
on_press: root.label_in(self)
ToggleButton:
id: marq_ScD
custom_value: 'marq_ScD'
text: 'ScD'
on_press: root.label_in(self)
ToggleButton:
id: marq_IG
custom_value: 'marq_IG'
text: 'IG'
on_press: root.label_in(self)
ToggleButton:
id: marq_ID
custom_value: 'marq_ID'
text: 'ID'
on_press: root.label_in(self)
Image: #système d'axes
id: xyz_axis
size_hint: (0, 0)
background_color:(0,0,0,0)
pos_hint: {'x':.03, 'top':.85}
allow_stretch: False
keep_ratio: True
GridLayout:
id:grid
cols:2
rows:2
orientation:'lr-tb'
size_hint:(.2, .2)
pos_hint:{'x':.54, 'top':.98}
cols_minimum:{0:.05, 1:.17}
canvas.before:
Color:
rgba: (171/255.0, 222/255.0, 231/255.0, 1)
Rectangle:
size: self.size
pos: self.pos
Label:
text: 'Marqueurs'
color: (0,0,0,1)
Label:
id: entete_coordos
text:'Positions'
color: (0,0,0,1)
Label:
id: image_nb
text: 'Image no :'
font_size: 15
size_hint: (.07, .04)
pos_hint:{'x':.385, 'top':.05}
TextInput:
id: image_nb_input
multiline: False
text: ''
font_size: 15
size_hint: (.048, .04)
pos_hint:{'x':.455, 'top':.05}
on_text_validate: root.image_nb_input()
Label:
id: image_total
text: ''
font_size: 18
size_hint: (.03, .05)
pos_hint:{'x':.502, 'top':.06}
Label:
id: im_prob_nb
text: ''
font_size: 15
halign: 'left'
valign:'top'
size_hint: (.3, .2)
pos_hint:{'x':.56, 'top':.75}
Label:
id: rep_continuity
text: ''
font_size: 15
color: 1,0,0,1
halign: 'left'
size_hint: (.12, .1)
pos_hint: {'x':.39, 'top':.25}
BoxLayout:
id: graph
size_hint: (.47, .6)
pos_hint: {'x':.53, 'top':.6}
allow_strecth: True
Label:
text:'Infos à sauvegarder :'
fontsize: 18
halign: 'left'
size_hint: (.14, .03)
pos_hint: {'x':.84, 'top':.99}
Label:
text:'Positions corrigées'
fontsize: 15
size_hint: (.11, .03)
pos_hint: {'x':.84, 'top':.95}
Label:
text:'Métriques de symétrie'
fontsize: 15
size_hint: (.11, .03)
pos_hint: {'x':.84, 'top':.92}
Label:
text:'Graphiques des métriques'
fontsize: 15
size_hint: (.11, .03)
pos_hint: {'x':.84, 'top':.89}
CheckBox:
id:save_positions
pos_hint: {'x':.96, 'top':.95}
size_hint: (.03, .03)
CheckBox:
id:save_metriques
pos_hint: {'x':.96, 'top':.92}
size_hint: (.03, .03)
CheckBox:
id:save_graph
pos_hint: {'x':.96, 'top':.89}
size_hint: (.03, .03)
Button:
id:save
text:'Sauvegarder'
pos_hint: {'x':.85, 'top':.85}
size_hint: (.13, .03)
background_normal:''
background_color:(24/255.0, 192/255.0, 214/255.0, 1)
on_press: root.press_color()
on_press: root.to_save()
Label:
text: 'Meilleure symétrie'
fontsize: 15
halign:'left'
color: (223/255.0, 2/255.0, 235/255.0, 1)
pos_hint:{'x':.37, 'top':.2}
size_hint:(.08, .02)
Label:
id:im_best
text: 'Image no'
fontsize: 15
halign:'left'
pos_hint:{'x':.37, 'top':.17}
size_hint:(.05, .02)
TextInput:
id:input_gold_nb
multiline: False
text: ''
font_size: 15
size_hint: (.02, .03)
pos_hint:{'x':.42, 'top':.175}
on_text_validate: root.gold_nb_input()
Label:
id:sym_best
text: 'Score :'
fontsize: 15
halign:'left'
pos_hint:{'x':.37, 'top':.14}
size_hint:(.06, .02)
Label:
text: 'Correction visée :'
fontsize: 15
pos_hint:{'x':.46, 'top':.2}
size_hint:(.05, .02)
Label:
text: 'Droite'
fontsize: 12
pos_hint:{'x':.45, 'top':.18}
size_hint:(.05, .02)
Label:
text: 'Minimale'
fontsize: 12
pos_hint:{'x':.45, 'top':.16}
size_hint:(.05, .02)
Label:
text: 'Maximale'
fontsize: 12
pos_hint:{'x':.45, 'top':.14}
size_hint:(.05, .02)
CheckBox:
id: check_corrected
pos_hint: {'x':.5, 'top':.18}
size_hint: (.02, .02)
CheckBox:
id: check_min
pos_hint: {'x':.5, 'top':.16}
size_hint: (.02, .02)
CheckBox:
id: check_max
pos_hint: {'x':.5, 'top':.14}
size_hint: (.02, .02)
# ToggleButton:
# id: button_correction
# text: 'Afficher corrections'
# group: 'graph'
# pos_hint: {'x':.43, 'top':.10}
# size_hint: (.09, .03)
# on_press: root.press_color()
# on_press: root.show_correction_gold()
<Touch>:
BoxLayout:
size_hint: ((702/1960), .78)
pos_hint: {'x':.02, 'top':.85}