-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtabs.kv
223 lines (194 loc) · 6.23 KB
/
tabs.kv
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
<Tab>:
id: tabs
do_default_tab: False
pos_hint: {'center_x': 0.5, 'center_y': 0.5}
size_hint: (0.99, 0.99)
tab_pos: 'top_mid'
tab_width: root.width/3
##########################################################################
# Creating Page 1
TabbedPanelItem:
text: 'Strip Detection'
color: '#FFFFFF'
background_color: '#000000'
StackLayout:
orientation: 'lr-tb'
size_hint_y: None
height: 30
spacing: 0
Label:
text: ''
size_hint_x: 1
Label:
size_hint: (0.3, 0.5)
text: 'Upload your image'
TextInput:
id: get_file
readonly: True
size_hint_x: 0.5
#font_size: 12
Button:
text: 'Choose File'
size_hint_x: 0.15
on_press: root.open_popup()
Label:
text: ''
size_hint_x: 1
Image:
id: detected_image
size_hint_y: 10
nocache: True
Label:
text: ''
size_hint_x: 1
Label:
text: ''
size_hint_x: 0.65
Button:
id: detection
text: 'Apply detection'
size_hint: 0.3, 1
on_press: root.detect_lines()
Label:
text: ''
size_hint_x: 1
Label:
text: 'Number of lines'
size_hint: (0.3, 0.5)
TextInput:
id: lines
readonly: True
size_hint_x: 0.5
##########################################################################
# Creating Page 2
TabbedPanelItem:
text: 'Background correction'
color: '#FFFFFF'
background_color: '#000000'
StackLayout:
orientation: 'lr-tb'
size_hint_y: None
height: 25
spacing: [3, 3]
Label:
text: ''
size_hint_x: 1
Label:
id: click_label
text: 'Pick the suitable conversion method'
size_hint_x: 0.45
Spinner:
id: spinner_id
text: "Gray"
values: ['Gray', 'Luminance', 'Red', 'Green', 'Blue']
on_text: root.spinner_clicked(spinner_id.text)
size_hint_x: 0.5
Label:
text: ''
size_hint_x: 1
Label:
text: ''
size_hint_x: 1
Label:
text: ''
size_hint_x: 1
Label:
text: ''
size_hint_x: 1
Label:
text: ''
size_hint_x: 1
Label:
text: ''
size_hint_x: 1
Label:
text: ''
size_hint_x: 1
Label:
text: ''
size_hint_x: 1
Label:
text: ''
size_hint_x: 1
Label:
text: 'Pick the suitable thresholding method'
size_hint_x: 0.45
GridLayout:
size_hint: (0.4, 4)
cols: 2
rows: 5
Label:
text: 'Li'
size_hint_x: 1
CheckBox:
active: True
group: 'thresholding methods'
on_active: root.set_thresh_method('Li')
Label:
text: 'Yen'
size_hint_x: 1
CheckBox:
group: 'thresholding methods'
on_active: root.set_thresh_method('Yen')
Label:
text: 'Otsu'
CheckBox:
group: 'thresholding methods'
on_active: root.set_thresh_method('Otsu')
Label:
text: 'Isodata'
CheckBox:
group: 'thresholding methods'
on_active: root.set_thresh_method('Isodata')
Label:
text: 'Triangle'
CheckBox:
group: 'thresholding methods'
on_active: root.set_thresh_method('Triangle')
Label:
text: ''
size_hint_x: 1
Label:
text: 'Choose offset value'
size_hint_x: 0.3
MDSlider:
id: offset_slider
min: 0
max: 50
value: 20
orientation: 'horizontal'
size_hint_x: .7
on_value: root.set_offset(offset_slider.value)
Label:
text: ''
size_hint_x: 1
Label:
text: ''
size_hint_x: .55
Button:
id: crops
text: 'Apply background correction'
size_hint: 0.4, 1
pos_hint: {'center_x':.7, 'center_y':.5}
on_press: root.apply_background_correction()
##########################################################################
# Creating Page 3
TabbedPanelItem:
text: 'Intensity Data'
color: '#FFFFFF'
background_color: '#000000'
BoxLayout:
orientation: "vertical"
Button:
text: 'Datatable'
background_color: '#FFFFFF'
size_hint: (1, 0.1)
on_release: root.datatable()
FloatLayout:
id:body
Button:
id: download_datatable
text: 'Download the data table'
background_color: '#FFFFFF'
size_hint: (1, 0.1)
on_release: root.download()