sgtlib 3.3.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- StructuralGT/__init__.py +31 -0
- StructuralGT/apps/__init__.py +0 -0
- StructuralGT/apps/cli_main.py +258 -0
- StructuralGT/apps/gui_main.py +69 -0
- StructuralGT/apps/gui_mcw/__init__.py +0 -0
- StructuralGT/apps/gui_mcw/checkbox_model.py +91 -0
- StructuralGT/apps/gui_mcw/controller.py +1073 -0
- StructuralGT/apps/gui_mcw/image_provider.py +74 -0
- StructuralGT/apps/gui_mcw/imagegrid_model.py +75 -0
- StructuralGT/apps/gui_mcw/qthread_worker.py +102 -0
- StructuralGT/apps/gui_mcw/table_model.py +79 -0
- StructuralGT/apps/gui_mcw/tree_model.py +154 -0
- StructuralGT/apps/sgt_qml/CenterMainContent.qml +19 -0
- StructuralGT/apps/sgt_qml/LeftContent.qml +48 -0
- StructuralGT/apps/sgt_qml/MainWindow.qml +762 -0
- StructuralGT/apps/sgt_qml/RightLoggingPanel.qml +125 -0
- StructuralGT/apps/sgt_qml/assets/icons/.DS_Store +0 -0
- StructuralGT/apps/sgt_qml/assets/icons/back_icon.png +0 -0
- StructuralGT/apps/sgt_qml/assets/icons/brightness_icon.png +0 -0
- StructuralGT/apps/sgt_qml/assets/icons/cancel_icon.png +0 -0
- StructuralGT/apps/sgt_qml/assets/icons/crop_icon.png +0 -0
- StructuralGT/apps/sgt_qml/assets/icons/edit_icon.png +0 -0
- StructuralGT/apps/sgt_qml/assets/icons/graph_icon.png +0 -0
- StructuralGT/apps/sgt_qml/assets/icons/hide_panel.png +0 -0
- StructuralGT/apps/sgt_qml/assets/icons/next_icon.png +0 -0
- StructuralGT/apps/sgt_qml/assets/icons/notify_icon.png +0 -0
- StructuralGT/apps/sgt_qml/assets/icons/rescale_icon.png +0 -0
- StructuralGT/apps/sgt_qml/assets/icons/show_panel.png +0 -0
- StructuralGT/apps/sgt_qml/assets/icons/square_icon.png +0 -0
- StructuralGT/apps/sgt_qml/assets/icons/undo_icon.png +0 -0
- StructuralGT/apps/sgt_qml/components/ImageFilters.qml +82 -0
- StructuralGT/apps/sgt_qml/components/ImageProperties.qml +112 -0
- StructuralGT/apps/sgt_qml/components/ProjectNav.qml +127 -0
- StructuralGT/apps/sgt_qml/widgets/BinaryFilterWidget.qml +151 -0
- StructuralGT/apps/sgt_qml/widgets/BrightnessControlWidget.qml +103 -0
- StructuralGT/apps/sgt_qml/widgets/CreateProjectWidget.qml +112 -0
- StructuralGT/apps/sgt_qml/widgets/GTWidget.qml +94 -0
- StructuralGT/apps/sgt_qml/widgets/GraphComputeWidget.qml +77 -0
- StructuralGT/apps/sgt_qml/widgets/GraphExtractWidget.qml +175 -0
- StructuralGT/apps/sgt_qml/widgets/GraphPropertyWidget.qml +77 -0
- StructuralGT/apps/sgt_qml/widgets/ImageFilterWidget.qml +137 -0
- StructuralGT/apps/sgt_qml/widgets/ImagePropertyWidget.qml +78 -0
- StructuralGT/apps/sgt_qml/widgets/ImageViewWidget.qml +585 -0
- StructuralGT/apps/sgt_qml/widgets/MenuBarWidget.qml +137 -0
- StructuralGT/apps/sgt_qml/widgets/MicroscopyPropertyWidget.qml +80 -0
- StructuralGT/apps/sgt_qml/widgets/ProjectWidget.qml +141 -0
- StructuralGT/apps/sgt_qml/widgets/RescaleControlWidget.qml +83 -0
- StructuralGT/apps/sgt_qml/widgets/RibbonWidget.qml +406 -0
- StructuralGT/apps/sgt_qml/widgets/StatusBarWidget.qml +173 -0
- StructuralGT/compute/__init__.py +0 -0
- StructuralGT/compute/c_lang/include/sgt_base.h +21 -0
- StructuralGT/compute/graph_analyzer.py +1499 -0
- StructuralGT/entrypoints.py +49 -0
- StructuralGT/imaging/__init__.py +0 -0
- StructuralGT/imaging/base_image.py +403 -0
- StructuralGT/imaging/image_processor.py +780 -0
- StructuralGT/modules.py +29 -0
- StructuralGT/networks/__init__.py +0 -0
- StructuralGT/networks/fiber_network.py +490 -0
- StructuralGT/networks/graph_skeleton.py +425 -0
- StructuralGT/networks/sknw_mod.py +199 -0
- StructuralGT/utils/__init__.py +0 -0
- StructuralGT/utils/config_loader.py +244 -0
- StructuralGT/utils/configs.ini +97 -0
- StructuralGT/utils/progress_update.py +67 -0
- StructuralGT/utils/sgt_utils.py +291 -0
- sgtlib-3.3.9.dist-info/METADATA +789 -0
- sgtlib-3.3.9.dist-info/RECORD +72 -0
- sgtlib-3.3.9.dist-info/WHEEL +5 -0
- sgtlib-3.3.9.dist-info/entry_points.txt +3 -0
- sgtlib-3.3.9.dist-info/licenses/LICENSE +674 -0
- sgtlib-3.3.9.dist-info/top_level.txt +1 -0
@@ -0,0 +1,762 @@
|
|
1
|
+
import QtQuick
|
2
|
+
import QtQuick.Controls
|
3
|
+
import QtQuick.Layouts
|
4
|
+
import QtQuick.Controls.Basic as Basic
|
5
|
+
import QtQuick.Dialogs as QuickDialogs
|
6
|
+
import Qt.labs.platform as Platform
|
7
|
+
import "widgets"
|
8
|
+
|
9
|
+
ApplicationWindow {
|
10
|
+
id: mainWindow
|
11
|
+
width: 1024
|
12
|
+
height: 800
|
13
|
+
visible: true
|
14
|
+
title: "Structural GT"
|
15
|
+
font.family: "Arial" // or Qt.application.font.family
|
16
|
+
|
17
|
+
menuBar: MenuBarWidget {
|
18
|
+
}
|
19
|
+
|
20
|
+
footer: StatusBarWidget {
|
21
|
+
}
|
22
|
+
|
23
|
+
GridLayout {
|
24
|
+
anchors.fill: parent
|
25
|
+
rows: 2
|
26
|
+
columns: 2
|
27
|
+
|
28
|
+
// First row, first column (spanning 2 columns) - Ribbon
|
29
|
+
Rectangle {
|
30
|
+
Layout.row: 0
|
31
|
+
Layout.column: 0
|
32
|
+
Layout.columnSpan: 2
|
33
|
+
Layout.leftMargin: 10
|
34
|
+
Layout.rightMargin: 10
|
35
|
+
Layout.alignment: Qt.AlignTop
|
36
|
+
Layout.preferredHeight: 40
|
37
|
+
Layout.preferredWidth: parent.width
|
38
|
+
Layout.fillWidth: true
|
39
|
+
Layout.fillHeight: true
|
40
|
+
RibbonWidget {
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
// Second row, first column - Left Navigation Pane
|
45
|
+
Rectangle {
|
46
|
+
id: recLeftPane
|
47
|
+
Layout.row: 1
|
48
|
+
Layout.column: 0
|
49
|
+
Layout.leftMargin: 10
|
50
|
+
Layout.rightMargin: 5
|
51
|
+
Layout.preferredHeight: parent.height - 40
|
52
|
+
//Layout.preferredWidth: parent.width * 0.3
|
53
|
+
Layout.preferredWidth: 300
|
54
|
+
Layout.fillWidth: true
|
55
|
+
Layout.fillHeight: true
|
56
|
+
LeftContent {
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
// Second row, second column - Center Content
|
61
|
+
Rectangle {
|
62
|
+
id: recCenterContent
|
63
|
+
Layout.row: 1
|
64
|
+
Layout.column: 1
|
65
|
+
Layout.rightMargin: 10
|
66
|
+
Layout.preferredHeight: parent.height - 40
|
67
|
+
//Layout.preferredWidth: parent.width * 0.7
|
68
|
+
Layout.preferredWidth: parent.width - 300
|
69
|
+
Layout.fillWidth: true
|
70
|
+
Layout.fillHeight: true
|
71
|
+
CenterMainContent {
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
75
|
+
// Logging Panel View on the Right side
|
76
|
+
RightLoggingPanel {
|
77
|
+
id: loggingWindowPanel
|
78
|
+
}
|
79
|
+
}
|
80
|
+
|
81
|
+
function toggleLeftPane(showVal) {
|
82
|
+
recLeftPane.visible = showVal;
|
83
|
+
}
|
84
|
+
|
85
|
+
|
86
|
+
Dialog {
|
87
|
+
id: dialogAbout
|
88
|
+
//parent: mainWindow
|
89
|
+
title: "About this software"
|
90
|
+
modal: true
|
91
|
+
standardButtons: Dialog.Ok
|
92
|
+
anchors.centerIn: parent
|
93
|
+
width: 348
|
94
|
+
height: 420
|
95
|
+
|
96
|
+
ColumnLayout {
|
97
|
+
anchors.fill: parent
|
98
|
+
spacing: 10
|
99
|
+
|
100
|
+
ScrollView {
|
101
|
+
Layout.fillWidth: true
|
102
|
+
Layout.fillHeight: true
|
103
|
+
clip: true // Ensures contents are clipped to the scroll view bounds
|
104
|
+
|
105
|
+
|
106
|
+
Label {
|
107
|
+
width: parent.width - 20
|
108
|
+
//Layout.alignment: Qt.AlignHCenter
|
109
|
+
property string aboutText: mainController.get_about_details()
|
110
|
+
text: aboutText
|
111
|
+
wrapMode: Text.WordWrap
|
112
|
+
textFormat: Text.RichText // Enable HTML formatting
|
113
|
+
//maximumLineCount: 10 // Optional: Limits lines to avoid excessive height
|
114
|
+
//elide: Text.ElideRight // Optional: Adds "..." if text overflows
|
115
|
+
onLinkActivated: (link) => Qt.openUrlExternally(link) // Opens links in default browser
|
116
|
+
}
|
117
|
+
}
|
118
|
+
}
|
119
|
+
}
|
120
|
+
|
121
|
+
Dialog {
|
122
|
+
id: dialogAlert
|
123
|
+
//parent: mainWindow
|
124
|
+
title: ""
|
125
|
+
modal: true
|
126
|
+
standardButtons: Dialog.Ok
|
127
|
+
anchors.centerIn: parent
|
128
|
+
width: 300
|
129
|
+
height: 150
|
130
|
+
|
131
|
+
/*contentItem: ColumnLayout {
|
132
|
+
spacing: 10
|
133
|
+
width: parent.width
|
134
|
+
|
135
|
+
// Custom Header for the Dialog Title
|
136
|
+
Label {
|
137
|
+
text: dialogAlert.title
|
138
|
+
font.bold: true
|
139
|
+
font.pointSize: 14
|
140
|
+
color: "red" // Change title color to red
|
141
|
+
horizontalAlignment: Text.AlignHCenter
|
142
|
+
Layout.fillWidth: true // Ensure it spans the full width
|
143
|
+
}
|
144
|
+
|
145
|
+
Label {
|
146
|
+
id: lblAlertMsg
|
147
|
+
width: parent.width
|
148
|
+
wrapMode: Text.Wrap // Enable text wrapping
|
149
|
+
anchors.centerIn: parent
|
150
|
+
leftPadding: 10
|
151
|
+
rightPadding: 10
|
152
|
+
horizontalAlignment: Text.AlignJustify // Justify the text
|
153
|
+
color: "#bc2222"
|
154
|
+
text: ""
|
155
|
+
}
|
156
|
+
}*/
|
157
|
+
|
158
|
+
Label {
|
159
|
+
id: lblAlertMsg
|
160
|
+
width: parent.width
|
161
|
+
wrapMode: Text.Wrap // Enable text wrapping
|
162
|
+
anchors.centerIn: parent
|
163
|
+
leftPadding: 10
|
164
|
+
rightPadding: 10
|
165
|
+
horizontalAlignment: Text.AlignJustify // Justify the text
|
166
|
+
color: "#bc2222"
|
167
|
+
text: ""
|
168
|
+
}
|
169
|
+
}
|
170
|
+
|
171
|
+
Dialog {
|
172
|
+
id: createProjectDialog
|
173
|
+
anchors.centerIn: parent
|
174
|
+
title: "Create SGT Project"
|
175
|
+
modal: true
|
176
|
+
width: 300
|
177
|
+
height: 200
|
178
|
+
|
179
|
+
ColumnLayout {
|
180
|
+
anchors.fill: parent
|
181
|
+
CreateProjectWidget {
|
182
|
+
id: createProjectControls
|
183
|
+
}
|
184
|
+
|
185
|
+
RowLayout {
|
186
|
+
spacing: 10
|
187
|
+
//Layout.topMargin: 10
|
188
|
+
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
189
|
+
|
190
|
+
Button {
|
191
|
+
Layout.preferredWidth: 54
|
192
|
+
Layout.preferredHeight: 30
|
193
|
+
text: ""
|
194
|
+
onClicked: createProjectDialog.close()
|
195
|
+
|
196
|
+
Rectangle {
|
197
|
+
anchors.fill: parent
|
198
|
+
radius: 5
|
199
|
+
color: "#bc0000"
|
200
|
+
|
201
|
+
Label {
|
202
|
+
text: "Cancel"
|
203
|
+
color: "#ffffff"
|
204
|
+
anchors.centerIn: parent
|
205
|
+
}
|
206
|
+
}
|
207
|
+
}
|
208
|
+
|
209
|
+
Button {
|
210
|
+
Layout.preferredWidth: 40
|
211
|
+
Layout.preferredHeight: 30
|
212
|
+
text: ""
|
213
|
+
onClicked: {
|
214
|
+
var name = createProjectControls.txtName.text;
|
215
|
+
var location = createProjectControls.txtLocation.text;
|
216
|
+
|
217
|
+
if (name === "") {
|
218
|
+
//console.log("Please fill in all fields.");
|
219
|
+
createProjectControls.lblName.text = "Name*";
|
220
|
+
createProjectControls.lblName.color = "red";
|
221
|
+
createProjectControls.txtName.placeholderText = "please enter a name!"
|
222
|
+
|
223
|
+
} else if (location === "") {
|
224
|
+
createProjectControls.lblLocation.text = "Location*";
|
225
|
+
createProjectControls.lblLocation.color = "red";
|
226
|
+
|
227
|
+
} else {
|
228
|
+
mainController.create_sgt_project(name, location);
|
229
|
+
createProjectDialog.close();
|
230
|
+
}
|
231
|
+
}
|
232
|
+
|
233
|
+
Rectangle {
|
234
|
+
anchors.fill: parent
|
235
|
+
radius: 5
|
236
|
+
color: "#22bc55"
|
237
|
+
|
238
|
+
Label {
|
239
|
+
text: "OK"
|
240
|
+
color: "#ffffff"
|
241
|
+
anchors.centerIn: parent
|
242
|
+
}
|
243
|
+
}
|
244
|
+
}
|
245
|
+
}
|
246
|
+
}
|
247
|
+
}
|
248
|
+
|
249
|
+
Dialog {
|
250
|
+
id: dialogBrightnessCtrl
|
251
|
+
//parent: mainWindow
|
252
|
+
anchors.centerIn: parent
|
253
|
+
title: "Control Brightness/Contrast"
|
254
|
+
modal: true
|
255
|
+
width: 260
|
256
|
+
height: 150
|
257
|
+
|
258
|
+
ColumnLayout {
|
259
|
+
anchors.fill: parent
|
260
|
+
BrightnessControlWidget {
|
261
|
+
}
|
262
|
+
|
263
|
+
RowLayout {
|
264
|
+
spacing: 10
|
265
|
+
//Layout.topMargin: 10
|
266
|
+
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
267
|
+
|
268
|
+
Button {
|
269
|
+
Layout.preferredWidth: 54
|
270
|
+
Layout.preferredHeight: 30
|
271
|
+
text: ""
|
272
|
+
onClicked: dialogBrightnessCtrl.close()
|
273
|
+
|
274
|
+
Rectangle {
|
275
|
+
anchors.fill: parent
|
276
|
+
radius: 5
|
277
|
+
color: "#bc0000"
|
278
|
+
|
279
|
+
Label {
|
280
|
+
text: "Cancel"
|
281
|
+
color: "#ffffff"
|
282
|
+
anchors.centerIn: parent
|
283
|
+
}
|
284
|
+
}
|
285
|
+
}
|
286
|
+
|
287
|
+
Button {
|
288
|
+
Layout.preferredWidth: 40
|
289
|
+
Layout.preferredHeight: 30
|
290
|
+
text: ""
|
291
|
+
onClicked: dialogBrightnessCtrl.close()
|
292
|
+
|
293
|
+
Rectangle {
|
294
|
+
anchors.fill: parent
|
295
|
+
radius: 5
|
296
|
+
color: "#22bc55"
|
297
|
+
|
298
|
+
Label {
|
299
|
+
text: "OK"
|
300
|
+
color: "#ffffff"
|
301
|
+
anchors.centerIn: parent
|
302
|
+
}
|
303
|
+
}
|
304
|
+
}
|
305
|
+
}
|
306
|
+
|
307
|
+
}
|
308
|
+
}
|
309
|
+
|
310
|
+
Dialog {
|
311
|
+
id: dialogRescaleCtrl
|
312
|
+
//parent: mainWindow
|
313
|
+
anchors.centerIn: parent
|
314
|
+
title: "Re-scale Image"
|
315
|
+
modal: true
|
316
|
+
width: 250
|
317
|
+
height: 240
|
318
|
+
|
319
|
+
ColumnLayout {
|
320
|
+
anchors.fill: parent
|
321
|
+
RescaleControlWidget {
|
322
|
+
id: rescaleControls
|
323
|
+
}
|
324
|
+
//rescaleControls.lblScale.visible: false
|
325
|
+
|
326
|
+
RowLayout {
|
327
|
+
spacing: 10
|
328
|
+
//Layout.topMargin: 10
|
329
|
+
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
330
|
+
|
331
|
+
Button {
|
332
|
+
Layout.preferredWidth: 54
|
333
|
+
Layout.preferredHeight: 30
|
334
|
+
text: ""
|
335
|
+
onClicked: dialogRescaleCtrl.close()
|
336
|
+
|
337
|
+
Rectangle {
|
338
|
+
anchors.fill: parent
|
339
|
+
radius: 5
|
340
|
+
color: "#bc0000"
|
341
|
+
|
342
|
+
Label {
|
343
|
+
text: "Cancel"
|
344
|
+
color: "#ffffff"
|
345
|
+
anchors.centerIn: parent
|
346
|
+
}
|
347
|
+
}
|
348
|
+
}
|
349
|
+
|
350
|
+
Button {
|
351
|
+
Layout.preferredWidth: 40
|
352
|
+
Layout.preferredHeight: 30
|
353
|
+
text: ""
|
354
|
+
onClicked: dialogRescaleCtrl.close()
|
355
|
+
|
356
|
+
Rectangle {
|
357
|
+
anchors.fill: parent
|
358
|
+
radius: 5
|
359
|
+
color: "#22bc55"
|
360
|
+
|
361
|
+
Label {
|
362
|
+
text: "OK"
|
363
|
+
color: "#ffffff"
|
364
|
+
anchors.centerIn: parent
|
365
|
+
}
|
366
|
+
}
|
367
|
+
}
|
368
|
+
}
|
369
|
+
|
370
|
+
}
|
371
|
+
}
|
372
|
+
|
373
|
+
Dialog {
|
374
|
+
id: dialogExtractGraph
|
375
|
+
//parent: mainWindow
|
376
|
+
anchors.centerIn: parent
|
377
|
+
title: "Graph Extraction Options"
|
378
|
+
modal: true
|
379
|
+
width: 300
|
380
|
+
height: 400
|
381
|
+
|
382
|
+
|
383
|
+
//ColumnLayout {
|
384
|
+
// anchors.fill: parent
|
385
|
+
|
386
|
+
//ScrollView {
|
387
|
+
// width: parent.width
|
388
|
+
// height: parent.height
|
389
|
+
//Layout.alignment: Qt.AlignTop
|
390
|
+
|
391
|
+
ColumnLayout {
|
392
|
+
anchors.fill: parent
|
393
|
+
|
394
|
+
GraphExtractWidget {
|
395
|
+
}
|
396
|
+
|
397
|
+
RowLayout {
|
398
|
+
spacing: 10
|
399
|
+
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
400
|
+
|
401
|
+
Button {
|
402
|
+
Layout.preferredWidth: 54
|
403
|
+
Layout.preferredHeight: 30
|
404
|
+
text: ""
|
405
|
+
onClicked: dialogExtractGraph.close()
|
406
|
+
|
407
|
+
Rectangle {
|
408
|
+
anchors.fill: parent
|
409
|
+
radius: 5
|
410
|
+
color: "#bc0000"
|
411
|
+
|
412
|
+
Label {
|
413
|
+
text: "Cancel"
|
414
|
+
color: "#ffffff"
|
415
|
+
anchors.centerIn: parent
|
416
|
+
}
|
417
|
+
}
|
418
|
+
}
|
419
|
+
|
420
|
+
Button {
|
421
|
+
Layout.preferredWidth: 40
|
422
|
+
Layout.preferredHeight: 30
|
423
|
+
text: ""
|
424
|
+
onClicked: {
|
425
|
+
mainController.run_extract_graph();
|
426
|
+
dialogExtractGraph.close();
|
427
|
+
}
|
428
|
+
|
429
|
+
Rectangle {
|
430
|
+
anchors.fill: parent
|
431
|
+
radius: 5
|
432
|
+
color: "#22bc55"
|
433
|
+
|
434
|
+
Label {
|
435
|
+
text: "OK"
|
436
|
+
color: "#ffffff"
|
437
|
+
anchors.centerIn: parent
|
438
|
+
}
|
439
|
+
}
|
440
|
+
}
|
441
|
+
}
|
442
|
+
}
|
443
|
+
//}
|
444
|
+
//}
|
445
|
+
|
446
|
+
}
|
447
|
+
|
448
|
+
Dialog {
|
449
|
+
id: dialogBinFilters
|
450
|
+
//parent: mainWindow
|
451
|
+
anchors.centerIn: parent
|
452
|
+
title: "Adjust Binary Filters"
|
453
|
+
modal: true
|
454
|
+
width: 300
|
455
|
+
height: 210
|
456
|
+
|
457
|
+
ColumnLayout {
|
458
|
+
anchors.fill: parent
|
459
|
+
BinaryFilterWidget {
|
460
|
+
}
|
461
|
+
|
462
|
+
|
463
|
+
RowLayout {
|
464
|
+
spacing: 10
|
465
|
+
//Layout.topMargin: 10
|
466
|
+
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
467
|
+
|
468
|
+
Button {
|
469
|
+
Layout.preferredWidth: 54
|
470
|
+
Layout.preferredHeight: 30
|
471
|
+
text: ""
|
472
|
+
onClicked: dialogBinFilters.close()
|
473
|
+
|
474
|
+
Rectangle {
|
475
|
+
anchors.fill: parent
|
476
|
+
radius: 5
|
477
|
+
color: "#bc0000"
|
478
|
+
|
479
|
+
Label {
|
480
|
+
text: "Cancel"
|
481
|
+
color: "#ffffff"
|
482
|
+
anchors.centerIn: parent
|
483
|
+
}
|
484
|
+
}
|
485
|
+
}
|
486
|
+
|
487
|
+
Button {
|
488
|
+
Layout.preferredWidth: 40
|
489
|
+
Layout.preferredHeight: 30
|
490
|
+
text: ""
|
491
|
+
onClicked: dialogBinFilters.close()
|
492
|
+
|
493
|
+
Rectangle {
|
494
|
+
anchors.fill: parent
|
495
|
+
radius: 5
|
496
|
+
color: "#22bc55"
|
497
|
+
|
498
|
+
Label {
|
499
|
+
text: "OK"
|
500
|
+
color: "#ffffff"
|
501
|
+
anchors.centerIn: parent
|
502
|
+
}
|
503
|
+
}
|
504
|
+
}
|
505
|
+
}
|
506
|
+
}
|
507
|
+
}
|
508
|
+
|
509
|
+
Dialog {
|
510
|
+
id: dialogImgFilters
|
511
|
+
//parent: mainWindow
|
512
|
+
anchors.centerIn: parent
|
513
|
+
title: "Adjust Binary Filters"
|
514
|
+
modal: true
|
515
|
+
width: 300
|
516
|
+
height: 400
|
517
|
+
|
518
|
+
ColumnLayout {
|
519
|
+
anchors.fill: parent
|
520
|
+
ImageFilterWidget {
|
521
|
+
}
|
522
|
+
|
523
|
+
RowLayout {
|
524
|
+
spacing: 10
|
525
|
+
//Layout.topMargin: 10
|
526
|
+
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
527
|
+
|
528
|
+
Button {
|
529
|
+
Layout.preferredWidth: 54
|
530
|
+
Layout.preferredHeight: 30
|
531
|
+
text: ""
|
532
|
+
onClicked: dialogImgFilters.close()
|
533
|
+
|
534
|
+
Rectangle {
|
535
|
+
anchors.fill: parent
|
536
|
+
radius: 5
|
537
|
+
color: "#bc0000"
|
538
|
+
|
539
|
+
Label {
|
540
|
+
text: "Cancel"
|
541
|
+
color: "#ffffff"
|
542
|
+
anchors.centerIn: parent
|
543
|
+
}
|
544
|
+
}
|
545
|
+
}
|
546
|
+
|
547
|
+
Button {
|
548
|
+
Layout.preferredWidth: 40
|
549
|
+
Layout.preferredHeight: 30
|
550
|
+
text: ""
|
551
|
+
onClicked: dialogImgFilters.close()
|
552
|
+
|
553
|
+
Rectangle {
|
554
|
+
anchors.fill: parent
|
555
|
+
radius: 5
|
556
|
+
color: "#22bc55"
|
557
|
+
|
558
|
+
Label {
|
559
|
+
text: "OK"
|
560
|
+
color: "#ffffff"
|
561
|
+
anchors.centerIn: parent
|
562
|
+
}
|
563
|
+
}
|
564
|
+
}
|
565
|
+
}
|
566
|
+
}
|
567
|
+
}
|
568
|
+
|
569
|
+
Dialog {
|
570
|
+
id: dialogRunAnalyzer
|
571
|
+
anchors.centerIn: parent
|
572
|
+
title: "Select Graph Computations"
|
573
|
+
modal: true
|
574
|
+
width: 264
|
575
|
+
height: 540
|
576
|
+
|
577
|
+
ColumnLayout {
|
578
|
+
anchors.fill: parent
|
579
|
+
|
580
|
+
ScrollView {
|
581
|
+
Layout.fillWidth: true
|
582
|
+
Layout.fillHeight: true
|
583
|
+
clip: true // Ensures contents are clipped to the scroll view bounds
|
584
|
+
|
585
|
+
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff // Disable horizontal scrolling
|
586
|
+
ScrollBar.vertical.policy: ScrollBar.AsNeeded // Enable vertical scrolling only when needed
|
587
|
+
|
588
|
+
GTWidget {}
|
589
|
+
}
|
590
|
+
|
591
|
+
RowLayout {
|
592
|
+
spacing: 10
|
593
|
+
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
594
|
+
|
595
|
+
Button {
|
596
|
+
Layout.preferredWidth: 54
|
597
|
+
Layout.preferredHeight: 30
|
598
|
+
text: ""
|
599
|
+
onClicked: dialogRunAnalyzer.close()
|
600
|
+
|
601
|
+
Rectangle {
|
602
|
+
anchors.fill: parent
|
603
|
+
radius: 5
|
604
|
+
color: "#bc0000"
|
605
|
+
|
606
|
+
Label {
|
607
|
+
text: "Cancel"
|
608
|
+
color: "#ffffff"
|
609
|
+
anchors.centerIn: parent
|
610
|
+
}
|
611
|
+
}
|
612
|
+
}
|
613
|
+
|
614
|
+
Button {
|
615
|
+
Layout.preferredWidth: 40
|
616
|
+
Layout.preferredHeight: 30
|
617
|
+
text: ""
|
618
|
+
onClicked: {
|
619
|
+
mainController.run_graph_analyzer();
|
620
|
+
dialogRunAnalyzer.close()
|
621
|
+
}
|
622
|
+
|
623
|
+
Rectangle {
|
624
|
+
anchors.fill: parent
|
625
|
+
radius: 5
|
626
|
+
color: "#22bc55"
|
627
|
+
|
628
|
+
Label {
|
629
|
+
text: "OK"
|
630
|
+
color: "#ffffff"
|
631
|
+
anchors.centerIn: parent
|
632
|
+
}
|
633
|
+
}
|
634
|
+
}
|
635
|
+
}
|
636
|
+
}
|
637
|
+
}
|
638
|
+
|
639
|
+
Dialog {
|
640
|
+
id: dialogRunMultiAnalyzer
|
641
|
+
anchors.centerIn: parent
|
642
|
+
title: "Select Graph Computations"
|
643
|
+
modal: true
|
644
|
+
width: 264
|
645
|
+
height: 540
|
646
|
+
|
647
|
+
ColumnLayout {
|
648
|
+
anchors.fill: parent
|
649
|
+
|
650
|
+
ScrollView {
|
651
|
+
Layout.fillWidth: true
|
652
|
+
Layout.fillHeight: true
|
653
|
+
clip: true // Ensures contents are clipped to the scroll view bounds
|
654
|
+
|
655
|
+
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff // Disable horizontal scrolling
|
656
|
+
ScrollBar.vertical.policy: ScrollBar.AsNeeded // Enable vertical scrolling only when needed
|
657
|
+
|
658
|
+
GTWidget {}
|
659
|
+
}
|
660
|
+
|
661
|
+
RowLayout {
|
662
|
+
spacing: 10
|
663
|
+
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
664
|
+
|
665
|
+
Button {
|
666
|
+
Layout.preferredWidth: 54
|
667
|
+
Layout.preferredHeight: 30
|
668
|
+
text: ""
|
669
|
+
onClicked: dialogRunMultiAnalyzer.close()
|
670
|
+
|
671
|
+
Rectangle {
|
672
|
+
anchors.fill: parent
|
673
|
+
radius: 5
|
674
|
+
color: "#bc0000"
|
675
|
+
|
676
|
+
Label {
|
677
|
+
text: "Cancel"
|
678
|
+
color: "#ffffff"
|
679
|
+
anchors.centerIn: parent
|
680
|
+
}
|
681
|
+
}
|
682
|
+
}
|
683
|
+
|
684
|
+
Button {
|
685
|
+
Layout.preferredWidth: 40
|
686
|
+
Layout.preferredHeight: 30
|
687
|
+
text: ""
|
688
|
+
onClicked: {
|
689
|
+
dialogRunAnalyzer.close();
|
690
|
+
mainController.run_multi_graph_analyzer();
|
691
|
+
}
|
692
|
+
|
693
|
+
Rectangle {
|
694
|
+
anchors.fill: parent
|
695
|
+
radius: 5
|
696
|
+
color: "#22bc55"
|
697
|
+
|
698
|
+
Label {
|
699
|
+
text: "OK"
|
700
|
+
color: "#ffffff"
|
701
|
+
anchors.centerIn: parent
|
702
|
+
}
|
703
|
+
}
|
704
|
+
}
|
705
|
+
}
|
706
|
+
}
|
707
|
+
}
|
708
|
+
|
709
|
+
Platform.FolderDialog {
|
710
|
+
id: outFolderDialog
|
711
|
+
title: "Select a Folder"
|
712
|
+
onAccepted: {
|
713
|
+
//console.log("Selected folder:", folder)
|
714
|
+
mainController.set_output_dir(folder)
|
715
|
+
}
|
716
|
+
//onRejected: {console.log("Canceled")}
|
717
|
+
}
|
718
|
+
|
719
|
+
Platform.FolderDialog {
|
720
|
+
id: imageFolderDialog
|
721
|
+
title: "Select a Folder"
|
722
|
+
onAccepted: {
|
723
|
+
//console.log("Selected folder:", folder)
|
724
|
+
mainController.add_multiple_images(imageFolderDialog.folder);
|
725
|
+
}
|
726
|
+
//onRejected: {console.log("Canceled")}
|
727
|
+
}
|
728
|
+
|
729
|
+
QuickDialogs.FileDialog {
|
730
|
+
id: imageFileDialog
|
731
|
+
title: "Open file"
|
732
|
+
nameFilters: [mainController.get_file_extensions("img")]
|
733
|
+
onAccepted: {
|
734
|
+
//console.log("Selected file:", fileDialog.selectedFile)
|
735
|
+
mainController.add_single_image(imageFileDialog.selectedFile);
|
736
|
+
}
|
737
|
+
//onRejected: console.log("File selection canceled")
|
738
|
+
}
|
739
|
+
|
740
|
+
QuickDialogs.FileDialog {
|
741
|
+
id: projectFileDialog
|
742
|
+
title: "Open .sgtproj file"
|
743
|
+
nameFilters: [mainController.get_file_extensions("proj")]
|
744
|
+
onAccepted: {
|
745
|
+
mainController.open_sgt_project(projectFileDialog.selectedFile);
|
746
|
+
}
|
747
|
+
//onRejected: console.log("File selection canceled")
|
748
|
+
}
|
749
|
+
|
750
|
+
|
751
|
+
Connections {
|
752
|
+
target: mainController
|
753
|
+
|
754
|
+
function onShowAlertSignal(title, msg) {
|
755
|
+
dialogAlert.title = title;
|
756
|
+
lblAlertMsg.text = msg;
|
757
|
+
lblAlertMsg.color = "#2255bc";
|
758
|
+
dialogAlert.open();
|
759
|
+
}
|
760
|
+
|
761
|
+
}
|
762
|
+
}
|