dcscope 2.22.1__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.
- dcscope/__init__.py +17 -0
- dcscope/__main__.py +44 -0
- dcscope/_version.py +21 -0
- dcscope/extensions.py +250 -0
- dcscope/gui/__init__.py +2 -0
- dcscope/gui/analysis/__init__.py +10 -0
- dcscope/gui/analysis/ana_basins.py +110 -0
- dcscope/gui/analysis/ana_basins.ui +143 -0
- dcscope/gui/analysis/ana_filter.py +341 -0
- dcscope/gui/analysis/ana_filter.ui +364 -0
- dcscope/gui/analysis/ana_log.py +122 -0
- dcscope/gui/analysis/ana_log.ui +100 -0
- dcscope/gui/analysis/ana_meta.py +207 -0
- dcscope/gui/analysis/ana_meta.ui +141 -0
- dcscope/gui/analysis/ana_plot.py +638 -0
- dcscope/gui/analysis/ana_plot.ui +1060 -0
- dcscope/gui/analysis/ana_slot.py +504 -0
- dcscope/gui/analysis/ana_slot.ui +684 -0
- dcscope/gui/analysis/ana_tables.py +227 -0
- dcscope/gui/analysis/ana_tables.ui +195 -0
- dcscope/gui/analysis/ana_view.py +69 -0
- dcscope/gui/analysis/ana_view.ui +269 -0
- dcscope/gui/analysis/dlg_slot_reorder.py +55 -0
- dcscope/gui/analysis/dlg_slot_reorder.ui +138 -0
- dcscope/gui/bulk/__init__.py +2 -0
- dcscope/gui/bulk/bulk_emodulus.py +200 -0
- dcscope/gui/bulk/bulk_emodulus.ui +245 -0
- dcscope/gui/compute/__init__.py +3 -0
- dcscope/gui/compute/comp_lme4.py +115 -0
- dcscope/gui/compute/comp_lme4.ui +194 -0
- dcscope/gui/compute/comp_lme4_dataset.py +51 -0
- dcscope/gui/compute/comp_lme4_dataset.ui +92 -0
- dcscope/gui/compute/comp_lme4_results.py +120 -0
- dcscope/gui/compute/comp_lme4_results.ui +268 -0
- dcscope/gui/compute/comp_stats.py +223 -0
- dcscope/gui/compute/comp_stats.ui +187 -0
- dcscope/gui/dcor/__init__.py +304 -0
- dcscope/gui/dcor/dcor.ui +118 -0
- dcscope/gui/export/__init__.py +3 -0
- dcscope/gui/export/e2data.py +394 -0
- dcscope/gui/export/e2data.ui +367 -0
- dcscope/gui/export/e2filter.py +76 -0
- dcscope/gui/export/e2filter.ui +111 -0
- dcscope/gui/export/e2plot.py +94 -0
- dcscope/gui/export/e2plot.ui +175 -0
- dcscope/gui/main.py +1089 -0
- dcscope/gui/main.ui +579 -0
- dcscope/gui/matrix/__init__.py +4 -0
- dcscope/gui/matrix/block_matrix.py +141 -0
- dcscope/gui/matrix/block_matrix.ui +207 -0
- dcscope/gui/matrix/data_matrix.py +574 -0
- dcscope/gui/matrix/dm_dataset.py +116 -0
- dcscope/gui/matrix/dm_dataset.ui +348 -0
- dcscope/gui/matrix/dm_element.py +111 -0
- dcscope/gui/matrix/dm_element.ui +169 -0
- dcscope/gui/matrix/dm_filter.py +115 -0
- dcscope/gui/matrix/dm_filter.ui +287 -0
- dcscope/gui/matrix/plot_matrix.py +316 -0
- dcscope/gui/matrix/pm_element.py +39 -0
- dcscope/gui/matrix/pm_plot.py +86 -0
- dcscope/gui/matrix/pm_plot.ui +249 -0
- dcscope/gui/pipeline_plot.py +797 -0
- dcscope/gui/pipeline_plot.ui +66 -0
- dcscope/gui/preferences.py +380 -0
- dcscope/gui/preferences.ui +554 -0
- dcscope/gui/quick_view/__init__.py +1 -0
- dcscope/gui/quick_view/qv_main.py +1072 -0
- dcscope/gui/quick_view/qv_main.ui +1297 -0
- dcscope/gui/quick_view/qv_scatter.py +284 -0
- dcscope/gui/quick_view/qv_style.css +10 -0
- dcscope/gui/update.py +90 -0
- dcscope/gui/widgets/__init__.py +15 -0
- dcscope/gui/widgets/bg_thread.py +29 -0
- dcscope/gui/widgets/bulk_list.py +79 -0
- dcscope/gui/widgets/bulk_list.ui +95 -0
- dcscope/gui/widgets/double_spin_box_nan.py +75 -0
- dcscope/gui/widgets/feature_combobox.py +140 -0
- dcscope/gui/widgets/get_path.py +42 -0
- dcscope/gui/widgets/key_value_table_widget.css +12 -0
- dcscope/gui/widgets/key_value_table_widget.py +75 -0
- dcscope/gui/widgets/mdi_subwindow_wo_close.py +12 -0
- dcscope/gui/widgets/qrangeslider.py +262 -0
- dcscope/gui/widgets/rangecontrol.py +308 -0
- dcscope/gui/widgets/rangecontrol.ui +136 -0
- dcscope/gui/widgets/simple_image_view.py +55 -0
- dcscope/gui/widgets/simple_plot_widget.py +113 -0
- dcscope/gui/widgets/so_colorbaritem.py +29 -0
- dcscope/gui/widgets/wait_cursor.py +33 -0
- dcscope/idiom.py +26 -0
- dcscope/img/__init__.py +2 -0
- dcscope/img/icon-theme/breeze/COPYING-ICONS +209 -0
- dcscope/img/icon-theme/breeze/COPYING.LIB +510 -0
- dcscope/img/icon-theme/breeze/README +5 -0
- dcscope/img/icon-theme/breeze/actions/16/application-exit.svg +17 -0
- dcscope/img/icon-theme/breeze/actions/16/code-context.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/dialog-cancel.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/dialog-close.svg +17 -0
- dcscope/img/icon-theme/breeze/actions/16/dialog-messages.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/dialog-ok-apply.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/dialog-ok.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/document-open-folder.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/document-open.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/document-save.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/documentinfo.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/16/draw-watercolor.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/edit-clear-all.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/edit-clear.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/edit-paste.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/globe.svg +16 -0
- dcscope/img/icon-theme/breeze/actions/16/gtk-preferences.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/list-add.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/messagebox_warning.svg +20 -0
- dcscope/img/icon-theme/breeze/actions/16/object-columns.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/object-order-lower.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/object-rows.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/office-chart-line-stacked.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/office-chart-ring.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/office-chart-scatter.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/path-mode-polyline.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/preferences-activities.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/remove.svg +10 -0
- dcscope/img/icon-theme/breeze/actions/16/search.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/show-grid.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/special_paste.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/tools-wizard.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/view-calendar-list.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/view-filter.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/view-list-tree.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/view-statistics.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/visibility.svg +21 -0
- dcscope/img/icon-theme/breeze/actions/22/application-exit.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/22/code-context.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/dialog-cancel.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/dialog-close.svg +10 -0
- dcscope/img/icon-theme/breeze/actions/22/dialog-messages.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/dialog-ok-apply.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/dialog-ok.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/document-open-folder.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/document-open.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/document-save.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/documentinfo.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/draw-watercolor.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/edit-clear-all.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/edit-clear.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/edit-paste.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/globe.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/22/gtk-preferences.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/22/list-add.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/messagebox_warning.svg +17 -0
- dcscope/img/icon-theme/breeze/actions/22/object-columns.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/object-order-lower.svg +17 -0
- dcscope/img/icon-theme/breeze/actions/22/object-rows.svg +17 -0
- dcscope/img/icon-theme/breeze/actions/22/office-chart-line-stacked.svg +17 -0
- dcscope/img/icon-theme/breeze/actions/22/office-chart-ring.svg +17 -0
- dcscope/img/icon-theme/breeze/actions/22/office-chart-scatter.svg +17 -0
- dcscope/img/icon-theme/breeze/actions/22/path-mode-polyline.svg +17 -0
- dcscope/img/icon-theme/breeze/actions/22/preferences-activities.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/remove.svg +10 -0
- dcscope/img/icon-theme/breeze/actions/22/special_paste.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/tools-wizard.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/view-calendar-list.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/view-filter.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/view-list-tree.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/view-statistics.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/visibility.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/24/application-exit.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/code-context.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/dialog-cancel.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/dialog-close.svg +10 -0
- dcscope/img/icon-theme/breeze/actions/24/dialog-messages.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/dialog-ok-apply.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/dialog-ok.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/24/document-open-folder.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/document-open.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/document-save.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/documentinfo.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/24/draw-watercolor.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/edit-clear-all.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/24/edit-clear.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/edit-paste.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/globe.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/24/gtk-preferences.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/24/list-add.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/messagebox_warning.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/24/object-columns.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/object-order-lower.svg +15 -0
- dcscope/img/icon-theme/breeze/actions/24/object-rows.svg +15 -0
- dcscope/img/icon-theme/breeze/actions/24/office-chart-line-stacked.svg +15 -0
- dcscope/img/icon-theme/breeze/actions/24/office-chart-ring.svg +15 -0
- dcscope/img/icon-theme/breeze/actions/24/office-chart-scatter.svg +15 -0
- dcscope/img/icon-theme/breeze/actions/24/path-mode-polyline.svg +15 -0
- dcscope/img/icon-theme/breeze/actions/24/preferences-activities.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/24/remove.svg +10 -0
- dcscope/img/icon-theme/breeze/actions/24/special_paste.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/tools-wizard.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/view-calendar-list.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/view-filter.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/view-list-tree.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/view-statistics.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/visibility.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/32/application-exit.svg +8 -0
- dcscope/img/icon-theme/breeze/actions/32/dialog-cancel.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/32/dialog-messages.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/32/dialog-ok-apply.svg +1 -0
- dcscope/img/icon-theme/breeze/actions/32/dialog-ok.svg +1 -0
- dcscope/img/icon-theme/breeze/actions/32/document-open-folder.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/32/document-open.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/32/document-save.svg +18 -0
- dcscope/img/icon-theme/breeze/actions/32/gtk-preferences.svg +17 -0
- dcscope/img/icon-theme/breeze/actions/32/object-order-lower.svg +18 -0
- dcscope/img/icon-theme/breeze/actions/32/view-filter.svg +18 -0
- dcscope/img/icon-theme/breeze/actions/32/view-list-tree.svg +18 -0
- dcscope/img/icon-theme/breeze/places/16/folder-cloud.svg +13 -0
- dcscope/img/icon-theme/breeze/places/16/folder.svg +13 -0
- dcscope/img/icon-theme/breeze/places/22/folder-cloud.svg +13 -0
- dcscope/img/icon-theme/breeze/places/22/folder.svg +13 -0
- dcscope/img/icon-theme/breeze/places/24/folder-cloud.svg +12 -0
- dcscope/img/icon-theme/breeze/places/24/folder.svg +12 -0
- dcscope/img/icon-theme/breeze/places/32/folder-cloud.svg +35 -0
- dcscope/img/icon-theme/breeze/places/32/folder.svg +30 -0
- dcscope/img/icon-theme/breeze/places/64/folder-cloud.svg +35 -0
- dcscope/img/icon-theme/breeze/places/64/folder.svg +30 -0
- dcscope/img/icon-theme/breeze/status/16/dialog-error.svg +9 -0
- dcscope/img/icon-theme/breeze/status/16/dialog-information.svg +9 -0
- dcscope/img/icon-theme/breeze/status/16/dialog-question.svg +7 -0
- dcscope/img/icon-theme/breeze/status/16/dialog-warning.svg +9 -0
- dcscope/img/icon-theme/breeze/status/22/dialog-error.svg +9 -0
- dcscope/img/icon-theme/breeze/status/22/dialog-information.svg +9 -0
- dcscope/img/icon-theme/breeze/status/22/dialog-question.svg +7 -0
- dcscope/img/icon-theme/breeze/status/22/dialog-warning.svg +9 -0
- dcscope/img/icon-theme/breeze/status/24/dialog-error.svg +13 -0
- dcscope/img/icon-theme/breeze/status/24/dialog-information.svg +13 -0
- dcscope/img/icon-theme/breeze/status/24/dialog-question.svg +9 -0
- dcscope/img/icon-theme/breeze/status/24/dialog-warning.svg +1 -0
- dcscope/img/icon-theme/breeze/status/64/dialog-error.svg +25 -0
- dcscope/img/icon-theme/breeze/status/64/dialog-information.svg +25 -0
- dcscope/img/icon-theme/breeze/status/64/dialog-question.svg +25 -0
- dcscope/img/icon-theme/breeze/status/64/dialog-warning.svg +25 -0
- dcscope/img/icon-theme/collect_icons.py +124 -0
- dcscope/img/icon-theme/dcscope/dcor.png +0 -0
- dcscope/img/icon-theme/dcscope/edit-copy-anew.svg +13 -0
- dcscope/img/icon-theme/dcscope/emodulus.svg +69 -0
- dcscope/img/icon-theme/dcscope/filter_ray.svg +54 -0
- dcscope/img/icon-theme/dcscope/region_channel.svg +86 -0
- dcscope/img/icon-theme/dcscope/region_reservoir.svg +89 -0
- dcscope/img/icon-theme/dcscope/rlang.svg +108 -0
- dcscope/img/icon-theme/dcscope/statistical_significance.svg +106 -0
- dcscope/img/icon-theme/index.theme +81 -0
- dcscope/img/icon.png +0 -0
- dcscope/img/icon.svg +73 -0
- dcscope/img/splash.png +0 -0
- dcscope/meta_tool.py +143 -0
- dcscope/pipeline/__init__.py +5 -0
- dcscope/pipeline/core.py +632 -0
- dcscope/pipeline/dataslot.py +270 -0
- dcscope/pipeline/filter.py +161 -0
- dcscope/pipeline/filter_ray.py +170 -0
- dcscope/pipeline/plot.py +187 -0
- dcscope/plot_cache.py +79 -0
- dcscope/session.py +379 -0
- dcscope/util.py +34 -0
- dcscope-2.22.1.dist-info/METADATA +95 -0
- dcscope-2.22.1.dist-info/RECORD +267 -0
- dcscope-2.22.1.dist-info/WHEEL +5 -0
- dcscope-2.22.1.dist-info/entry_points.txt +2 -0
- dcscope-2.22.1.dist-info/licenses/LICENSE +621 -0
- dcscope-2.22.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<ui version="4.0">
|
|
3
|
+
<class>Dialog</class>
|
|
4
|
+
<widget class="QDialog" name="Dialog">
|
|
5
|
+
<property name="geometry">
|
|
6
|
+
<rect>
|
|
7
|
+
<x>0</x>
|
|
8
|
+
<y>0</y>
|
|
9
|
+
<width>668</width>
|
|
10
|
+
<height>476</height>
|
|
11
|
+
</rect>
|
|
12
|
+
</property>
|
|
13
|
+
<property name="windowTitle">
|
|
14
|
+
<string>Data export</string>
|
|
15
|
+
</property>
|
|
16
|
+
<property name="windowIcon">
|
|
17
|
+
<iconset theme="office-chart-ring"/>
|
|
18
|
+
</property>
|
|
19
|
+
<layout class="QVBoxLayout" name="verticalLayout">
|
|
20
|
+
<item>
|
|
21
|
+
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
|
22
|
+
<item>
|
|
23
|
+
<widget class="QLabel" name="label_3">
|
|
24
|
+
<property name="text">
|
|
25
|
+
<string>Export filtered session data to other file formats</string>
|
|
26
|
+
</property>
|
|
27
|
+
</widget>
|
|
28
|
+
</item>
|
|
29
|
+
<item>
|
|
30
|
+
<widget class="QLabel" name="label_5">
|
|
31
|
+
<property name="text">
|
|
32
|
+
<string><a href="https://dcscope.readthedocs.io/en/stable/sec_qg_export_data.html">Help<a></string>
|
|
33
|
+
</property>
|
|
34
|
+
<property name="alignment">
|
|
35
|
+
<set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set>
|
|
36
|
+
</property>
|
|
37
|
+
<property name="openExternalLinks">
|
|
38
|
+
<bool>true</bool>
|
|
39
|
+
</property>
|
|
40
|
+
</widget>
|
|
41
|
+
</item>
|
|
42
|
+
</layout>
|
|
43
|
+
</item>
|
|
44
|
+
<item>
|
|
45
|
+
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
46
|
+
<property name="topMargin">
|
|
47
|
+
<number>0</number>
|
|
48
|
+
</property>
|
|
49
|
+
<item>
|
|
50
|
+
<widget class="QLabel" name="label_2">
|
|
51
|
+
<property name="text">
|
|
52
|
+
<string>Output directory:</string>
|
|
53
|
+
</property>
|
|
54
|
+
</widget>
|
|
55
|
+
</item>
|
|
56
|
+
<item>
|
|
57
|
+
<widget class="QLineEdit" name="lineEdit_path">
|
|
58
|
+
<property name="readOnly">
|
|
59
|
+
<bool>true</bool>
|
|
60
|
+
</property>
|
|
61
|
+
</widget>
|
|
62
|
+
</item>
|
|
63
|
+
<item>
|
|
64
|
+
<widget class="QPushButton" name="pushButton_path">
|
|
65
|
+
<property name="text">
|
|
66
|
+
<string>Browse</string>
|
|
67
|
+
</property>
|
|
68
|
+
</widget>
|
|
69
|
+
</item>
|
|
70
|
+
</layout>
|
|
71
|
+
</item>
|
|
72
|
+
<item>
|
|
73
|
+
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
74
|
+
<property name="topMargin">
|
|
75
|
+
<number>0</number>
|
|
76
|
+
</property>
|
|
77
|
+
<item>
|
|
78
|
+
<widget class="QLabel" name="label">
|
|
79
|
+
<property name="sizePolicy">
|
|
80
|
+
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
|
81
|
+
<horstretch>0</horstretch>
|
|
82
|
+
<verstretch>0</verstretch>
|
|
83
|
+
</sizepolicy>
|
|
84
|
+
</property>
|
|
85
|
+
<property name="text">
|
|
86
|
+
<string>Format:</string>
|
|
87
|
+
</property>
|
|
88
|
+
</widget>
|
|
89
|
+
</item>
|
|
90
|
+
<item>
|
|
91
|
+
<widget class="QRadioButton" name="radioButton_rtdc">
|
|
92
|
+
<property name="toolTip">
|
|
93
|
+
<string>Standard RT-DC file format.</string>
|
|
94
|
+
</property>
|
|
95
|
+
<property name="whatsThis">
|
|
96
|
+
<string/>
|
|
97
|
+
</property>
|
|
98
|
+
<property name="text">
|
|
99
|
+
<string>RT-DC (*.rtdc)</string>
|
|
100
|
+
</property>
|
|
101
|
+
<property name="checked">
|
|
102
|
+
<bool>true</bool>
|
|
103
|
+
</property>
|
|
104
|
+
</widget>
|
|
105
|
+
</item>
|
|
106
|
+
<item>
|
|
107
|
+
<widget class="QRadioButton" name="radioButton_fcs">
|
|
108
|
+
<property name="toolTip">
|
|
109
|
+
<string>Flow Cytometry Standard version 3.0</string>
|
|
110
|
+
</property>
|
|
111
|
+
<property name="text">
|
|
112
|
+
<string>FCS3.0 (*.fcs)</string>
|
|
113
|
+
</property>
|
|
114
|
+
</widget>
|
|
115
|
+
</item>
|
|
116
|
+
<item>
|
|
117
|
+
<widget class="QRadioButton" name="radioButton_tsv">
|
|
118
|
+
<property name="toolTip">
|
|
119
|
+
<string>text file for custom analysis</string>
|
|
120
|
+
</property>
|
|
121
|
+
<property name="text">
|
|
122
|
+
<string>tab-separated values (*.tsv)</string>
|
|
123
|
+
</property>
|
|
124
|
+
</widget>
|
|
125
|
+
</item>
|
|
126
|
+
<item>
|
|
127
|
+
<widget class="QRadioButton" name="radioButton_avi">
|
|
128
|
+
<property name="text">
|
|
129
|
+
<string>Video file</string>
|
|
130
|
+
</property>
|
|
131
|
+
</widget>
|
|
132
|
+
</item>
|
|
133
|
+
</layout>
|
|
134
|
+
</item>
|
|
135
|
+
<item>
|
|
136
|
+
<widget class="QWidget" name="widget_storage_strategy" native="true">
|
|
137
|
+
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
|
138
|
+
<property name="leftMargin">
|
|
139
|
+
<number>0</number>
|
|
140
|
+
</property>
|
|
141
|
+
<property name="topMargin">
|
|
142
|
+
<number>0</number>
|
|
143
|
+
</property>
|
|
144
|
+
<property name="rightMargin">
|
|
145
|
+
<number>0</number>
|
|
146
|
+
</property>
|
|
147
|
+
<property name="bottomMargin">
|
|
148
|
+
<number>0</number>
|
|
149
|
+
</property>
|
|
150
|
+
</layout>
|
|
151
|
+
</widget>
|
|
152
|
+
</item>
|
|
153
|
+
<item>
|
|
154
|
+
<widget class="QStackedWidget" name="stackedWidget">
|
|
155
|
+
<property name="currentIndex">
|
|
156
|
+
<number>1</number>
|
|
157
|
+
</property>
|
|
158
|
+
<widget class="QWidget" name="page_features">
|
|
159
|
+
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
160
|
+
<property name="leftMargin">
|
|
161
|
+
<number>0</number>
|
|
162
|
+
</property>
|
|
163
|
+
<property name="topMargin">
|
|
164
|
+
<number>0</number>
|
|
165
|
+
</property>
|
|
166
|
+
<property name="rightMargin">
|
|
167
|
+
<number>0</number>
|
|
168
|
+
</property>
|
|
169
|
+
<property name="bottomMargin">
|
|
170
|
+
<number>0</number>
|
|
171
|
+
</property>
|
|
172
|
+
<item>
|
|
173
|
+
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
|
174
|
+
<item>
|
|
175
|
+
<widget class="QLabel" name="label_4">
|
|
176
|
+
<property name="text">
|
|
177
|
+
<string>Storage strategy:</string>
|
|
178
|
+
</property>
|
|
179
|
+
</widget>
|
|
180
|
+
</item>
|
|
181
|
+
<item>
|
|
182
|
+
<widget class="QComboBox" name="comboBox_storage">
|
|
183
|
+
<property name="sizePolicy">
|
|
184
|
+
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
185
|
+
<horstretch>0</horstretch>
|
|
186
|
+
<verstretch>0</verstretch>
|
|
187
|
+
</sizepolicy>
|
|
188
|
+
</property>
|
|
189
|
+
<item>
|
|
190
|
+
<property name="text">
|
|
191
|
+
<string>No basins: Store only the selected feature data (legacy behavior)</string>
|
|
192
|
+
</property>
|
|
193
|
+
</item>
|
|
194
|
+
<item>
|
|
195
|
+
<property name="text">
|
|
196
|
+
<string>With basins: Store features, refer to the original file (recommended)</string>
|
|
197
|
+
</property>
|
|
198
|
+
</item>
|
|
199
|
+
<item>
|
|
200
|
+
<property name="text">
|
|
201
|
+
<string>Basins only: Do not store features, refer to original file (fast)</string>
|
|
202
|
+
</property>
|
|
203
|
+
</item>
|
|
204
|
+
</widget>
|
|
205
|
+
</item>
|
|
206
|
+
</layout>
|
|
207
|
+
</item>
|
|
208
|
+
<item>
|
|
209
|
+
<widget class="BulkList" name="bulklist_features" native="true">
|
|
210
|
+
<property name="sizePolicy">
|
|
211
|
+
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
|
212
|
+
<horstretch>0</horstretch>
|
|
213
|
+
<verstretch>0</verstretch>
|
|
214
|
+
</sizepolicy>
|
|
215
|
+
</property>
|
|
216
|
+
</widget>
|
|
217
|
+
</item>
|
|
218
|
+
</layout>
|
|
219
|
+
</widget>
|
|
220
|
+
<widget class="QWidget" name="page_video">
|
|
221
|
+
<layout class="QVBoxLayout" name="verticalLayout_3">
|
|
222
|
+
<property name="leftMargin">
|
|
223
|
+
<number>0</number>
|
|
224
|
+
</property>
|
|
225
|
+
<property name="topMargin">
|
|
226
|
+
<number>0</number>
|
|
227
|
+
</property>
|
|
228
|
+
<property name="rightMargin">
|
|
229
|
+
<number>0</number>
|
|
230
|
+
</property>
|
|
231
|
+
<property name="bottomMargin">
|
|
232
|
+
<number>0</number>
|
|
233
|
+
</property>
|
|
234
|
+
<item>
|
|
235
|
+
<widget class="QLabel" name="label_8">
|
|
236
|
+
<property name="text">
|
|
237
|
+
<string>Choose the video export settings below. Note that using (even) uncompressed codecs results in information loss (expect grayscale value differences up to 5). You should use exported videos for presentation purposes only.</string>
|
|
238
|
+
</property>
|
|
239
|
+
<property name="wordWrap">
|
|
240
|
+
<bool>true</bool>
|
|
241
|
+
</property>
|
|
242
|
+
</widget>
|
|
243
|
+
</item>
|
|
244
|
+
<item>
|
|
245
|
+
<layout class="QFormLayout" name="formLayout">
|
|
246
|
+
<item row="0" column="0">
|
|
247
|
+
<widget class="QLabel" name="label_6">
|
|
248
|
+
<property name="text">
|
|
249
|
+
<string>Format</string>
|
|
250
|
+
</property>
|
|
251
|
+
</widget>
|
|
252
|
+
</item>
|
|
253
|
+
<item row="0" column="1">
|
|
254
|
+
<widget class="QComboBox" name="comboBox_format">
|
|
255
|
+
<item>
|
|
256
|
+
<property name="text">
|
|
257
|
+
<string>AVI</string>
|
|
258
|
+
</property>
|
|
259
|
+
</item>
|
|
260
|
+
<item>
|
|
261
|
+
<property name="text">
|
|
262
|
+
<string>MOV</string>
|
|
263
|
+
</property>
|
|
264
|
+
</item>
|
|
265
|
+
<item>
|
|
266
|
+
<property name="text">
|
|
267
|
+
<string>MP4</string>
|
|
268
|
+
</property>
|
|
269
|
+
</item>
|
|
270
|
+
</widget>
|
|
271
|
+
</item>
|
|
272
|
+
<item row="1" column="0">
|
|
273
|
+
<widget class="QLabel" name="label_7">
|
|
274
|
+
<property name="text">
|
|
275
|
+
<string>Codec</string>
|
|
276
|
+
</property>
|
|
277
|
+
</widget>
|
|
278
|
+
</item>
|
|
279
|
+
<item row="1" column="1">
|
|
280
|
+
<widget class="QComboBox" name="comboBox_codec">
|
|
281
|
+
<item>
|
|
282
|
+
<property name="text">
|
|
283
|
+
<string>Uncompressed</string>
|
|
284
|
+
</property>
|
|
285
|
+
</item>
|
|
286
|
+
<item>
|
|
287
|
+
<property name="text">
|
|
288
|
+
<string>H264</string>
|
|
289
|
+
</property>
|
|
290
|
+
</item>
|
|
291
|
+
</widget>
|
|
292
|
+
</item>
|
|
293
|
+
</layout>
|
|
294
|
+
</item>
|
|
295
|
+
</layout>
|
|
296
|
+
</widget>
|
|
297
|
+
</widget>
|
|
298
|
+
</item>
|
|
299
|
+
<item>
|
|
300
|
+
<spacer name="verticalSpacer">
|
|
301
|
+
<property name="orientation">
|
|
302
|
+
<enum>Qt::Orientation::Vertical</enum>
|
|
303
|
+
</property>
|
|
304
|
+
<property name="sizeHint" stdset="0">
|
|
305
|
+
<size>
|
|
306
|
+
<width>20</width>
|
|
307
|
+
<height>0</height>
|
|
308
|
+
</size>
|
|
309
|
+
</property>
|
|
310
|
+
</spacer>
|
|
311
|
+
</item>
|
|
312
|
+
<item>
|
|
313
|
+
<widget class="QDialogButtonBox" name="buttonBox">
|
|
314
|
+
<property name="orientation">
|
|
315
|
+
<enum>Qt::Orientation::Horizontal</enum>
|
|
316
|
+
</property>
|
|
317
|
+
<property name="standardButtons">
|
|
318
|
+
<set>QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok</set>
|
|
319
|
+
</property>
|
|
320
|
+
</widget>
|
|
321
|
+
</item>
|
|
322
|
+
</layout>
|
|
323
|
+
</widget>
|
|
324
|
+
<customwidgets>
|
|
325
|
+
<customwidget>
|
|
326
|
+
<class>BulkList</class>
|
|
327
|
+
<extends>QWidget</extends>
|
|
328
|
+
<header>dcscope.gui.widgets.bulk_list</header>
|
|
329
|
+
<container>1</container>
|
|
330
|
+
</customwidget>
|
|
331
|
+
</customwidgets>
|
|
332
|
+
<resources/>
|
|
333
|
+
<connections>
|
|
334
|
+
<connection>
|
|
335
|
+
<sender>buttonBox</sender>
|
|
336
|
+
<signal>accepted()</signal>
|
|
337
|
+
<receiver>Dialog</receiver>
|
|
338
|
+
<slot>accept()</slot>
|
|
339
|
+
<hints>
|
|
340
|
+
<hint type="sourcelabel">
|
|
341
|
+
<x>248</x>
|
|
342
|
+
<y>254</y>
|
|
343
|
+
</hint>
|
|
344
|
+
<hint type="destinationlabel">
|
|
345
|
+
<x>157</x>
|
|
346
|
+
<y>274</y>
|
|
347
|
+
</hint>
|
|
348
|
+
</hints>
|
|
349
|
+
</connection>
|
|
350
|
+
<connection>
|
|
351
|
+
<sender>buttonBox</sender>
|
|
352
|
+
<signal>rejected()</signal>
|
|
353
|
+
<receiver>Dialog</receiver>
|
|
354
|
+
<slot>reject()</slot>
|
|
355
|
+
<hints>
|
|
356
|
+
<hint type="sourcelabel">
|
|
357
|
+
<x>316</x>
|
|
358
|
+
<y>260</y>
|
|
359
|
+
</hint>
|
|
360
|
+
<hint type="destinationlabel">
|
|
361
|
+
<x>286</x>
|
|
362
|
+
<y>274</y>
|
|
363
|
+
</hint>
|
|
364
|
+
</hints>
|
|
365
|
+
</connection>
|
|
366
|
+
</connections>
|
|
367
|
+
</ui>
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import pathlib
|
|
2
|
+
import importlib.resources
|
|
3
|
+
|
|
4
|
+
from PyQt6 import uic, QtWidgets
|
|
5
|
+
|
|
6
|
+
import dclab
|
|
7
|
+
|
|
8
|
+
from ... import session
|
|
9
|
+
from ...util import get_valid_filename
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ExportFilter(QtWidgets.QDialog):
|
|
13
|
+
def __init__(self, parent, pipeline, file_format, *args, **kwargs):
|
|
14
|
+
super(ExportFilter, self).__init__(parent=parent, *args, **kwargs)
|
|
15
|
+
ref = importlib.resources.files("dcscope.gui.export") / "e2filter.ui"
|
|
16
|
+
with importlib.resources.as_file(ref) as path_ui:
|
|
17
|
+
uic.loadUi(path_ui, self)
|
|
18
|
+
|
|
19
|
+
#: current analysis pipeline
|
|
20
|
+
self.pipeline = pipeline
|
|
21
|
+
#: export file format
|
|
22
|
+
self.file_format = file_format
|
|
23
|
+
|
|
24
|
+
@property
|
|
25
|
+
def file_mode(self):
|
|
26
|
+
if self.radioButton_single.isChecked():
|
|
27
|
+
return "single"
|
|
28
|
+
else:
|
|
29
|
+
return "multiple"
|
|
30
|
+
|
|
31
|
+
def done(self, r):
|
|
32
|
+
if r:
|
|
33
|
+
self.export_filters()
|
|
34
|
+
super(ExportFilter, self).done(r)
|
|
35
|
+
|
|
36
|
+
def export_filters(self):
|
|
37
|
+
"""Export filters"""
|
|
38
|
+
if self.file_mode == "single":
|
|
39
|
+
# all in one file
|
|
40
|
+
if self.file_format == "poly":
|
|
41
|
+
cap = "Polygon filter files (*.poly)"
|
|
42
|
+
path, _ = QtWidgets.QFileDialog.getSaveFileName(
|
|
43
|
+
self, 'Save polygon filters', '', cap)
|
|
44
|
+
if not path.endswith(".poly"):
|
|
45
|
+
path += ".poly"
|
|
46
|
+
dclab.PolygonFilter.save_all(path)
|
|
47
|
+
else:
|
|
48
|
+
cap = "DCscope filter files (*.sof)"
|
|
49
|
+
path, _ = QtWidgets.QFileDialog.getSaveFileName(
|
|
50
|
+
self, 'Save polygon filters', '', cap)
|
|
51
|
+
if not path.endswith(".sof"):
|
|
52
|
+
path += ".sof"
|
|
53
|
+
session.export_filters(path=path,
|
|
54
|
+
pipeline=self.pipeline)
|
|
55
|
+
else:
|
|
56
|
+
# one file per filter
|
|
57
|
+
path = QtWidgets.QFileDialog.getExistingDirectory(self,
|
|
58
|
+
'Output Folder')
|
|
59
|
+
if self.file_format == "poly":
|
|
60
|
+
for pf in dclab.PolygonFilter.instances:
|
|
61
|
+
fn = "SO2-PolygonFilter_{}_{}.poly".format(pf.unique_id,
|
|
62
|
+
pf.name)
|
|
63
|
+
# remove bad characters from file name
|
|
64
|
+
fn = get_valid_filename(fn)
|
|
65
|
+
out = pathlib.Path(path) / fn
|
|
66
|
+
pf.save(out)
|
|
67
|
+
else:
|
|
68
|
+
for filt_index, filt_id in enumerate(self.pipeline.filter_ids):
|
|
69
|
+
filt = self.pipeline.filters[filt_index]
|
|
70
|
+
fn = "SO2-Filter_{}_{}.sof".format(filt_index, filt.name)
|
|
71
|
+
# remove bad characters from file name
|
|
72
|
+
fn = get_valid_filename(fn)
|
|
73
|
+
out = pathlib.Path(path) / fn
|
|
74
|
+
session.export_filters(path=out,
|
|
75
|
+
pipeline=self.pipeline,
|
|
76
|
+
filt_ids=[filt_id])
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<ui version="4.0">
|
|
3
|
+
<class>Dialog</class>
|
|
4
|
+
<widget class="QDialog" name="Dialog">
|
|
5
|
+
<property name="geometry">
|
|
6
|
+
<rect>
|
|
7
|
+
<x>0</x>
|
|
8
|
+
<y>0</y>
|
|
9
|
+
<width>396</width>
|
|
10
|
+
<height>166</height>
|
|
11
|
+
</rect>
|
|
12
|
+
</property>
|
|
13
|
+
<property name="windowTitle">
|
|
14
|
+
<string>Filter export</string>
|
|
15
|
+
</property>
|
|
16
|
+
<property name="windowIcon">
|
|
17
|
+
<iconset theme="view-filter">
|
|
18
|
+
<normaloff>../../../../../.designer/backup</normaloff>../../../../../.designer/backup</iconset>
|
|
19
|
+
</property>
|
|
20
|
+
<layout class="QVBoxLayout" name="verticalLayout">
|
|
21
|
+
<item>
|
|
22
|
+
<widget class="QWidget" name="widget_2" native="true">
|
|
23
|
+
<layout class="QVBoxLayout" name="verticalLayout_3">
|
|
24
|
+
<item>
|
|
25
|
+
<widget class="QLabel" name="label_2">
|
|
26
|
+
<property name="text">
|
|
27
|
+
<string>How should filters be exported?</string>
|
|
28
|
+
</property>
|
|
29
|
+
</widget>
|
|
30
|
+
</item>
|
|
31
|
+
<item>
|
|
32
|
+
<widget class="QRadioButton" name="radioButton_single">
|
|
33
|
+
<property name="text">
|
|
34
|
+
<string>All filters in one file</string>
|
|
35
|
+
</property>
|
|
36
|
+
<property name="checked">
|
|
37
|
+
<bool>true</bool>
|
|
38
|
+
</property>
|
|
39
|
+
</widget>
|
|
40
|
+
</item>
|
|
41
|
+
<item>
|
|
42
|
+
<widget class="QRadioButton" name="radioButton_multiple">
|
|
43
|
+
<property name="text">
|
|
44
|
+
<string>One filter per file</string>
|
|
45
|
+
</property>
|
|
46
|
+
</widget>
|
|
47
|
+
</item>
|
|
48
|
+
</layout>
|
|
49
|
+
</widget>
|
|
50
|
+
</item>
|
|
51
|
+
<item>
|
|
52
|
+
<spacer name="verticalSpacer">
|
|
53
|
+
<property name="orientation">
|
|
54
|
+
<enum>Qt::Vertical</enum>
|
|
55
|
+
</property>
|
|
56
|
+
<property name="sizeHint" stdset="0">
|
|
57
|
+
<size>
|
|
58
|
+
<width>20</width>
|
|
59
|
+
<height>0</height>
|
|
60
|
+
</size>
|
|
61
|
+
</property>
|
|
62
|
+
</spacer>
|
|
63
|
+
</item>
|
|
64
|
+
<item>
|
|
65
|
+
<widget class="QDialogButtonBox" name="buttonBox">
|
|
66
|
+
<property name="orientation">
|
|
67
|
+
<enum>Qt::Horizontal</enum>
|
|
68
|
+
</property>
|
|
69
|
+
<property name="standardButtons">
|
|
70
|
+
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
|
71
|
+
</property>
|
|
72
|
+
</widget>
|
|
73
|
+
</item>
|
|
74
|
+
</layout>
|
|
75
|
+
</widget>
|
|
76
|
+
<resources/>
|
|
77
|
+
<connections>
|
|
78
|
+
<connection>
|
|
79
|
+
<sender>buttonBox</sender>
|
|
80
|
+
<signal>accepted()</signal>
|
|
81
|
+
<receiver>Dialog</receiver>
|
|
82
|
+
<slot>accept()</slot>
|
|
83
|
+
<hints>
|
|
84
|
+
<hint type="sourcelabel">
|
|
85
|
+
<x>227</x>
|
|
86
|
+
<y>280</y>
|
|
87
|
+
</hint>
|
|
88
|
+
<hint type="destinationlabel">
|
|
89
|
+
<x>157</x>
|
|
90
|
+
<y>274</y>
|
|
91
|
+
</hint>
|
|
92
|
+
</hints>
|
|
93
|
+
</connection>
|
|
94
|
+
<connection>
|
|
95
|
+
<sender>buttonBox</sender>
|
|
96
|
+
<signal>rejected()</signal>
|
|
97
|
+
<receiver>Dialog</receiver>
|
|
98
|
+
<slot>reject()</slot>
|
|
99
|
+
<hints>
|
|
100
|
+
<hint type="sourcelabel">
|
|
101
|
+
<x>295</x>
|
|
102
|
+
<y>286</y>
|
|
103
|
+
</hint>
|
|
104
|
+
<hint type="destinationlabel">
|
|
105
|
+
<x>286</x>
|
|
106
|
+
<y>274</y>
|
|
107
|
+
</hint>
|
|
108
|
+
</hints>
|
|
109
|
+
</connection>
|
|
110
|
+
</connections>
|
|
111
|
+
</ui>
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import pathlib
|
|
2
|
+
import importlib.resources
|
|
3
|
+
|
|
4
|
+
from PyQt6 import uic, QtCore, QtWidgets
|
|
5
|
+
import pyqtgraph.exporters as pge
|
|
6
|
+
|
|
7
|
+
from ..pipeline_plot import PipelinePlot
|
|
8
|
+
from ..widgets import show_wait_cursor
|
|
9
|
+
|
|
10
|
+
from ...util import get_valid_filename
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
EXPORTERS = {
|
|
14
|
+
"png": ["rendered image (*.png)", pge.ImageExporter],
|
|
15
|
+
"svg": ["vector graphics (*.svg)", pge.SVGExporter],
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class ExportPlot(QtWidgets.QDialog):
|
|
20
|
+
def __init__(self, parent, pipeline, *args, **kwargs):
|
|
21
|
+
super(ExportPlot, self).__init__(parent=parent, *args, **kwargs)
|
|
22
|
+
ref = importlib.resources.files("dcscope.gui.export") / "e2plot.ui"
|
|
23
|
+
with importlib.resources.as_file(ref) as path_ui:
|
|
24
|
+
uic.loadUi(path_ui, self)
|
|
25
|
+
|
|
26
|
+
# set pipeline
|
|
27
|
+
self.pipeline = pipeline
|
|
28
|
+
# populate combobox plots
|
|
29
|
+
self.comboBox_plot.clear()
|
|
30
|
+
self.comboBox_plot.addItem("All plots", "all")
|
|
31
|
+
for plot in pipeline.plots:
|
|
32
|
+
self.comboBox_plot.addItem(plot.name, plot.identifier)
|
|
33
|
+
# populate combobox format
|
|
34
|
+
self.comboBox_fmt.clear()
|
|
35
|
+
for key in EXPORTERS:
|
|
36
|
+
self.comboBox_fmt.addItem(EXPORTERS[key][0], key)
|
|
37
|
+
# Signals
|
|
38
|
+
self.comboBox_fmt.currentIndexChanged.connect(self.on_format)
|
|
39
|
+
|
|
40
|
+
def done(self, r):
|
|
41
|
+
if r:
|
|
42
|
+
self.export_plots()
|
|
43
|
+
super(ExportPlot, self).done(r)
|
|
44
|
+
|
|
45
|
+
@show_wait_cursor
|
|
46
|
+
@QtCore.pyqtSlot()
|
|
47
|
+
def export_plots(self):
|
|
48
|
+
"""Export the plots according to the current selection
|
|
49
|
+
|
|
50
|
+
Returns
|
|
51
|
+
-------
|
|
52
|
+
exported_plots: dict
|
|
53
|
+
dictionary plot identifier: pathlib.Path
|
|
54
|
+
"""
|
|
55
|
+
# show dialog
|
|
56
|
+
fmt = self.comboBox_fmt.currentData()
|
|
57
|
+
# keys are plot identifiers, values are paths
|
|
58
|
+
fnames = {}
|
|
59
|
+
if self.comboBox_plot.currentData() == "all":
|
|
60
|
+
path = QtWidgets.QFileDialog.getExistingDirectory(self,
|
|
61
|
+
'Output Folder')
|
|
62
|
+
if path:
|
|
63
|
+
for ii, plot in enumerate(self.pipeline.plots):
|
|
64
|
+
fn = "SO-plot_{}_{}.{}".format(ii, plot.name, fmt)
|
|
65
|
+
# remove bad characters from file name
|
|
66
|
+
fn = get_valid_filename(fn)
|
|
67
|
+
fnames[plot.identifier] = pathlib.Path(path) / fn
|
|
68
|
+
else:
|
|
69
|
+
pp, _ = QtWidgets.QFileDialog.getSaveFileName(
|
|
70
|
+
self, 'Plot export file name', '',
|
|
71
|
+
self.comboBox_fmt.currentText())
|
|
72
|
+
if pp:
|
|
73
|
+
if not pp.endswith(fmt):
|
|
74
|
+
pp += "." + fmt
|
|
75
|
+
fnames[self.comboBox_plot.currentData()] = pathlib.Path(pp)
|
|
76
|
+
|
|
77
|
+
# get PipelinePlot instance
|
|
78
|
+
for plot_id in fnames:
|
|
79
|
+
pipl = PipelinePlot.instances[plot_id]
|
|
80
|
+
exp = EXPORTERS[fmt][1](pipl.plot_layout.centralWidget)
|
|
81
|
+
if fmt == "png":
|
|
82
|
+
dpi = self.spinBox_dpi.value()
|
|
83
|
+
exp.params["width"] = int(exp.params["width"] / 72 * dpi)
|
|
84
|
+
exp.params["antialias"] = self.checkBox_aa.isChecked()
|
|
85
|
+
pout = str(fnames[plot_id])
|
|
86
|
+
exp.export(pout)
|
|
87
|
+
|
|
88
|
+
return fnames
|
|
89
|
+
|
|
90
|
+
def on_format(self):
|
|
91
|
+
if self.comboBox_fmt.currentData() == "png":
|
|
92
|
+
self.widget_png.show()
|
|
93
|
+
else:
|
|
94
|
+
self.widget_png.hide()
|