tomwer 1.0.4__py3-none-any.whl → 1.1.0__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.
- orangecontrib/tomwer/tutorials/EBS_tomo_listener.ows +39 -0
- orangecontrib/tomwer/tutorials/cast_volume.ows +34 -0
- orangecontrib/tomwer/tutorials/simple_slice_reconstruction.ows +39 -0
- orangecontrib/tomwer/tutorials/simple_volume_local_reconstruction.ows +49 -0
- orangecontrib/tomwer/tutorials/simple_volume_to_slurm_reconstruction.ows +59 -0
- orangecontrib/tomwer/tutorials/using_saaxis_to_find_cor.ows +44 -0
- orangecontrib/tomwer/widgets/cluster/FutureSupervisorOW.py +1 -1
- orangecontrib/tomwer/widgets/cluster/SlurmClusterOW.py +14 -4
- orangecontrib/tomwer/widgets/cluster/__init__.py +1 -1
- orangecontrib/tomwer/widgets/control/DataListOW.py +12 -5
- orangecontrib/tomwer/widgets/control/DataListenerOW.py +18 -9
- orangecontrib/tomwer/widgets/control/DataSelectorOW.py +13 -6
- orangecontrib/tomwer/widgets/control/DataTransfertOW.py +4 -5
- orangecontrib/tomwer/widgets/control/DataValidatorOW.py +8 -4
- orangecontrib/tomwer/widgets/control/DataWatcherOW.py +4 -6
- orangecontrib/tomwer/widgets/control/EDF2NXTomomillOW.py +49 -62
- orangecontrib/tomwer/widgets/control/FilterOW.py +2 -4
- orangecontrib/tomwer/widgets/control/NXTomomillMixIn.py +93 -0
- orangecontrib/tomwer/widgets/control/NXTomomillOW.py +135 -128
- orangecontrib/tomwer/widgets/control/NotifierOW.py +31 -7
- orangecontrib/tomwer/widgets/control/SingleTomoObjOW.py +3 -5
- orangecontrib/tomwer/widgets/control/TomoObjSerieOW.py +85 -0
- orangecontrib/tomwer/widgets/control/VolumeSelector.py +12 -4
- orangecontrib/tomwer/widgets/control/VolumeSymLinkOW.py +11 -7
- orangecontrib/tomwer/widgets/control/icons/notification.svg +4 -4
- orangecontrib/tomwer/widgets/control/icons/nxtomomill.png +0 -0
- orangecontrib/tomwer/widgets/control/icons/nxtomomill.svg +8 -5
- orangecontrib/tomwer/widgets/control/icons/tomoobjserie.png +0 -0
- orangecontrib/tomwer/widgets/control/icons/tomoobjserie.svg +138 -0
- orangecontrib/tomwer/widgets/edit/DarkFlatPatchOW.py +16 -4
- orangecontrib/tomwer/widgets/edit/NXtomoEditorOW.py +100 -0
- orangecontrib/tomwer/widgets/edit/icons/image_key_editor.png +0 -0
- orangecontrib/tomwer/widgets/edit/icons/image_key_upgrader.png +0 -0
- orangecontrib/tomwer/widgets/edit/icons/nx_tomo_editor.png +0 -0
- orangecontrib/tomwer/widgets/edit/icons/nx_tomo_editor.svg +123 -0
- orangecontrib/tomwer/widgets/edit/test/test_dark_flat_patch.py +21 -1
- orangecontrib/tomwer/widgets/edit/test/test_image_key_editor.py +1 -1
- orangecontrib/tomwer/widgets/edit/test/test_image_key_upgrader.py +1 -1
- orangecontrib/tomwer/widgets/edit/test/test_nxtomo_editor.py +25 -0
- orangecontrib/tomwer/widgets/other/PythonScriptOW.py +19 -10
- orangecontrib/tomwer/widgets/reconstruction/AxisOW.py +20 -14
- orangecontrib/tomwer/widgets/reconstruction/CastNabuVolumeOW.py +24 -10
- orangecontrib/tomwer/widgets/reconstruction/DarkRefAndCopyOW.py +26 -21
- orangecontrib/tomwer/widgets/reconstruction/NabuOW.py +29 -12
- orangecontrib/tomwer/widgets/reconstruction/NabuVolumeOW.py +44 -17
- orangecontrib/tomwer/widgets/reconstruction/SAAxisOW.py +28 -18
- orangecontrib/tomwer/widgets/reconstruction/SADeltaBetaOW.py +24 -17
- orangecontrib/tomwer/widgets/reconstruction/SinoNormOW.py +6 -6
- orangecontrib/tomwer/widgets/reconstruction/TofuOW.py +4 -2
- orangecontrib/tomwer/widgets/reconstruction/icons/nabu_2d.png +0 -0
- orangecontrib/tomwer/widgets/reconstruction/icons/nabu_2d.svg +11 -8
- orangecontrib/tomwer/widgets/visualization/DataViewerOW.py +10 -4
- orangecontrib/tomwer/widgets/visualization/DiffViewerOW.py +1 -1
- orangecontrib/tomwer/widgets/visualization/NXtomoMetadataViewerOW.py +69 -0
- orangecontrib/tomwer/widgets/visualization/SampleMovedOW.py +2 -4
- orangecontrib/tomwer/widgets/visualization/icons/nx_tomo_metadata_viewer.png +0 -0
- orangecontrib/tomwer/widgets/visualization/icons/nx_tomo_metadata_viewer.svg +105 -0
- tomwer/__main__.py +10 -5
- tomwer/app/canvas_launcher/config.py +10 -10
- tomwer/app/canvas_launcher/mainwindow.py +68 -6
- tomwer/app/canvas_launcher/widgetsscheme.py +1 -3
- tomwer/app/darkref.py +16 -12
- tomwer/app/imagekeyeditor.py +2 -2
- tomwer/app/imagekeyupgrader.py +104 -0
- tomwer/app/nxtomoeditor.py +103 -0
- tomwer/app/rsync.py +1 -1
- tomwer/core/cluster/cluster.py +1 -1
- tomwer/core/futureobject.py +1 -0
- tomwer/core/process/control/datalistener/datalistener.py +7 -1
- tomwer/core/process/control/datalistener/rpcserver.py +3 -3
- tomwer/core/process/control/datawatcher/datawatcher.py +18 -18
- tomwer/core/process/control/datawatcher/datawatcherobserver.py +5 -8
- tomwer/core/process/control/datawatcher/datawatcherprocess.py +2 -3
- tomwer/core/process/control/datawatcher/edfdwprocess.py +2 -2
- tomwer/core/process/control/nxtomomill.py +33 -58
- tomwer/core/process/control/scanlist.py +2 -1
- tomwer/core/process/control/scanselector.py +7 -0
- tomwer/core/process/control/scantransfer.py +9 -18
- tomwer/core/process/control/scanvalidator.py +6 -5
- tomwer/core/process/control/singletomoobj.py +2 -1
- tomwer/core/process/control/timer.py +2 -1
- tomwer/core/process/control/tomoobjserie.py +8 -0
- tomwer/core/process/control/volumeselector.py +2 -1
- tomwer/core/process/control/volumesymlink.py +2 -1
- tomwer/core/process/edit/darkflatpatch.py +2 -1
- tomwer/core/process/edit/imagekeyeditor.py +4 -3
- tomwer/core/process/reconstruction/axis/axis.py +29 -32
- tomwer/core/process/reconstruction/axis/mode.py +3 -2
- tomwer/core/process/reconstruction/axis/params.py +35 -16
- tomwer/core/process/reconstruction/darkref/darkrefs.py +90 -707
- tomwer/core/process/reconstruction/darkref/darkrefscopy.py +44 -16
- tomwer/core/process/reconstruction/darkref/params.py +62 -67
- tomwer/core/process/reconstruction/lamino/tofu.py +1 -1
- tomwer/core/process/reconstruction/nabu/castvolume.py +21 -26
- tomwer/core/process/reconstruction/nabu/nabucommon.py +36 -38
- tomwer/core/process/reconstruction/nabu/nabuscores.py +28 -13
- tomwer/core/process/reconstruction/nabu/nabuslices.py +41 -14
- tomwer/core/process/reconstruction/nabu/nabuvolume.py +21 -12
- tomwer/core/process/reconstruction/nabu/utils.py +12 -1
- tomwer/core/process/reconstruction/normalization/normalization.py +9 -8
- tomwer/core/process/reconstruction/saaxis/saaxis.py +46 -20
- tomwer/core/process/reconstruction/sadeltabeta/sadeltabeta.py +38 -12
- tomwer/core/process/reconstruction/test/__init__.py +0 -39
- tomwer/core/process/reconstruction/test/test_axis_params.py +25 -3
- tomwer/core/process/reconstruction/test/test_darkref_copy.py +117 -1
- tomwer/core/process/script/python.py +16 -12
- tomwer/core/process/task.py +3 -7
- tomwer/core/process/test/test_axis.py +1 -1
- tomwer/core/process/test/test_dark_and_flat.py +41 -111
- tomwer/core/process/test/test_data_listener.py +0 -29
- tomwer/core/process/test/test_data_transfer.py +10 -14
- tomwer/core/process/test/test_nabu.py +1 -1
- tomwer/core/process/test/test_normalization.py +1 -1
- tomwer/core/process/visualization/liveslice.py +6 -0
- tomwer/core/scan/blissscan.py +37 -2
- tomwer/core/scan/edfscan.py +14 -4
- tomwer/core/scan/hdf5scan.py +10 -4
- tomwer/core/scan/scanbase.py +35 -29
- tomwer/core/scan/scanfactory.py +3 -17
- tomwer/core/scan/test/test_h5.py +1 -1
- tomwer/core/scan/test/test_process_registration.py +0 -11
- tomwer/core/scan/test/test_scan.py +32 -30
- tomwer/core/settings.py +2 -2
- tomwer/core/test/test_utils.py +1 -1
- tomwer/core/tomwer_object.py +19 -0
- tomwer/core/utils/__init__.py +0 -45
- tomwer/core/utils/char.py +2 -0
- tomwer/core/utils/gpu.py +5 -5
- tomwer/core/utils/nxtomoutils.py +2 -2
- tomwer/core/utils/scanutils.py +50 -0
- tomwer/core/utils/volumeutils.py +13 -0
- tomwer/core/volume/edfvolume.py +4 -0
- tomwer/core/volume/hdf5volume.py +4 -0
- tomwer/core/volume/jp2kvolume.py +4 -0
- tomwer/core/volume/rawvolume.py +4 -0
- tomwer/core/volume/tiffvolume.py +4 -0
- tomwer/core/volume/volumebase.py +19 -12
- tomwer/core/volume/volumefactory.py +20 -1
- tomwer/gui/cluster/slurm.py +1 -1
- tomwer/gui/cluster/test/test_cluster.py +2 -2
- tomwer/gui/control/datalist.py +109 -34
- tomwer/gui/control/datatransfert.py +1 -1
- tomwer/gui/control/datawatcher/datawatcher.py +23 -13
- tomwer/gui/control/datawatcher/datawatcherobserver.py +1 -1
- tomwer/gui/control/observations.py +0 -3
- tomwer/gui/control/selectorwidgetbase.py +42 -11
- tomwer/gui/control/serie/seriecreator.py +967 -0
- tomwer/{web/__init__.py → gui/control/serie/seriewaiter.py} +5 -7
- tomwer/gui/control/singletomoobj.py +15 -3
- tomwer/gui/control/test/test_datalist.py +1 -1
- tomwer/gui/control/test/test_datalistener.py +1 -1
- tomwer/gui/control/test/test_inputwidget.py +1 -1
- tomwer/gui/control/test/test_process_manager.py +1 -13
- tomwer/gui/control/test/test_scanselector.py +1 -1
- tomwer/gui/control/test/test_scanvalidator.py +1 -1
- tomwer/gui/control/test/test_single_tomo_obj.py +1 -1
- tomwer/gui/control/test/test_volume_dialog.py +19 -7
- tomwer/gui/control/test/test_volumeselector.py +4 -4
- tomwer/gui/debugtools/datasetgenerator.py +1 -8
- tomwer/gui/edit/dkrfpatch.py +2 -2
- tomwer/gui/edit/imagekeyeditor.py +12 -9
- tomwer/gui/edit/nxtomoeditor.py +475 -0
- tomwer/gui/edit/test/test_dkrf_patch.py +2 -14
- tomwer/gui/edit/test/test_image_key_editor.py +2 -2
- tomwer/gui/edit/test/test_nx_editor.py +155 -0
- tomwer/gui/qfolderdialog.py +11 -0
- tomwer/gui/reconstruction/axis/CompareImages.py +27 -29
- tomwer/gui/reconstruction/axis/axis.py +2 -0
- tomwer/gui/reconstruction/axis/radioaxis.py +67 -11
- tomwer/gui/reconstruction/darkref/darkrefcopywidget.py +7 -9
- tomwer/gui/reconstruction/darkref/darkrefwidget.py +22 -24
- tomwer/gui/reconstruction/lamino/tofu/projections.py +1 -1
- tomwer/gui/reconstruction/lamino/tofu/tofu.py +3 -3
- tomwer/gui/reconstruction/lamino/tofu/tofuexpert.py +4 -4
- tomwer/gui/reconstruction/lamino/tofu/tofuoutput.py +10 -4
- tomwer/gui/reconstruction/nabu/castvolume.py +80 -11
- tomwer/gui/reconstruction/nabu/check.py +1 -1
- tomwer/gui/reconstruction/nabu/nabuconfig/ctf.py +352 -0
- tomwer/gui/reconstruction/nabu/nabuconfig/nabuconfig.py +0 -9
- tomwer/gui/reconstruction/nabu/nabuconfig/output.py +1 -1
- tomwer/gui/reconstruction/nabu/nabuconfig/phase.py +18 -19
- tomwer/gui/reconstruction/nabu/nabuconfig/preprocessing.py +30 -7
- tomwer/gui/reconstruction/nabu/nabuconfig/reconstruction.py +26 -13
- tomwer/gui/reconstruction/nabu/slices.py +10 -2
- tomwer/gui/reconstruction/nabu/slurm.py +1 -1
- tomwer/gui/reconstruction/nabu/volume.py +13 -7
- tomwer/gui/reconstruction/normalization/intensity.py +1 -1
- tomwer/gui/reconstruction/saaxis/corrangeselector.py +10 -34
- tomwer/gui/reconstruction/saaxis/saaxis.py +11 -6
- tomwer/gui/reconstruction/saaxis/sliceselector.py +11 -26
- tomwer/gui/reconstruction/sadeltabeta/saadeltabeta.py +13 -8
- tomwer/gui/reconstruction/scores/scoreplot.py +67 -61
- tomwer/gui/reconstruction/test/test_axis.py +2 -2
- tomwer/gui/reconstruction/test/test_lamino.py +2 -2
- tomwer/gui/reconstruction/test/test_nabu.py +14 -1
- tomwer/gui/reconstruction/test/test_saaxis.py +8 -17
- tomwer/gui/reconstruction/test/test_sadeltabeta.py +7 -13
- tomwer/gui/stackplot.py +11 -28
- tomwer/gui/test/test_axis_gui.py +4 -4
- tomwer/gui/test/test_qfolder_dialog.py +12 -0
- tomwer/gui/utils/inputwidget.py +42 -21
- tomwer/gui/utils/lineselector/lineselector.py +13 -21
- tomwer/gui/utils/scandescription.py +2 -4
- tomwer/gui/utils/slider.py +1 -102
- tomwer/gui/utils/unitsystem.py +48 -11
- tomwer/gui/visualization/dataviewer.py +24 -17
- tomwer/gui/visualization/diffviewer/diffviewer.py +2 -11
- tomwer/gui/visualization/nxtomometadata.py +21 -0
- tomwer/gui/visualization/scanoverview.py +0 -1
- tomwer/gui/visualization/test/test_nx_tomo_metadata_viewer.py +72 -0
- tomwer/gui/visualization/test/test_stacks.py +1 -1
- tomwer/gui/visualization/tomoobjoverview.py +49 -0
- tomwer/gui/visualization/volumeoverview.py +64 -0
- tomwer/gui/visualization/volumeviewer.py +1 -1
- tomwer/resources/gui/icons/multi-document-save.png +0 -0
- tomwer/resources/gui/icons/multi-document-save.svg +101 -0
- tomwer/resources/gui/illustrations/ctf_z1.png +0 -0
- tomwer/resources/gui/illustrations/ctf_z1.svg +471 -0
- tomwer/synctools/datalistener.py +5 -1
- tomwer/synctools/imageloaderthread.py +2 -2
- tomwer/synctools/stacks/edit/imagekeyeditor.py +1 -1
- tomwer/synctools/stacks/processingstack.py +2 -2
- tomwer/synctools/stacks/reconstruction/castvolume.py +1 -0
- tomwer/synctools/stacks/reconstruction/lamino.py +1 -3
- tomwer/synctools/stacks/reconstruction/sadeltabeta.py +0 -2
- tomwer/synctools/test/test_darkRefs.py +32 -149
- tomwer/synctools/test/test_foldertransfer.py +1 -1
- tomwer/synctools/test/test_scanstages.py +2 -2
- tomwer/tests/__init__.py +0 -0
- tomwer/tests/conftest.py +51 -0
- tomwer/{test → tests}/test_scripts.py +1 -1
- tomwer/tests/test_utils.py +10 -0
- tomwer/{test → tests}/utils/utilstest.py +0 -11
- tomwer/version.py +3 -3
- {tomwer-1.0.4.dist-info → tomwer-1.1.0.dist-info}/METADATA +14 -16
- {tomwer-1.0.4.dist-info → tomwer-1.1.0.dist-info}/RECORD +245 -217
- {tomwer-1.0.4.dist-info → tomwer-1.1.0.dist-info}/WHEEL +1 -1
- {tomwer-1.0.4.dist-info → tomwer-1.1.0.dist-info}/entry_points.txt +6 -0
- orangecontrib/tomwer/setup.py +0 -45
- orangecontrib/tomwer/widgets/setup.py +0 -49
- tomwer/app/process.py +0 -153
- tomwer/core/process/reconstruction/nabu/slurm.py +0 -36
- tomwer/core/process/reconstruction/utils/nabu_slice_exec.py +0 -10
- tomwer/core/utils/laminoutils.py +0 -80
- tomwer/gui/utils/lineselector/lineselection.py +0 -76
- tomwer/setup.py +0 -52
- tomwer/web/client.py +0 -43
- tomwer/web/config.py +0 -36
- tomwer/web/test/test_graylog_connection.py +0 -59
- {tomwer/test → orangecontrib/tomwer/tutorials}/__init__.py +0 -0
- /tomwer/{web/test → gui/control/serie}/__init__.py +0 -0
- /tomwer/{test → tests}/utils/__init__.py +0 -0
- /tomwer-1.0.4-py3.8-nspkg.pth → /tomwer-1.1.0-py3.9-nspkg.pth +0 -0
- {tomwer-1.0.4.dist-info → tomwer-1.1.0.dist-info}/LICENSE +0 -0
- {tomwer-1.0.4.dist-info → tomwer-1.1.0.dist-info}/namespace_packages.txt +0 -0
- {tomwer-1.0.4.dist-info → tomwer-1.1.0.dist-info}/top_level.txt +0 -0
@@ -17,8 +17,8 @@
|
|
17
17
|
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"
|
18
18
|
sodipodi:docname="notification.svg"
|
19
19
|
inkscape:export-filename="/media/payno/830add5c-f5d7-4db2-875e-03be4f0a67f0/dev/tomography/tomwer/orangecontrib/tomwer/widgets/control/icons/notification.png"
|
20
|
-
inkscape:export-xdpi="
|
21
|
-
inkscape:export-ydpi="
|
20
|
+
inkscape:export-xdpi="24.190001"
|
21
|
+
inkscape:export-ydpi="24.190001">
|
22
22
|
<defs
|
23
23
|
id="defs3791" />
|
24
24
|
<sodipodi:namedview
|
@@ -29,7 +29,7 @@
|
|
29
29
|
inkscape:pageopacity="0.0"
|
30
30
|
inkscape:pageshadow="2"
|
31
31
|
inkscape:zoom="2.8"
|
32
|
-
inkscape:cx="
|
32
|
+
inkscape:cx="168.78142"
|
33
33
|
inkscape:cy="91.069569"
|
34
34
|
inkscape:document-units="mm"
|
35
35
|
inkscape:current-layer="layer1"
|
@@ -48,7 +48,7 @@
|
|
48
48
|
<dc:format>image/svg+xml</dc:format>
|
49
49
|
<dc:type
|
50
50
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
51
|
-
<dc:title
|
51
|
+
<dc:title></dc:title>
|
52
52
|
</cc:Work>
|
53
53
|
</rdf:RDF>
|
54
54
|
</metadata>
|
Binary file
|
@@ -15,7 +15,10 @@
|
|
15
15
|
version="1.1"
|
16
16
|
id="SVGRoot"
|
17
17
|
sodipodi:docname="nxtomomill.svg"
|
18
|
-
inkscape:version="0.92.
|
18
|
+
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"
|
19
|
+
inkscape:export-filename="/media/payno/830add5c-f5d7-4db2-875e-03be4f0a67f0/dev/tomography/tomwer/orangecontrib/tomwer/widgets/control/icons/nxtomomill.png"
|
20
|
+
inkscape:export-xdpi="59.900002"
|
21
|
+
inkscape:export-ydpi="59.900002">
|
19
22
|
<defs
|
20
23
|
id="defs815">
|
21
24
|
<filter
|
@@ -41,14 +44,14 @@
|
|
41
44
|
inkscape:pageopacity="0.0"
|
42
45
|
inkscape:pageshadow="2"
|
43
46
|
inkscape:zoom="7.7781746"
|
44
|
-
inkscape:cx="
|
45
|
-
inkscape:cy="25.
|
47
|
+
inkscape:cx="3.527853"
|
48
|
+
inkscape:cy="25.109756"
|
46
49
|
inkscape:document-units="px"
|
47
50
|
inkscape:current-layer="layer1"
|
48
51
|
showgrid="false"
|
49
|
-
inkscape:window-width="
|
52
|
+
inkscape:window-width="1848"
|
50
53
|
inkscape:window-height="1136"
|
51
|
-
inkscape:window-x="
|
54
|
+
inkscape:window-x="72"
|
52
55
|
inkscape:window-y="27"
|
53
56
|
inkscape:window-maximized="1"
|
54
57
|
inkscape:grid-bbox="true" />
|
Binary file
|
@@ -0,0 +1,138 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
3
|
+
|
4
|
+
<svg
|
5
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
6
|
+
xmlns:cc="http://creativecommons.org/ns#"
|
7
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
8
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
9
|
+
xmlns="http://www.w3.org/2000/svg"
|
10
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
11
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
12
|
+
width="48"
|
13
|
+
height="48"
|
14
|
+
viewBox="0 0 12.7 12.7"
|
15
|
+
version="1.1"
|
16
|
+
id="svg8"
|
17
|
+
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
18
|
+
sodipodi:docname="tomoobjserie.svg"
|
19
|
+
inkscape:export-filename="/home/payno/dev/tomo/tomwer/orangecontrib/tomwer/widgets/control/icons/tomoobjserie.png"
|
20
|
+
inkscape:export-xdpi="134.50999"
|
21
|
+
inkscape:export-ydpi="134.50999">
|
22
|
+
<defs
|
23
|
+
id="defs2">
|
24
|
+
<filter
|
25
|
+
id="filter3784">
|
26
|
+
<feGaussianBlur
|
27
|
+
id="feGaussianBlur3786"
|
28
|
+
stdDeviation="0.10012024" />
|
29
|
+
</filter>
|
30
|
+
</defs>
|
31
|
+
<sodipodi:namedview
|
32
|
+
id="base"
|
33
|
+
pagecolor="#ffffff"
|
34
|
+
bordercolor="#666666"
|
35
|
+
borderopacity="1.0"
|
36
|
+
inkscape:pageopacity="0.0"
|
37
|
+
inkscape:pageshadow="2"
|
38
|
+
inkscape:zoom="5.6"
|
39
|
+
inkscape:cx="39.552424"
|
40
|
+
inkscape:cy="25.30515"
|
41
|
+
inkscape:document-units="mm"
|
42
|
+
inkscape:current-layer="g824"
|
43
|
+
showgrid="false"
|
44
|
+
units="px"
|
45
|
+
inkscape:window-width="1920"
|
46
|
+
inkscape:window-height="1043"
|
47
|
+
inkscape:window-x="1920"
|
48
|
+
inkscape:window-y="0"
|
49
|
+
inkscape:window-maximized="1" />
|
50
|
+
<metadata
|
51
|
+
id="metadata5">
|
52
|
+
<rdf:RDF>
|
53
|
+
<cc:Work
|
54
|
+
rdf:about="">
|
55
|
+
<dc:format>image/svg+xml</dc:format>
|
56
|
+
<dc:type
|
57
|
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
58
|
+
<dc:title />
|
59
|
+
</cc:Work>
|
60
|
+
</rdf:RDF>
|
61
|
+
</metadata>
|
62
|
+
<g
|
63
|
+
inkscape:label="Layer 1"
|
64
|
+
inkscape:groupmode="layer"
|
65
|
+
id="layer1"
|
66
|
+
transform="translate(0,-284.3)">
|
67
|
+
<g
|
68
|
+
id="g824"
|
69
|
+
transform="translate(0,-1.5875)">
|
70
|
+
<g
|
71
|
+
id="g831"
|
72
|
+
transform="translate(25.607887,-5.7168899)">
|
73
|
+
<g
|
74
|
+
style="stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none"
|
75
|
+
id="g880-5"
|
76
|
+
transform="translate(0.14174109,5.8586367)">
|
77
|
+
<rect
|
78
|
+
y="287.99817"
|
79
|
+
x="-23.412199"
|
80
|
+
height="3.2153935"
|
81
|
+
width="6.0502148"
|
82
|
+
id="rect815-3"
|
83
|
+
style="opacity:0.85500004;fill:none;fill-opacity:0.69411765;fill-rule:evenodd;stroke:#000000;stroke-width:0.24465118;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.34449998;stroke-opacity:1;paint-order:normal" />
|
84
|
+
<text
|
85
|
+
transform="scale(0.94126596,1.062399)"
|
86
|
+
id="text819-4"
|
87
|
+
y="273.65967"
|
88
|
+
x="-24.445742"
|
89
|
+
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.31678438px;line-height:1.25;font-family:'Noto Sans Coptic';-inkscape-font-specification:'Noto Sans Coptic';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none"
|
90
|
+
xml:space="preserve"><tspan
|
91
|
+
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:'Latin Modern Roman';-inkscape-font-specification:'Latin Modern Roman, ';stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none"
|
92
|
+
y="273.65967"
|
93
|
+
x="-24.445742"
|
94
|
+
id="tspan817-9"
|
95
|
+
sodipodi:role="line">OBJ</tspan></text>
|
96
|
+
</g>
|
97
|
+
</g>
|
98
|
+
<ellipse
|
99
|
+
style="opacity:0.85500004;fill:none;fill-opacity:0.69411765;fill-rule:evenodd;stroke:#cb3a3a;stroke-width:0.489;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:0.978,0.978;stroke-dashoffset:1.77276001;stroke-opacity:1;paint-order:normal"
|
100
|
+
id="path918"
|
101
|
+
cx="6.3891625"
|
102
|
+
cy="292.16663"
|
103
|
+
rx="5.9381661"
|
104
|
+
ry="5.9836993" />
|
105
|
+
<g
|
106
|
+
id="g831-3"
|
107
|
+
transform="translate(28.135604,-1.3182226)">
|
108
|
+
<g
|
109
|
+
style="stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none"
|
110
|
+
id="g880-5-6"
|
111
|
+
transform="translate(-0.70870534,6.3311069)">
|
112
|
+
<rect
|
113
|
+
y="287.99817"
|
114
|
+
x="-23.412199"
|
115
|
+
height="3.2153935"
|
116
|
+
width="6.0502148"
|
117
|
+
id="rect815-3-7"
|
118
|
+
style="opacity:0.85500004;fill:none;fill-opacity:0.69411765;fill-rule:evenodd;stroke:#000000;stroke-width:0.24465118;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.34449998;stroke-opacity:1;paint-order:normal" />
|
119
|
+
<text
|
120
|
+
transform="scale(0.94126596,1.062399)"
|
121
|
+
id="text819-4-5"
|
122
|
+
y="273.65967"
|
123
|
+
x="-24.445742"
|
124
|
+
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.31678438px;line-height:1.25;font-family:'Noto Sans Coptic';-inkscape-font-specification:'Noto Sans Coptic';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none"
|
125
|
+
xml:space="preserve"><tspan
|
126
|
+
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:'Latin Modern Roman';-inkscape-font-specification:'Latin Modern Roman, ';stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none"
|
127
|
+
y="273.65967"
|
128
|
+
x="-24.445742"
|
129
|
+
id="tspan817-9-3"
|
130
|
+
sodipodi:role="line">OBJ</tspan></text>
|
131
|
+
</g>
|
132
|
+
</g>
|
133
|
+
</g>
|
134
|
+
<g
|
135
|
+
transform="translate(0,0.86934803)"
|
136
|
+
id="g824-0" />
|
137
|
+
</g>
|
138
|
+
</svg>
|
@@ -29,6 +29,8 @@ __license__ = "MIT"
|
|
29
29
|
__date__ = "02/11/2020"
|
30
30
|
|
31
31
|
|
32
|
+
from typing import Optional
|
33
|
+
from silx.io.url import DataUrl
|
32
34
|
from orangewidget.widget import Input, Output
|
33
35
|
from orangewidget import gui
|
34
36
|
from tomwer.gui.edit.dkrfpatch import DarkRefPatchWidget
|
@@ -116,11 +118,21 @@ class DarkFlatPatchOW(WidgetLongProcessing, SuperviseOW):
|
|
116
118
|
self.process(dataset)
|
117
119
|
|
118
120
|
def getConfiguration(self):
|
121
|
+
def cast_url_to_str(url: Optional[DataUrl]):
|
122
|
+
if url is None:
|
123
|
+
return None
|
124
|
+
elif not isinstance(url, DataUrl):
|
125
|
+
raise TypeError(
|
126
|
+
f"url is expected to be an optional DataUrl. {type(url)} provided instead"
|
127
|
+
)
|
128
|
+
else:
|
129
|
+
return url.path()
|
130
|
+
|
119
131
|
return {
|
120
|
-
"darks_start": self.widget.getStartDarkUrl(),
|
121
|
-
"flats_start": self.widget.getStartFlatUrl(),
|
122
|
-
"darks_end": self.widget.getEndDarkUrl(),
|
123
|
-
"flats_end": self.widget.getEndFlatUrl(),
|
132
|
+
"darks_start": cast_url_to_str(self.widget.getStartDarkUrl()),
|
133
|
+
"flats_start": cast_url_to_str(self.widget.getStartFlatUrl()),
|
134
|
+
"darks_end": cast_url_to_str(self.widget.getEndDarkUrl()),
|
135
|
+
"flats_end": cast_url_to_str(self.widget.getEndFlatUrl()),
|
124
136
|
}
|
125
137
|
|
126
138
|
@Inputs.config_in
|
@@ -0,0 +1,100 @@
|
|
1
|
+
from orangewidget import gui
|
2
|
+
from tomwer.gui.edit.nxtomoeditor import NXtomoEditorDialog as _NXtomoEditorDialog
|
3
|
+
from orangewidget.widget import Input, Output
|
4
|
+
from tomwer.core.scan.hdf5scan import HDF5TomoScan
|
5
|
+
from tomwer.core.scan.scanbase import TomwerScanBase
|
6
|
+
from silx.gui import qt
|
7
|
+
from ...orange.managedprocess import SuperviseOW
|
8
|
+
import logging
|
9
|
+
|
10
|
+
_logger = logging.getLogger(__name__)
|
11
|
+
|
12
|
+
|
13
|
+
class NXtomoEditorDialog(_NXtomoEditorDialog):
|
14
|
+
def __init__(self, parent) -> None:
|
15
|
+
assert isinstance(parent, SuperviseOW)
|
16
|
+
self._ow = parent
|
17
|
+
# we need to save it become looks like orange is doing some stuff with parenting
|
18
|
+
super().__init__(parent)
|
19
|
+
|
20
|
+
# connect signal / slot
|
21
|
+
self._buttons.button(qt.QDialogButtonBox.Ok).released.connect(
|
22
|
+
self._overwriteNXtomo
|
23
|
+
)
|
24
|
+
|
25
|
+
def _overwriteNXtomo(self, *args, **kwargs):
|
26
|
+
scan = self.mainWidget.getScan()
|
27
|
+
if scan is not None:
|
28
|
+
assert isinstance(self._ow, SuperviseOW)
|
29
|
+
try:
|
30
|
+
self.overwriteNXtomo()
|
31
|
+
except Exception as e:
|
32
|
+
_logger.error(
|
33
|
+
f"Fail to overwrite NXtomo ({scan.get_identifier().to_str()}). Error is {e}"
|
34
|
+
)
|
35
|
+
self._ow.notify_failed(scan=scan)
|
36
|
+
else:
|
37
|
+
self._ow.notify_succeed(scan=scan)
|
38
|
+
# self.validate()
|
39
|
+
self._ow._validateScan(scan)
|
40
|
+
|
41
|
+
|
42
|
+
class NXtomoEditorOW(SuperviseOW):
|
43
|
+
"""
|
44
|
+
Widget to edit manually an NXtomo
|
45
|
+
"""
|
46
|
+
|
47
|
+
name = "nxtomo-editor"
|
48
|
+
id = "orange.widgets.tomwer.edit.NXtomoEditorOW.NXtomoEditorOW"
|
49
|
+
description = "Interface to edit manually a NXtomo"
|
50
|
+
icon = "icons/nx_tomo_editor.svg"
|
51
|
+
priority = 10
|
52
|
+
keywords = [
|
53
|
+
"hdf5",
|
54
|
+
"nexus",
|
55
|
+
"tomwer",
|
56
|
+
"file",
|
57
|
+
"edition",
|
58
|
+
"NXTomo",
|
59
|
+
"editor",
|
60
|
+
"energy",
|
61
|
+
"distance",
|
62
|
+
"pixel size",
|
63
|
+
]
|
64
|
+
|
65
|
+
class Inputs:
|
66
|
+
data = Input(name="data", type=TomwerScanBase)
|
67
|
+
|
68
|
+
class Outputs:
|
69
|
+
data = Output(name="data", type=TomwerScanBase)
|
70
|
+
|
71
|
+
want_main_area = True
|
72
|
+
resizing_enabled = True
|
73
|
+
compress_signal = False
|
74
|
+
|
75
|
+
def __init__(self, parent=None, *args, **kwargs):
|
76
|
+
super().__init__(parent=parent, *args, **kwargs)
|
77
|
+
|
78
|
+
_layout = gui.vBox(self.mainArea, self.name).layout()
|
79
|
+
self.widget = NXtomoEditorDialog(parent=self)
|
80
|
+
_layout.addWidget(self.widget)
|
81
|
+
|
82
|
+
def _validateScan(self, scan):
|
83
|
+
self.Outputs.data.send(scan)
|
84
|
+
super().hide()
|
85
|
+
|
86
|
+
@Inputs.data
|
87
|
+
def setScan(self, scan):
|
88
|
+
if scan is None:
|
89
|
+
pass
|
90
|
+
elif not isinstance(scan, HDF5TomoScan):
|
91
|
+
raise TypeError(
|
92
|
+
f"expect to have an instance of {HDF5TomoScan}. {type(scan)} provided."
|
93
|
+
)
|
94
|
+
else:
|
95
|
+
self.widget.setScan(scan)
|
96
|
+
self.show()
|
97
|
+
self.raise_()
|
98
|
+
|
99
|
+
def sizeHint(self):
|
100
|
+
return qt.QSize(400, 500)
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,123 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
3
|
+
|
4
|
+
<svg
|
5
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
6
|
+
xmlns:cc="http://creativecommons.org/ns#"
|
7
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
8
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
9
|
+
xmlns="http://www.w3.org/2000/svg"
|
10
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
11
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
12
|
+
width="48"
|
13
|
+
height="48"
|
14
|
+
viewBox="0 0 12.7 12.7"
|
15
|
+
version="1.1"
|
16
|
+
id="svg901"
|
17
|
+
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"
|
18
|
+
sodipodi:docname="nx_editor_editor.svg">
|
19
|
+
<defs
|
20
|
+
id="defs895" />
|
21
|
+
<sodipodi:namedview
|
22
|
+
id="base"
|
23
|
+
pagecolor="#ffffff"
|
24
|
+
bordercolor="#666666"
|
25
|
+
borderopacity="1.0"
|
26
|
+
inkscape:pageopacity="0.0"
|
27
|
+
inkscape:pageshadow="2"
|
28
|
+
inkscape:zoom="3.959798"
|
29
|
+
inkscape:cx="-6.0869344"
|
30
|
+
inkscape:cy="34.284658"
|
31
|
+
inkscape:document-units="mm"
|
32
|
+
inkscape:current-layer="layer1"
|
33
|
+
showgrid="false"
|
34
|
+
units="px"
|
35
|
+
inkscape:window-width="1848"
|
36
|
+
inkscape:window-height="1136"
|
37
|
+
inkscape:window-x="72"
|
38
|
+
inkscape:window-y="27"
|
39
|
+
inkscape:window-maximized="1" />
|
40
|
+
<metadata
|
41
|
+
id="metadata898">
|
42
|
+
<rdf:RDF>
|
43
|
+
<cc:Work
|
44
|
+
rdf:about="">
|
45
|
+
<dc:format>image/svg+xml</dc:format>
|
46
|
+
<dc:type
|
47
|
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
48
|
+
<dc:title></dc:title>
|
49
|
+
</cc:Work>
|
50
|
+
</rdf:RDF>
|
51
|
+
</metadata>
|
52
|
+
<g
|
53
|
+
inkscape:label="Layer 1"
|
54
|
+
inkscape:groupmode="layer"
|
55
|
+
id="layer1"
|
56
|
+
transform="translate(0,-284.3)">
|
57
|
+
<g
|
58
|
+
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.9011445px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.19752862"
|
59
|
+
id="g872"
|
60
|
+
transform="matrix(1.7008748,0,0,1.3956141,5.3524284,-101.16555)">
|
61
|
+
<g
|
62
|
+
id="g877"
|
63
|
+
transform="matrix(0.69394884,-0.91617956,0.56586616,0.69394884,-154.75708,81.317197)"
|
64
|
+
inkscape:transform-center-x="6.3041843"
|
65
|
+
inkscape:transform-center-y="-5.6562159"
|
66
|
+
style="">
|
67
|
+
<rect
|
68
|
+
style="fill:#d1b2b2;fill-opacity:1;stroke:#000000;stroke-width:0.23376343;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
69
|
+
id="rect825"
|
70
|
+
width="3.7308216"
|
71
|
+
height="0.62381279"
|
72
|
+
x="-4.3877668"
|
73
|
+
y="281.05283" />
|
74
|
+
<path
|
75
|
+
style="fill:none;stroke:#000000;stroke-width:0.16898561;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
76
|
+
d="m -4.3877668,281.67664 c -0.2793163,0.009 -0.5577288,-0.0435 -0.8324456,-0.35142 0.2750181,-0.18258 0.5523208,-0.28005 0.8324456,-0.27239"
|
77
|
+
id="path827"
|
78
|
+
inkscape:connector-curvature="0"
|
79
|
+
sodipodi:nodetypes="ccc" />
|
80
|
+
<path
|
81
|
+
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
82
|
+
d="m -1.110839,281.0557 0.00835,0.60971"
|
83
|
+
id="path848"
|
84
|
+
inkscape:connector-curvature="0" />
|
85
|
+
</g>
|
86
|
+
</g>
|
87
|
+
<g
|
88
|
+
transform="matrix(0.67999756,0,0,1.4705936,-0.07800087,-0.17577001)"
|
89
|
+
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15.24015903px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.07525919"
|
90
|
+
id="text2005">
|
91
|
+
<path
|
92
|
+
inkscape:connector-curvature="0"
|
93
|
+
d="M 0.19471413,195.6209 H 1.1392864 l 2.2989224,4.3374 v -4.3374 h 0.6806477 v 5.18473 H 3.1742841 l -2.29892227,-4.33739 v 4.33739 h -0.6806477 z"
|
94
|
+
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.1120739px;font-family:'Noto Serif Gurmukhi';-inkscape-font-specification:'Noto Serif Gurmukhi';stroke-width:0.07525919"
|
95
|
+
id="path869" />
|
96
|
+
<path
|
97
|
+
inkscape:connector-curvature="0"
|
98
|
+
d="m 5.264845,195.6209 h 0.7535742 l 1.2883689,1.92735 1.2953142,-1.92735 h 0.7535742 l -1.6668923,2.48992 1.7780185,2.69481 H 8.7132284 l -1.4585307,-2.20516 -1.4689489,2.20516 H 5.0287019 l 1.850945,-2.76773 z"
|
99
|
+
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.1120739px;font-family:'Noto Serif Gurmukhi';-inkscape-font-specification:'Noto Serif Gurmukhi';stroke-width:0.07525919"
|
100
|
+
id="path871" />
|
101
|
+
<path
|
102
|
+
inkscape:connector-curvature="0"
|
103
|
+
d="m 10.340185,198.30877 v 0.55216 h 0.658075 v 0.24829 h -0.658075 v 1.0557 q 0,0.23788 0.06424,0.3056 0.06598,0.0677 0.265661,0.0677 h 0.328169 v 0.26739 h -0.328169 q -0.369842,0 -0.510486,-0.13717 -0.140644,-0.13891 -0.140644,-0.50354 v -1.0557 H 9.7845543 v -0.24829 h 0.2344067 v -0.55216 z"
|
104
|
+
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.55603695px;font-family:'Noto Serif Gurmukhi';-inkscape-font-specification:'Noto Serif Gurmukhi';stroke-width:0.07525919"
|
105
|
+
id="path873" />
|
106
|
+
<path
|
107
|
+
inkscape:connector-curvature="0"
|
108
|
+
d="m 12.17203,199.08491 q -0.25698,0 -0.406305,0.20142 -0.149326,0.19968 -0.149326,0.54869 0,0.349 0.147589,0.55042 0.149326,0.19968 0.408042,0.19968 0.255242,0 0.404568,-0.20142 0.149326,-0.20141 0.149326,-0.54868 0,-0.34554 -0.149326,-0.54695 -0.149326,-0.20316 -0.404568,-0.20316 z m 0,-0.27087 q 0.416723,0 0.654602,0.27087 0.237879,0.27087 0.237879,0.75011 0,0.47749 -0.237879,0.7501 -0.237879,0.27087 -0.654602,0.27087 -0.41846,0 -0.656339,-0.27087 -0.236143,-0.27261 -0.236143,-0.7501 0,-0.47924 0.236143,-0.75011 0.237879,-0.27087 0.656339,-0.27087 z"
|
109
|
+
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.55603695px;font-family:'Noto Serif Gurmukhi';-inkscape-font-specification:'Noto Serif Gurmukhi';stroke-width:0.07525919"
|
110
|
+
id="path875" />
|
111
|
+
<path
|
112
|
+
inkscape:connector-curvature="0"
|
113
|
+
d="m 15.108191,199.23424 q 0.119808,-0.21531 0.286497,-0.31775 0.166689,-0.10245 0.392414,-0.10245 0.303861,0 0.468814,0.21358 0.164953,0.21183 0.164953,0.60424 v 1.17377 h -0.321224 v -1.16335 q 0,-0.27955 -0.09897,-0.41499 -0.09897,-0.13543 -0.302124,-0.13543 -0.248298,0 -0.392414,0.16495 -0.144117,0.16496 -0.144117,0.44972 v 1.0991 h -0.321224 v -1.16335 q 0,-0.28129 -0.09897,-0.41499 -0.09897,-0.13543 -0.305597,-0.13543 -0.244825,0 -0.388941,0.16669 -0.144117,0.16495 -0.144117,0.44798 v 1.0991 h -0.321224 v -1.9447 h 0.321224 v 0.30212 q 0.10939,-0.17884 0.262188,-0.26392 0.152799,-0.0851 0.362897,-0.0851 0.211834,0 0.359423,0.10766 0.149326,0.10765 0.220516,0.31254 z"
|
114
|
+
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.55603695px;font-family:'Noto Serif Gurmukhi';-inkscape-font-specification:'Noto Serif Gurmukhi';stroke-width:0.07525919"
|
115
|
+
id="path877" />
|
116
|
+
<path
|
117
|
+
inkscape:connector-curvature="0"
|
118
|
+
d="m 17.811682,199.08491 q -0.256979,0 -0.406305,0.20142 -0.149326,0.19968 -0.149326,0.54869 0,0.349 0.147589,0.55042 0.149326,0.19968 0.408042,0.19968 0.255243,0 0.404568,-0.20142 0.149326,-0.20141 0.149326,-0.54868 0,-0.34554 -0.149326,-0.54695 -0.149325,-0.20316 -0.404568,-0.20316 z m 0,-0.27087 q 0.416723,0 0.654602,0.27087 0.23788,0.27087 0.23788,0.75011 0,0.47749 -0.23788,0.7501 -0.237879,0.27087 -0.654602,0.27087 -0.41846,0 -0.656339,-0.27087 -0.236143,-0.27261 -0.236143,-0.7501 0,-0.47924 0.236143,-0.75011 0.237879,-0.27087 0.656339,-0.27087 z"
|
119
|
+
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.55603695px;font-family:'Noto Serif Gurmukhi';-inkscape-font-specification:'Noto Serif Gurmukhi';stroke-width:0.07525919"
|
120
|
+
id="path879" />
|
121
|
+
</g>
|
122
|
+
</g>
|
123
|
+
</svg>
|
@@ -27,11 +27,18 @@ __license__ = "MIT"
|
|
27
27
|
__date__ = "10/12/2021"
|
28
28
|
|
29
29
|
|
30
|
+
import os
|
30
31
|
import gc
|
32
|
+
import h5py
|
31
33
|
import pytest
|
34
|
+
import pickle
|
35
|
+
import tempfile
|
36
|
+
import numpy
|
32
37
|
from silx.gui import qt
|
33
|
-
from
|
38
|
+
from silx.io.url import DataUrl
|
39
|
+
from tomwer.tests.utils import skip_gui_test
|
34
40
|
from silx.gui.utils.testutils import TestCaseQt
|
41
|
+
from orangecanvas.scheme.readwrite import literal_dumps
|
35
42
|
from orangecontrib.tomwer.widgets.edit.DarkFlatPatchOW import DarkFlatPatchOW
|
36
43
|
|
37
44
|
|
@@ -52,3 +59,16 @@ class TestDarkFlatPatch(TestCaseQt):
|
|
52
59
|
def test(self):
|
53
60
|
self._window.show()
|
54
61
|
self.qWaitForWindowExposed(self._window)
|
62
|
+
|
63
|
+
def test_serialiazation(self):
|
64
|
+
with tempfile.TemporaryDirectory() as tmp_path:
|
65
|
+
file_path = os.path.join(tmp_path, "darks.hdf5")
|
66
|
+
with h5py.File(file_path, mode="w") as h5f:
|
67
|
+
h5f.require_group("darks")["0"] = numpy.ones((10, 10))
|
68
|
+
dark_url = DataUrl(file_path=file_path, data_path="darks/0")
|
69
|
+
self._window.widget.setStartDarkUrl(url=dark_url)
|
70
|
+
config = self._window.getConfiguration()
|
71
|
+
pickle.dumps(config)
|
72
|
+
literal_dumps(config)
|
73
|
+
|
74
|
+
self._window.setConfiguration(config)
|
@@ -30,7 +30,7 @@ __date__ = "10/12/2021"
|
|
30
30
|
import gc
|
31
31
|
import pytest
|
32
32
|
from silx.gui import qt
|
33
|
-
from tomwer.
|
33
|
+
from tomwer.tests.utils import skip_gui_test
|
34
34
|
from silx.gui.utils.testutils import TestCaseQt
|
35
35
|
from orangecontrib.tomwer.widgets.edit.ImageKeyEditorOW import ImageKeyEditorOW
|
36
36
|
|
@@ -30,7 +30,7 @@ __date__ = "10/12/2021"
|
|
30
30
|
import gc
|
31
31
|
import pytest
|
32
32
|
from silx.gui import qt
|
33
|
-
from tomwer.
|
33
|
+
from tomwer.tests.utils import skip_gui_test
|
34
34
|
from silx.gui.utils.testutils import TestCaseQt
|
35
35
|
from orangecontrib.tomwer.widgets.edit.ImageKeyUpgraderOW import ImageKeyUpgraderOW
|
36
36
|
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import gc
|
2
|
+
import pytest
|
3
|
+
from silx.gui import qt
|
4
|
+
from tomwer.tests.utils import skip_gui_test
|
5
|
+
from silx.gui.utils.testutils import TestCaseQt
|
6
|
+
from orangecontrib.tomwer.widgets.edit.NXtomoEditorOW import NXtomoEditorOW
|
7
|
+
|
8
|
+
|
9
|
+
@pytest.mark.skipif(skip_gui_test(), reason="skip gui test")
|
10
|
+
class TestNXtomoEditorOW(TestCaseQt):
|
11
|
+
"""Test that the NXtomoEditorOW widget work correctly. Processing test are done in the core module. gui test are done in the tomwer.gui.edit module"""
|
12
|
+
|
13
|
+
def setUp(self):
|
14
|
+
super().setUp()
|
15
|
+
self._window = NXtomoEditorOW()
|
16
|
+
|
17
|
+
def tearDown(self):
|
18
|
+
self._window.setAttribute(qt.Qt.WA_DeleteOnClose)
|
19
|
+
self._window.close()
|
20
|
+
self._window = None
|
21
|
+
gc.collect()
|
22
|
+
|
23
|
+
def test(self):
|
24
|
+
self._window.show()
|
25
|
+
self.qWaitForWindowExposed(self._window)
|
@@ -13,13 +13,13 @@ from silx.gui import qt
|
|
13
13
|
from orangewidget import widget, gui
|
14
14
|
from orangewidget.utils import itemmodels
|
15
15
|
from orangewidget.settings import Setting, SettingsHandler
|
16
|
-
from orangewidget.utils.widgetpreview import WidgetPreview
|
17
16
|
from orangewidget.widget import OWBaseWidget, Input, Output
|
18
17
|
import tomwer.core.process.script.python
|
19
18
|
from tomwer.core.cluster.cluster import SlurmClusterConfiguration
|
20
19
|
from tomwer.core.futureobject import FutureTomwerObject
|
21
20
|
from tomwer.core.scan.scanbase import TomwerScanBase
|
22
21
|
from tomwer.core.volume.volumebase import TomwerVolumeBase
|
22
|
+
from tomoscan.serie import Serie
|
23
23
|
|
24
24
|
__all__ = ["OWPythonScript"]
|
25
25
|
|
@@ -413,6 +413,13 @@ class OWPythonScript(widget.OWBaseWidget, openclass=True):
|
|
413
413
|
default=True,
|
414
414
|
multiple=True,
|
415
415
|
)
|
416
|
+
serie = Input(
|
417
|
+
"serie",
|
418
|
+
Serie,
|
419
|
+
replaces=["in_serie"],
|
420
|
+
default=True,
|
421
|
+
multiple=True,
|
422
|
+
)
|
416
423
|
|
417
424
|
class Outputs:
|
418
425
|
data = Output("data", TomwerScanBase, replaces=["out_data"])
|
@@ -425,6 +432,7 @@ class OWPythonScript(widget.OWBaseWidget, openclass=True):
|
|
425
432
|
cluster_config = Output(
|
426
433
|
"cluster_config", SlurmClusterConfiguration, replaces=["out_cluster_config"]
|
427
434
|
)
|
435
|
+
serie = Output("serie", dict, replaces=["out_serie"])
|
428
436
|
|
429
437
|
signal_names = (
|
430
438
|
"data",
|
@@ -433,6 +441,7 @@ class OWPythonScript(widget.OWBaseWidget, openclass=True):
|
|
433
441
|
"object",
|
434
442
|
"configuration",
|
435
443
|
"cluster_config",
|
444
|
+
"serie",
|
436
445
|
)
|
437
446
|
|
438
447
|
settingsHandler = PrepareSavingSettingsHandler()
|
@@ -453,7 +462,7 @@ class OWPythonScript(widget.OWBaseWidget, openclass=True):
|
|
453
462
|
for name in self.signal_names:
|
454
463
|
setattr(self, name, {})
|
455
464
|
|
456
|
-
for s in self.libraryListSource:
|
465
|
+
for s in self.libraryListSource: # pylint: disable=E1133
|
457
466
|
s.flags = 0
|
458
467
|
|
459
468
|
self._cachedDocuments = {}
|
@@ -619,13 +628,17 @@ class OWPythonScript(widget.OWBaseWidget, openclass=True):
|
|
619
628
|
self.handle_input(data, id, "configuration")
|
620
629
|
|
621
630
|
@Inputs.future_tomo_obj # noqa F811
|
622
|
-
def
|
631
|
+
def set_future_tomo_object(self, data, id): # noqa F811 pylint: disable=E0102
|
623
632
|
self.handle_input(data, id, "future_tomo_obj")
|
624
633
|
|
625
634
|
@Inputs.cluster_config # noqa F811
|
626
|
-
def
|
635
|
+
def set_cluster_config(self, data, id): # noqa F811 pylint: disable=E0102
|
627
636
|
self.handle_input(data, id, "cluster_config")
|
628
637
|
|
638
|
+
@Inputs.serie # noqa F811
|
639
|
+
def set_serie(self, data, id):
|
640
|
+
self.handle_input(data, id, "serie")
|
641
|
+
|
629
642
|
def handleNewSignals(self):
|
630
643
|
self.commit()
|
631
644
|
|
@@ -643,7 +656,7 @@ class OWPythonScript(widget.OWBaseWidget, openclass=True):
|
|
643
656
|
self.libraryList.append(Script("New script", self.text.toPlainText(), 0))
|
644
657
|
self.setSelectedScript(len(self.libraryList) - 1)
|
645
658
|
|
646
|
-
def onAddScriptFromFile(self, *args):
|
659
|
+
def onAddScriptFromFile(self, *args): # pragma: no cover
|
647
660
|
filename, _ = qt.QFileDialog.getOpenFileName(
|
648
661
|
self,
|
649
662
|
"Open Python Script",
|
@@ -716,7 +729,7 @@ class OWPythonScript(widget.OWBaseWidget, openclass=True):
|
|
716
729
|
self.text.document().setPlainText(self.libraryList[index].script)
|
717
730
|
self.text.document().setModified(False)
|
718
731
|
|
719
|
-
def saveScript(self):
|
732
|
+
def saveScript(self): # pragma: no cover
|
720
733
|
index = self.selectedScriptIndex()
|
721
734
|
if index is not None:
|
722
735
|
script = self.libraryList[index]
|
@@ -772,7 +785,3 @@ class OWPythonScript(widget.OWBaseWidget, openclass=True):
|
|
772
785
|
getattr(self.Error, signal)()
|
773
786
|
out_var = None
|
774
787
|
getattr(self.Outputs, signal).send(out_var)
|
775
|
-
|
776
|
-
|
777
|
-
if __name__ == "__main__": # pragma: no cover
|
778
|
-
WidgetPreview(OWPythonScript).run()
|