tomwer 1.4.13__py3-none-any.whl → 1.4.14__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.
- tomwer/app/stitching/common.py +30 -1
- tomwer/gui/stitching/StitchingWindow.py +6 -0
- tomwer/gui/stitching/config/output.py +13 -5
- tomwer/gui/utils/inputwidget.py +1 -1
- tomwer/version.py +1 -1
- {tomwer-1.4.13.dist-info → tomwer-1.4.14.dist-info}/METADATA +1 -1
- {tomwer-1.4.13.dist-info → tomwer-1.4.14.dist-info}/RECORD +11 -11
- {tomwer-1.4.13.dist-info → tomwer-1.4.14.dist-info}/LICENSE +0 -0
- {tomwer-1.4.13.dist-info → tomwer-1.4.14.dist-info}/WHEEL +0 -0
- {tomwer-1.4.13.dist-info → tomwer-1.4.14.dist-info}/entry_points.txt +0 -0
- {tomwer-1.4.13.dist-info → tomwer-1.4.14.dist-info}/top_level.txt +0 -0
tomwer/app/stitching/common.py
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
4
|
|
5
|
+
import os
|
5
6
|
import argparse
|
6
7
|
import logging
|
7
8
|
import signal
|
@@ -12,10 +13,10 @@ from tqdm import tqdm
|
|
12
13
|
|
13
14
|
import silx
|
14
15
|
from silx.gui import qt
|
16
|
+
from silx.io.url import DataUrl
|
15
17
|
|
16
18
|
from nabu.pipeline.config import generate_nabu_configfile
|
17
19
|
from nabu.stitching.config import get_default_stitching_config, SECTIONS_COMMENTS
|
18
|
-
import os
|
19
20
|
from nabu.stitching.config import StitchingType
|
20
21
|
|
21
22
|
from tomwer.core.volume.volumefactory import VolumeFactory
|
@@ -30,6 +31,8 @@ from tomwer.gui.stitching.StitchingWindow import YStitchingWindow as _YStitching
|
|
30
31
|
from tomwer.gui.stitching import action as stitching_action
|
31
32
|
from tomwer.gui.cluster.slurm import SlurmSettingsWidget
|
32
33
|
from tomwer.core.scan.scanbase import TomwerScanBase
|
34
|
+
from tomwer.core.scan.nxtomoscan import NXtomoScan
|
35
|
+
from tomwer.core.volume import HDF5Volume
|
33
36
|
|
34
37
|
|
35
38
|
class MainWidget(qt.QTabWidget):
|
@@ -223,6 +226,26 @@ class MainWindow(qt.QDialog):
|
|
223
226
|
self.layout().addWidget(self._buttons)
|
224
227
|
self._buttons.button(qt.QDialogButtonBox.Apply).setText("Launch stitching")
|
225
228
|
|
229
|
+
# set up
|
230
|
+
self._mainWindow._stitchingConfigWindow.setPreProcessingOutput(
|
231
|
+
NXtomoScan(
|
232
|
+
scan=os.path.join(os.getcwd(), "stitching", "stitched.nx"),
|
233
|
+
entry="entry0000",
|
234
|
+
)
|
235
|
+
.get_identifier()
|
236
|
+
.to_str()
|
237
|
+
)
|
238
|
+
self._mainWindow._stitchingConfigWindow.setPostProcessingOutput(
|
239
|
+
HDF5Volume(
|
240
|
+
file_path=os.path.join(
|
241
|
+
os.getcwd(), "stitching", "stitched_volume.hdf5"
|
242
|
+
),
|
243
|
+
data_path="stitched_volume",
|
244
|
+
)
|
245
|
+
.get_identifier()
|
246
|
+
.to_str()
|
247
|
+
)
|
248
|
+
|
226
249
|
# connect signal / slot
|
227
250
|
self._buttons.button(qt.QDialogButtonBox.Apply).clicked.connect(self.accept)
|
228
251
|
self._loadConfigurationAction.triggered.connect(
|
@@ -301,6 +324,12 @@ class MainWindow(qt.QDialog):
|
|
301
324
|
def loadSettings(self, config_file: str):
|
302
325
|
self._mainWindow.loadSettings(config_file)
|
303
326
|
|
327
|
+
def setPreProcessingOutput(self, url: DataUrl) -> None:
|
328
|
+
self._mainWindow._stitchingConfigWindow.setPreProcessingOutput(url=url)
|
329
|
+
|
330
|
+
def setPostProcessingOutput(self, url: DataUrl) -> None:
|
331
|
+
self._mainWindow._stitchingConfigWindow.setPostProcessingOutput(url=url)
|
332
|
+
|
304
333
|
|
305
334
|
def main(argv, stitcher_name: str, stitching_axis: int, logger):
|
306
335
|
parser = argparse.ArgumentParser(description=__doc__)
|
@@ -577,6 +577,12 @@ class _SingleAxisStitchingWindow(
|
|
577
577
|
level >= ConfigurationLevel.ADVANCED
|
578
578
|
)
|
579
579
|
|
580
|
+
def setPreProcessingOutput(self, *args, **kwargs):
|
581
|
+
self._outputWidget.setPreProcessingOutput(*args, **kwargs)
|
582
|
+
|
583
|
+
def setPostProcessingOutput(self, *args, **kwargs):
|
584
|
+
self._outputWidget.setPostProcessingOutput(*args, **kwargs)
|
585
|
+
|
580
586
|
|
581
587
|
class YStitchingWindow(_SingleAxisStitchingWindow, axis=1):
|
582
588
|
pass
|
@@ -9,6 +9,7 @@ from tomwer.core.scan.nxtomoscan import NXtomoScan, NXtomoScanIdentifier
|
|
9
9
|
from tomwer.core.scan.scanfactory import ScanFactory
|
10
10
|
from tomwer.gui.utils.inputwidget import OutputVolumeDefinition
|
11
11
|
from tomwer.gui.qlefilesystem import QLFileSystem
|
12
|
+
from silx.io.url import DataUrl
|
12
13
|
|
13
14
|
_logger = logging.getLogger(__name__)
|
14
15
|
|
@@ -22,9 +23,9 @@ class _PreProcessingOutput(qt.QWidget):
|
|
22
23
|
super().__init__(parent)
|
23
24
|
self.setLayout(qt.QFormLayout())
|
24
25
|
# TODO: check if the widget with output .nx file exists somewhere
|
25
|
-
self._outputFile = QLFileSystem("
|
26
|
+
self._outputFile = QLFileSystem("", self)
|
26
27
|
self.layout().addRow("output nexus file", self._outputFile)
|
27
|
-
self._outputDataPath = qt.QLineEdit("
|
28
|
+
self._outputDataPath = qt.QLineEdit("", self)
|
28
29
|
self.layout().addRow("output data path", self._outputDataPath)
|
29
30
|
|
30
31
|
def getUrl(self) -> str:
|
@@ -114,8 +115,8 @@ class StitchingOutput(qt.QWidget):
|
|
114
115
|
scan = None
|
115
116
|
|
116
117
|
if not isinstance(scan, NXtomoScan):
|
117
|
-
_logger.
|
118
|
-
|
118
|
+
_logger.warning("Failed to create an HDF5Tomoscan from url")
|
119
|
+
pass
|
119
120
|
else:
|
120
121
|
config.update(
|
121
122
|
{
|
@@ -125,7 +126,7 @@ class StitchingOutput(qt.QWidget):
|
|
125
126
|
},
|
126
127
|
}
|
127
128
|
)
|
128
|
-
|
129
|
+
return config
|
129
130
|
else:
|
130
131
|
raise NotImplementedError
|
131
132
|
|
@@ -160,3 +161,10 @@ class StitchingOutput(qt.QWidget):
|
|
160
161
|
if overwrite is not None:
|
161
162
|
overwrite = convert_str_to_bool(overwrite)
|
162
163
|
self._overwritePB.setChecked(overwrite)
|
164
|
+
|
165
|
+
# expose API
|
166
|
+
def setPreProcessingOutput(self, identifier: str) -> None:
|
167
|
+
self._preProcOutput.setUrl(identifier)
|
168
|
+
|
169
|
+
def setPostProcessingOutput(self, identifier: DataUrl) -> None:
|
170
|
+
self._postProcOutput.setUrl(identifier)
|
tomwer/gui/utils/inputwidget.py
CHANGED
@@ -437,7 +437,7 @@ class OutputVolumeDefinition(qt.QWidget):
|
|
437
437
|
# output file or folder
|
438
438
|
self._outputFileLabel = qt.QLabel("", self)
|
439
439
|
self.layout().addWidget(self._outputFileLabel, 1, 0, 1, 1)
|
440
|
-
self._outputFileQLE = QLFileSystem("
|
440
|
+
self._outputFileQLE = QLFileSystem("", parent=None)
|
441
441
|
self.layout().addWidget(self._outputFileQLE, 1, 1, 1, 1)
|
442
442
|
self._selectPB = qt.QPushButton("select", self)
|
443
443
|
self.layout().addWidget(self._selectPB, 1, 2, 1, 1)
|
tomwer/version.py
CHANGED
@@ -219,7 +219,7 @@ orangecontrib/tomwer/widgets/visualization/tests/__init__.py,sha256=47DEQpj8HBSa
|
|
219
219
|
tomwer/__init__.py,sha256=cMIyH-uRxpa9WVnAuWjiBD7k9TK57WO21RzP_S-Mb8I,460
|
220
220
|
tomwer/__main__.py,sha256=7tCADiS4u7k1PCxFhlRAcYSIOpxQTGUTx8sCEQ-hi1E,8707
|
221
221
|
tomwer/utils.py,sha256=7h7dEgKAEUmQ43jkULvC1B9Adl55nkCty-SEKUKCl4U,7008
|
222
|
-
tomwer/version.py,sha256=
|
222
|
+
tomwer/version.py,sha256=NdCYntfMNeKVf1OAvYXxI1EfJfcd4vMwcvkvuOXqN5s,4387
|
223
223
|
tomwer/app/__init__.py,sha256=h1FKED7Tw5f99yikygt7ruXsdrxQhcJxO7kagLGxhJg,84
|
224
224
|
tomwer/app/axis.py,sha256=lB-IZx1o6KTWLIelITvYCIu2flFTB9NhuIfD2MhUZZA,5826
|
225
225
|
tomwer/app/canvas.py,sha256=y8rYOiwmv6ug7JcjgkOzEiGQnNXjKWNNmKofT0n8TFg,1538
|
@@ -252,7 +252,7 @@ tomwer/app/canvas_launcher/splash.py,sha256=cpUuZVKwlQbeAWfAqjpjP4q1v1MmkfxU6WWl
|
|
252
252
|
tomwer/app/canvas_launcher/utils.py,sha256=WfsCHAhiiv4-TUNodgyKJenVvmFWnxsy5OBwTBK2jKE,1279
|
253
253
|
tomwer/app/canvas_launcher/widgetsscheme.py,sha256=9Or1KMmSxIs_dJmJGV0Xhjg9HH4m8aPGbtiEuK2i6q0,2744
|
254
254
|
tomwer/app/stitching/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
255
|
-
tomwer/app/stitching/common.py,sha256
|
255
|
+
tomwer/app/stitching/common.py,sha256=-DNsE3XbBBCvm-NqSTCyJMiYY5GoGHkdzC0y66jZ6Po,15779
|
256
256
|
tomwer/core/__init__.py,sha256=-EtD8J-a7WVnCgYS7WHkisYn61iM2PpHWcXwE5BetJ8,71
|
257
257
|
tomwer/core/futureobject.py,sha256=8Sd9gOrdhYc0PvzPeZPBNOmaHuwB5epG6RJyABRsCmQ,5113
|
258
258
|
tomwer/core/resourcemanager.py,sha256=VLNnVodMa-HOMZhN2qpUR_L6phJ8IHPUEPYMxuW6VHg,1067
|
@@ -600,7 +600,7 @@ tomwer/gui/samplemoved/__init__.py,sha256=jNA03mYWfP3_S1MRet6ijYe5DNCTK3Br7-5yrW
|
|
600
600
|
tomwer/gui/samplemoved/selectiontable.py,sha256=CzQnJBxfIeoZSw8aR0VvrsaIg6fozREI8YRXdzQbA7Q,7968
|
601
601
|
tomwer/gui/stitching/SingleAxisStitchingWidget.py,sha256=syBzSf8yRE9poZh0UKqZcyD8ZmEt-vama8bVRsGBuDw,13023
|
602
602
|
tomwer/gui/stitching/StitchingOptionsWidget.py,sha256=c5kRZOMuGKK_CgK28IkBawaVvK2cmczbWF4TcVUZxq4,18186
|
603
|
-
tomwer/gui/stitching/StitchingWindow.py,sha256=
|
603
|
+
tomwer/gui/stitching/StitchingWindow.py,sha256=g5lurZ3rZ010PBvU4oOWqDgcF3SbDzIqgIOyBHZ-Lyw,24608
|
604
604
|
tomwer/gui/stitching/__init__.py,sha256=jYSG4DSAtMGm9Yuf4MVdlSdMO8JKOp_t-8NKsnR92LU,45
|
605
605
|
tomwer/gui/stitching/action.py,sha256=7CkACYKsRt3c_6PgrmQVZwSi9UwvGrQVUymJytHbqcE,1659
|
606
606
|
tomwer/gui/stitching/alignment.py,sha256=QGWnogvBSbx3kk8lrFDoipmhqbVHEe46WGAeOorlHQ8,4001
|
@@ -615,7 +615,7 @@ tomwer/gui/stitching/stitching_raw.py,sha256=imFJZyoVQ8H9JgdS02UoNcudvalfCQCAHVv
|
|
615
615
|
tomwer/gui/stitching/utils.py,sha256=ZgfKHLyH7l81Ry-4M5ajdwqdeos_J4g4Ee3j3yoXcJo,599
|
616
616
|
tomwer/gui/stitching/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
617
617
|
tomwer/gui/stitching/config/axisparams.py,sha256=1cRa9ukPvVK7AGePJsJx2M_i_5TMLJocVwrotz7uxXk,8026
|
618
|
-
tomwer/gui/stitching/config/output.py,sha256=
|
618
|
+
tomwer/gui/stitching/config/output.py,sha256=2kOKV5vTt1scIkmEUyhSvERRs8UvEHojRazCC0RzeE8,6176
|
619
619
|
tomwer/gui/stitching/config/positionoveraxis.py,sha256=NGgjxzhxCXa3fBtHP9O9oiqLw8lpUqV_NNbhrnRGrdY,16328
|
620
620
|
tomwer/gui/stitching/config/stitchingstrategies.py,sha256=BI5KYs0qeEp-hfFI7M9MJN8EHmoC7iaJqQ7Hf902v6Y,4598
|
621
621
|
tomwer/gui/stitching/config/tomoobjdetails.py,sha256=GkQIqE2ArXFJFtmjrwc0txbZldNKJK-fpMEF_68S1qQ,14667
|
@@ -641,7 +641,7 @@ tomwer/gui/utils/completer.py,sha256=XQGVSiUdLa1MfgXPDY5qfcTxtjVerxmVKXmWDb-kQ-I
|
|
641
641
|
tomwer/gui/utils/flow.py,sha256=p9KoaXSK_YhyFrpUTXr-HI1pAoDRiCPW1F9tVgjSIbA,10668
|
642
642
|
tomwer/gui/utils/gpu.py,sha256=R2sRA77zyxdy5bVYGNltQpKS_9wuaj9eIn6rglsWGWg,2223
|
643
643
|
tomwer/gui/utils/illustrations.py,sha256=SoLAGBIrdYAu44qIZM8kvC74naOTJzUyAxSUkpblyEw,3134
|
644
|
-
tomwer/gui/utils/inputwidget.py,sha256=
|
644
|
+
tomwer/gui/utils/inputwidget.py,sha256=s1siEQ6nBOTVRF7v8wlgCISS0bYiVmWYpFnWCqM5ueY,22376
|
645
645
|
tomwer/gui/utils/loadingmode.py,sha256=A9FeNacgnDFqhyrq5-qybCvV_NwGdXU-Skr_5vwoTZM,2928
|
646
646
|
tomwer/gui/utils/qt_utils.py,sha256=QMXte_vdCEwr4Vybt5sopczQ_OuRd1W5h6SydqFH0F8,538
|
647
647
|
tomwer/gui/utils/sandboxes.py,sha256=QfSRhL1KrFhS2Wr734Tzvp1OjTp82Ozc0ULr-JycFlI,6145
|
@@ -906,9 +906,9 @@ tomwer/tests/orangecontrib/tomwer/widgets/visualization/tests/test_volume_viewer
|
|
906
906
|
tomwer/tests/test_ewoks/test_conversion.py,sha256=a8cEWbErXiFCAkaapi0jeEoRKYxcFQCoa-Jr_u77_OM,3656
|
907
907
|
tomwer/tests/test_ewoks/test_single_node_execution.py,sha256=YBUHfiAnkciv_kjj7biC5fOs7c7ofNImM_azGMn4LZM,2813
|
908
908
|
tomwer/tests/test_ewoks/test_workflows.py,sha256=Eq80eexf5NVL7SzvwctLOaUeuQ8V3vDiFiHgbJA4Yb8,4871
|
909
|
-
tomwer-1.4.
|
910
|
-
tomwer-1.4.
|
911
|
-
tomwer-1.4.
|
912
|
-
tomwer-1.4.
|
913
|
-
tomwer-1.4.
|
914
|
-
tomwer-1.4.
|
909
|
+
tomwer-1.4.14.dist-info/LICENSE,sha256=62p1wL0n9WMTu8x2YDv0odYgTqeSvTd9mQ0v6Mq7lzE,1876
|
910
|
+
tomwer-1.4.14.dist-info/METADATA,sha256=6cGCqNQ55Ns2Lu1E5zAiNPGjMAsN_8H0lfWsS0kctJ0,13416
|
911
|
+
tomwer-1.4.14.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
912
|
+
tomwer-1.4.14.dist-info/entry_points.txt,sha256=py3ZUWvGnWGc5c7Yhw_uBTm8Fmew0BDw3aQZnWMBNZI,500
|
913
|
+
tomwer-1.4.14.dist-info/top_level.txt,sha256=Yz5zKh0FPiImtzHYcPuztG1AO8-6KEpUWgoChGbA0Ys,21
|
914
|
+
tomwer-1.4.14.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|