tomwer 1.4.18__py3-none-any.whl → 1.5.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/simple_volume_local_reconstruction.ows +11 -8
- orangecontrib/tomwer/tutorials/simple_volume_to_slurm_reconstruction.ows +12 -9
- orangecontrib/tomwer/widgets/cluster/SlurmClusterOW.py +11 -0
- orangecontrib/tomwer/widgets/control/DataDiscoveryOW.py +1 -1
- orangecontrib/tomwer/widgets/control/NXTomomillMixIn.py +21 -10
- tomwer/app/axis.py +1 -1
- tomwer/app/reducedarkflat.py +2 -2
- tomwer/core/process/control/datalistener/rpcserver.py +2 -8
- tomwer/core/process/drac/binning.py +2 -2
- tomwer/core/process/drac/output.py +1 -1
- tomwer/core/process/edit/imagekeyeditor.py +4 -6
- tomwer/core/process/edit/nxtomoeditor.py +58 -20
- tomwer/core/process/output.py +6 -5
- tomwer/core/process/reconstruction/axis/anglemode.py +2 -2
- tomwer/core/process/reconstruction/axis/axis.py +1 -0
- tomwer/core/process/reconstruction/axis/mode.py +2 -2
- tomwer/core/process/reconstruction/axis/params.py +4 -4
- tomwer/core/process/reconstruction/axis/projectiontype.py +1 -1
- tomwer/core/process/reconstruction/axis/side.py +1 -1
- tomwer/core/process/reconstruction/darkref/darkrefs.py +2 -2
- tomwer/core/process/reconstruction/darkref/darkrefscopy.py +1 -1
- tomwer/core/process/reconstruction/darkref/params.py +2 -3
- tomwer/core/process/reconstruction/nabu/castvolume.py +4 -1
- tomwer/core/process/reconstruction/nabu/helical.py +3 -1
- tomwer/core/process/reconstruction/nabu/nabucommon.py +2 -2
- tomwer/core/process/reconstruction/nabu/nabuscores.py +1 -1
- tomwer/core/process/reconstruction/nabu/nabuslices.py +4 -4
- tomwer/core/process/reconstruction/nabu/plane.py +2 -2
- tomwer/core/process/reconstruction/nabu/target.py +1 -1
- tomwer/core/process/reconstruction/nabu/test/test_castvolume.py +2 -0
- tomwer/core/process/reconstruction/nabu/test/test_nabu_utils.py +9 -0
- tomwer/core/process/reconstruction/nabu/utils.py +18 -14
- tomwer/core/process/reconstruction/normalization/normalization.py +1 -1
- tomwer/core/process/reconstruction/normalization/params.py +4 -4
- tomwer/core/process/reconstruction/output.py +2 -2
- tomwer/core/process/reconstruction/saaxis/params.py +3 -3
- tomwer/core/process/reconstruction/saaxis/saaxis.py +5 -1
- tomwer/core/process/reconstruction/scores/params.py +2 -2
- tomwer/core/process/reconstruction/scores/scores.py +3 -3
- tomwer/core/process/reconstruction/tests/test_axis.py +1 -1
- tomwer/core/process/reconstruction/tests/test_saaxis.py +56 -66
- tomwer/core/process/stitching/metadataholder.py +5 -5
- tomwer/core/process/stitching/nabustitcher.py +1 -4
- tomwer/core/process/tests/test_normalization.py +2 -1
- tomwer/core/scan/edfscan.py +3 -3
- tomwer/core/scan/nxtomoscan.py +3 -3
- tomwer/core/scan/scanbase.py +3 -3
- tomwer/core/scan/scantype.py +1 -1
- tomwer/core/settings.py +1 -1
- tomwer/core/tomwer_object.py +1 -1
- tomwer/core/utils/nxtomoutils.py +2 -2
- tomwer/core/utils/spec.py +6 -3
- tomwer/gui/cluster/slurm.py +12 -3
- tomwer/gui/configuration/level.py +1 -1
- tomwer/gui/control/actions.py +1 -1
- tomwer/gui/control/datadiscovery.py +1 -1
- tomwer/gui/control/datalist.py +1 -1
- tomwer/gui/control/reducedarkflatselector.py +4 -4
- tomwer/gui/control/series/seriescreator.py +5 -5
- tomwer/gui/control/tomoobjdisplaymode.py +1 -1
- tomwer/gui/dataportal/gallery.py +6 -6
- tomwer/gui/edit/imagekeyeditor.py +7 -9
- tomwer/gui/edit/nxtomoeditor.py +420 -112
- tomwer/gui/edit/tests/test_nx_editor.py +155 -83
- tomwer/gui/reconstruction/axis/CalculationWidget.py +1 -1
- tomwer/gui/reconstruction/axis/EstimatedCORWidget.py +12 -8
- tomwer/gui/reconstruction/axis/EstimatedCorComboBox.py +2 -2
- tomwer/gui/reconstruction/axis/InputWidget.py +3 -3
- tomwer/gui/reconstruction/darkref/darkrefwidget.py +2 -2
- tomwer/gui/reconstruction/nabu/castvolume.py +16 -1
- tomwer/gui/reconstruction/nabu/nabuconfig/base.py +2 -4
- tomwer/gui/reconstruction/nabu/nabuconfig/ctf.py +6 -6
- tomwer/gui/reconstruction/nabu/nabuconfig/nabuconfig.py +1 -1
- tomwer/gui/reconstruction/nabu/nabuconfig/phase.py +5 -5
- tomwer/gui/reconstruction/nabu/nabuconfig/preprocessing.py +2 -4
- tomwer/gui/reconstruction/nabu/nabuconfig/reconstruction.py +78 -52
- tomwer/gui/reconstruction/nabu/nabuflow.py +3 -13
- tomwer/gui/reconstruction/nabu/slices.py +11 -11
- tomwer/gui/reconstruction/nabu/test/test_cast_volume.py +19 -0
- tomwer/gui/reconstruction/nabu/volume.py +1 -1
- tomwer/gui/reconstruction/normalization/intensity.py +8 -12
- tomwer/gui/reconstruction/saaxis/corrangeselector.py +2 -2
- tomwer/gui/reconstruction/saaxis/dimensionwidget.py +71 -67
- tomwer/gui/reconstruction/sacommon.py +1 -1
- tomwer/gui/reconstruction/scores/scoreplot.py +18 -10
- tomwer/gui/reconstruction/tests/test_saaxis.py +18 -16
- tomwer/gui/stitching/SingleAxisStitchingWidget.py +8 -8
- tomwer/gui/stitching/StitchingOptionsWidget.py +1 -1
- tomwer/gui/stitching/alignment.py +8 -8
- tomwer/gui/stitching/config/axisparams.py +2 -2
- tomwer/gui/stitching/config/output.py +1 -1
- tomwer/gui/stitching/config/positionoveraxis.py +1 -1
- tomwer/gui/stitching/config/stitchingstrategies.py +4 -6
- tomwer/gui/stitching/config/tomoobjdetails.py +21 -13
- tomwer/gui/stitching/normalization.py +6 -6
- tomwer/gui/stitching/tests/test_ZStitchingWindow.py +8 -1
- tomwer/gui/stitching/tests/test_preview.py +10 -7
- tomwer/gui/stitching/tests/utils.py +27 -18
- tomwer/gui/stitching/z_stitching/fineestimation.py +7 -9
- tomwer/gui/stitching/z_stitching/tests/test_raw_estimation.py +18 -7
- tomwer/gui/stitching/z_stitching/tests/test_stitching_window.py +7 -2
- tomwer/gui/utils/buttons.py +54 -36
- tomwer/gui/utils/flow.py +2 -2
- tomwer/gui/utils/loadingmode.py +1 -1
- tomwer/gui/utils/unitsystem.py +44 -33
- tomwer/gui/utils/vignettes.py +1 -1
- tomwer/gui/visualization/dataviewer.py +7 -7
- tomwer/gui/visualization/diffviewer/diffviewer.py +4 -4
- tomwer/gui/visualization/diffviewer/shiftwidget.py +4 -6
- tomwer/gui/visualization/reconstructionparameters.py +35 -23
- tomwer/gui/visualization/scanoverview.py +28 -11
- tomwer/gui/visualization/test/test_nx_tomo_metadata_viewer.py +25 -13
- tomwer/gui/visualization/test/test_reconstruction_parameters.py +2 -2
- tomwer/model/dataset.py +0 -0
- tomwer/resources/gui/icons/borders.png +0 -0
- tomwer/synctools/utils/scanstages.py +3 -3
- tomwer/tasks/reconstruction/cleardarkflat.py +42 -0
- tomwer/tests/app/test_stitching.py +1 -1
- tomwer/tests/orangecontrib/tomwer/widgets/edit/tests/test_nxtomo_editor.py +32 -20
- tomwer/tests/orangecontrib/tomwer/widgets/reconstruction/tests/test_nabu_widget.py +1 -1
- tomwer/version.py +2 -2
- {tomwer-1.4.18.dist-info → tomwer-1.5.0.dist-info}/METADATA +8 -8
- {tomwer-1.4.18.dist-info → tomwer-1.5.0.dist-info}/RECORD +127 -124
- {tomwer-1.4.18.dist-info → tomwer-1.5.0.dist-info}/WHEEL +1 -1
- {tomwer-1.4.18.dist-info → tomwer-1.5.0.dist-info}/entry_points.txt +0 -0
- {tomwer-1.4.18.dist-info → tomwer-1.5.0.dist-info}/licenses/LICENSE +0 -0
- {tomwer-1.4.18.dist-info → tomwer-1.5.0.dist-info}/top_level.txt +0 -0
tomwer/core/scan/nxtomoscan.py
CHANGED
@@ -178,9 +178,9 @@ class NXtomoScan(_tsNXtomoScan, TomwerScanBase):
|
|
178
178
|
else:
|
179
179
|
return os.path.exists(master_file + ".h5")
|
180
180
|
|
181
|
-
def
|
182
|
-
_tsNXtomoScan.
|
183
|
-
TomwerScanBase.
|
181
|
+
def clear_cache(self):
|
182
|
+
_tsNXtomoScan.clear_cache(self)
|
183
|
+
TomwerScanBase.clear_cache(self)
|
184
184
|
|
185
185
|
def is_abort(self, src_pattern, dest_pattern):
|
186
186
|
"""
|
tomwer/core/scan/scanbase.py
CHANGED
@@ -10,7 +10,7 @@ from typing import Iterable
|
|
10
10
|
|
11
11
|
import numpy
|
12
12
|
from silx.io.url import DataUrl
|
13
|
-
from
|
13
|
+
from enum import Enum as _Enum
|
14
14
|
|
15
15
|
from tomoscan.identifier import VolumeIdentifier
|
16
16
|
from tomoscan.normalization import IntensityNormalization
|
@@ -92,10 +92,10 @@ class TomwerScanBase(TomwerObject):
|
|
92
92
|
"""
|
93
93
|
raise NotImplementedError("Base class")
|
94
94
|
|
95
|
-
def
|
95
|
+
def clear_cache(self):
|
96
96
|
self._cache_proj_urls = None
|
97
97
|
self._notify_ffc_rsc_missing = True
|
98
|
-
super().
|
98
|
+
super().clear_cache()
|
99
99
|
|
100
100
|
def _flat_field_correction(
|
101
101
|
self,
|
tomwer/core/scan/scantype.py
CHANGED
tomwer/core/settings.py
CHANGED
tomwer/core/tomwer_object.py
CHANGED
tomwer/core/utils/nxtomoutils.py
CHANGED
@@ -11,12 +11,12 @@ def get_n_series(image_key_values: tuple | list, image_key_type: ImageKey) -> in
|
|
11
11
|
|
12
12
|
:param image_key_values: list or tuple of image_keys to consider. Can be integers or tomoscan.esrf.scan.hdf5scan.ImageKey
|
13
13
|
"""
|
14
|
-
image_key_type = ImageKey
|
14
|
+
image_key_type = ImageKey(image_key_type)
|
15
15
|
if image_key_type is ImageKey.INVALID:
|
16
16
|
raise ValueError(
|
17
17
|
"we can't count Invalid image keys series because those are ignored from tomoscan"
|
18
18
|
)
|
19
|
-
image_key_values = [ImageKey
|
19
|
+
image_key_values = [ImageKey(img_key) for img_key in image_key_values]
|
20
20
|
|
21
21
|
# remove invalid frames
|
22
22
|
image_key_values = numpy.array(
|
tomwer/core/utils/spec.py
CHANGED
@@ -3,14 +3,17 @@ from __future__ import annotations
|
|
3
3
|
import fileinput
|
4
4
|
import logging
|
5
5
|
import os
|
6
|
+
import pint
|
7
|
+
|
8
|
+
import fabio
|
6
9
|
|
7
|
-
import fabio.edfimage
|
8
10
|
from lxml import etree
|
9
|
-
from pyunitsystem.metricsystem import MetricSystem
|
10
11
|
|
11
12
|
|
12
13
|
_logger = logging.getLogger(__name__)
|
13
14
|
|
15
|
+
_ureg = pint.get_application_registry()
|
16
|
+
|
14
17
|
|
15
18
|
def _getInformation(scan, refFile, information, _type, aliases=None):
|
16
19
|
"""
|
@@ -258,6 +261,6 @@ def getPixelSize(scan) -> float | None:
|
|
258
261
|
value = float(ddict["IMAGE_PIXEL_SIZE_1".lower()])
|
259
262
|
# for now pixel size are stored in microns. We want to return them in meter
|
260
263
|
if value is not None:
|
261
|
-
return value *
|
264
|
+
return (value * _ureg.micrometer).to_base_units().magnitude
|
262
265
|
else:
|
263
266
|
return None
|
tomwer/gui/cluster/slurm.py
CHANGED
@@ -94,7 +94,7 @@ class SlurmSettingsWindow(qt.QMainWindow):
|
|
94
94
|
|
95
95
|
self._modeCombox = qt.QComboBox(self)
|
96
96
|
self._mainWidget.layout().addRow("configuration: ", self._modeCombox)
|
97
|
-
self._modeCombox.addItems(SlurmSettingsMode
|
97
|
+
self._modeCombox.addItems([item.value for item in SlurmSettingsMode])
|
98
98
|
self._modeCombox.setCurrentText(SlurmSettingsMode.GENERIC.value)
|
99
99
|
|
100
100
|
self._settingsWidget = SlurmSettingsWidget(self, jobLimitation=None)
|
@@ -110,6 +110,7 @@ class SlurmSettingsWindow(qt.QMainWindow):
|
|
110
110
|
# connect signal / slot
|
111
111
|
self._modeCombox.currentIndexChanged.connect(self._reloadPredefinedSettings)
|
112
112
|
self._settingsWidget.sigConfigChanged.connect(self._configChanged)
|
113
|
+
self._modeCombox.currentIndexChanged.connect(self.sigConfigChanged)
|
113
114
|
# when the settings widget is edited them we automatically move to 'manual' settings. To notify visually the user
|
114
115
|
self._settingsWidget.sigConfigChanged.connect(self._switchToManual)
|
115
116
|
|
@@ -154,12 +155,20 @@ class SlurmSettingsWindow(qt.QMainWindow):
|
|
154
155
|
self._modeCombox.setCurrentText(SlurmSettingsMode.MANUAL.value)
|
155
156
|
|
156
157
|
def getCurrentSettingsMode(self) -> SlurmSettingsMode:
|
157
|
-
return SlurmSettingsMode
|
158
|
+
return SlurmSettingsMode(self._modeCombox.currentText())
|
158
159
|
|
159
160
|
def setCurrentSettingsMode(self, mode: SlurmSettingsMode) -> SlurmSettingsMode:
|
160
|
-
mode = SlurmSettingsMode
|
161
|
+
mode = SlurmSettingsMode(mode)
|
161
162
|
self._modeCombox.setCurrentText(mode.value)
|
162
163
|
|
164
|
+
def setMode(self, mode: SlurmSettingsMode) -> None:
|
165
|
+
"""Alias for setCurrentSettingsMode(), used by SlurmClusterOW."""
|
166
|
+
self.setCurrentSettingsMode(mode)
|
167
|
+
|
168
|
+
def mode(self) -> SlurmSettingsMode:
|
169
|
+
"""Alias for getCurrentSettingsMode(), used by SlurmClusterOW."""
|
170
|
+
return self.getCurrentSettingsMode()
|
171
|
+
|
163
172
|
# expose API
|
164
173
|
def getConfiguration(self) -> dict:
|
165
174
|
return self._settingsWidget.getConfiguration()
|
tomwer/gui/control/actions.py
CHANGED
@@ -86,7 +86,7 @@ class TomoObjDisplayModeToolButton(qt.QToolButton):
|
|
86
86
|
urlDescAction.triggered.connect(partial(self.setDisplayMode, DisplayMode.URL))
|
87
87
|
|
88
88
|
def setDisplayMode(self, mode: DisplayMode):
|
89
|
-
mode = DisplayMode
|
89
|
+
mode = DisplayMode(mode)
|
90
90
|
if mode is DisplayMode.SHORT:
|
91
91
|
self.setIcon(self._shortDescIcon)
|
92
92
|
self.setToolTip(self._SHORT_DESC_TOOLTIP)
|
@@ -44,7 +44,7 @@ class ScanDiscoveryConfigWidget(qt.QGroupBox):
|
|
44
44
|
raise NotImplementedError
|
45
45
|
|
46
46
|
def setScanType(self, mode: ScanType):
|
47
|
-
mode = ScanType
|
47
|
+
mode = ScanType(mode)
|
48
48
|
if mode is ScanType.SPEC:
|
49
49
|
self._specQRB.setChecked(True)
|
50
50
|
elif mode is ScanType.BLISS:
|
tomwer/gui/control/datalist.py
CHANGED
@@ -616,7 +616,7 @@ class _TomwerObjectList(qt.QTableWidget):
|
|
616
616
|
self.setDisplayMode(DisplayMode.SHORT)
|
617
617
|
|
618
618
|
def setDisplayMode(self, mode: DisplayMode) -> None:
|
619
|
-
self._displayMode = DisplayMode
|
619
|
+
self._displayMode = DisplayMode(mode)
|
620
620
|
self._update()
|
621
621
|
|
622
622
|
def n_data(self):
|
@@ -287,11 +287,11 @@ class ReduceDarkFlatSelectorTableWidget(qt.QWidget):
|
|
287
287
|
h5file=url.file_path(),
|
288
288
|
path=url.data_path(),
|
289
289
|
)
|
290
|
-
for target in REDUCER_TARGET
|
291
|
-
if target in reduced_info_dict:
|
292
|
-
reduced_frames = reduced_info_dict[target]
|
290
|
+
for target in REDUCER_TARGET:
|
291
|
+
if target.value in reduced_info_dict:
|
292
|
+
reduced_frames = reduced_info_dict[target.value]
|
293
293
|
reduced_frames["reduce_frames_name"] = (
|
294
|
-
f"{target} from {url.data_path()}@{os.path.basename(url.file_path())}"
|
294
|
+
f"{target.value} from {url.data_path()}@{os.path.basename(url.file_path())}"
|
295
295
|
)
|
296
296
|
result.append(reduced_frames)
|
297
297
|
|
@@ -6,7 +6,7 @@ from typing import Iterable
|
|
6
6
|
|
7
7
|
from silx.gui import qt
|
8
8
|
from silx.gui.utils import blockSignals
|
9
|
-
from
|
9
|
+
from enum import Enum as _Enum
|
10
10
|
from tomoscan.series import Series
|
11
11
|
|
12
12
|
from tomwer.core.scan.scanbase import TomwerScanBase
|
@@ -144,8 +144,8 @@ class SeriesDefinition(qt.QWidget):
|
|
144
144
|
self.layout().addWidget(self._modeLabel, 0, 0, 1, 1)
|
145
145
|
|
146
146
|
self._modeCB = qt.QComboBox(self)
|
147
|
-
for mode in _SeriesDefinitionMode
|
148
|
-
self._modeCB.addItem(mode)
|
147
|
+
for mode in _SeriesDefinitionMode:
|
148
|
+
self._modeCB.addItem(mode.value)
|
149
149
|
self.layout().addWidget(self._modeCB, 0, 1, 1, 1)
|
150
150
|
|
151
151
|
self._manualDefWidget = SeriesManualFromTomoObj(parent=self)
|
@@ -169,10 +169,10 @@ class SeriesDefinition(qt.QWidget):
|
|
169
169
|
raise ValueError(f"mode {self.getMode()} is not handled yet")
|
170
170
|
|
171
171
|
def getMode(self) -> str:
|
172
|
-
return _SeriesDefinitionMode
|
172
|
+
return _SeriesDefinitionMode(self._modeCB.currentText())
|
173
173
|
|
174
174
|
def setMode(self, mode: str):
|
175
|
-
mode = _SeriesDefinitionMode
|
175
|
+
mode = _SeriesDefinitionMode(mode)
|
176
176
|
idx = self._modeCB.findText(mode.value)
|
177
177
|
self._modeCB.setCurrentIndex(idx)
|
178
178
|
|
tomwer/gui/dataportal/gallery.py
CHANGED
@@ -29,7 +29,7 @@ class GalleryWidget(qt.QWidget):
|
|
29
29
|
self.layout().addRow("precision", self._precisionQCB)
|
30
30
|
# binning
|
31
31
|
self._binningQCB = qt.QComboBox(self)
|
32
|
-
self._binningQCB.addItems(Binning
|
32
|
+
self._binningQCB.addItems([item.value for item in Binning])
|
33
33
|
self.layout().addRow("binning", self._binningQCB)
|
34
34
|
self._binningQCB.setCurrentText(Binning.SIXTEEN_BY_SIXTEEN.value)
|
35
35
|
self._binningQCB.setToolTip(
|
@@ -37,7 +37,7 @@ class GalleryWidget(qt.QWidget):
|
|
37
37
|
) # recommended size: 5ko for the entire gallery
|
38
38
|
# output format
|
39
39
|
self._outputFormat = qt.QComboBox(self)
|
40
|
-
self._outputFormat.addItems(OutputFormat
|
40
|
+
self._outputFormat.addItems([item.value for item in OutputFormat])
|
41
41
|
self.layout().addRow("output format", self._outputFormat)
|
42
42
|
# overwrite
|
43
43
|
self._overwriteCB = qt.QCheckBox("overwrite", self)
|
@@ -49,17 +49,17 @@ class GalleryWidget(qt.QWidget):
|
|
49
49
|
self._binningQCB.currentIndexChanged.connect(self._configChanged)
|
50
50
|
|
51
51
|
def getOutputFormat(self) -> OutputFormat:
|
52
|
-
return OutputFormat
|
52
|
+
return OutputFormat(self._outputFormat.currentText())
|
53
53
|
|
54
54
|
def setOutputFormat(self, format: OutputFormat):
|
55
|
-
format = OutputFormat
|
55
|
+
format = OutputFormat(format)
|
56
56
|
self._outputFormat.setCurrentText(format.value)
|
57
57
|
|
58
58
|
def getBinning(self) -> Binning:
|
59
|
-
return Binning
|
59
|
+
return Binning(self._binningQCB.currentText())
|
60
60
|
|
61
61
|
def setBinning(self, binning: Binning):
|
62
|
-
binning = Binning
|
62
|
+
binning = Binning(binning)
|
63
63
|
self._binningQCB.setCurrentText(binning.value)
|
64
64
|
|
65
65
|
def overwrite(self) -> bool:
|
@@ -112,9 +112,7 @@ class ImageKeyWindow(qt.QMainWindow):
|
|
112
112
|
def setModifications(self, modifications):
|
113
113
|
self._mainWindow.clearModifcations()
|
114
114
|
image_keys_set = set(modifications.values())
|
115
|
-
image_keys_set = set(
|
116
|
-
[_ImageKey.from_value(image_key) for image_key in image_keys_set]
|
117
|
-
)
|
115
|
+
image_keys_set = set([_ImageKey(image_key) for image_key in image_keys_set])
|
118
116
|
for image_key_type in image_keys_set:
|
119
117
|
self._mainWindow.applyModifications(
|
120
118
|
modifications=modifications, new_image_key=image_key_type
|
@@ -432,7 +430,7 @@ class _ImageKeyList(qt.QTableWidget):
|
|
432
430
|
self.setItem(i_frame, 0, _item)
|
433
431
|
|
434
432
|
# current image key
|
435
|
-
current_image_key = _ImageKey
|
433
|
+
current_image_key = _ImageKey(frame.image_key)
|
436
434
|
current_image_key = self._IMAGE_KEYS_INV[current_image_key]
|
437
435
|
currentImgKeyItem = qt.QLabel(current_image_key, self)
|
438
436
|
self.setCellWidget(i_frame, 1, currentImgKeyItem)
|
@@ -442,7 +440,7 @@ class _ImageKeyList(qt.QTableWidget):
|
|
442
440
|
new_image_key = frames_new_keys[frame.index]
|
443
441
|
else:
|
444
442
|
new_image_key = frame.image_key
|
445
|
-
new_image_key = _ImageKey
|
443
|
+
new_image_key = _ImageKey(new_image_key)
|
446
444
|
new_image_key = self._IMAGE_KEYS_INV[new_image_key]
|
447
445
|
newImgKeyItem = _ImageKeyComboBox(parent=self, image_key=new_image_key)
|
448
446
|
self._imageKeyComboboxes[index] = newImgKeyItem
|
@@ -694,16 +692,16 @@ class ImageKeyUpgraderList(qt.QTableWidget):
|
|
694
692
|
self.setCellWidget(i_operation, 1, remove_button)
|
695
693
|
|
696
694
|
def addOperation(self, from_image_key: _ImageKey, to_image_key: _ImageKey):
|
697
|
-
from_image_key = _ImageKey
|
698
|
-
to_image_key = _ImageKey
|
695
|
+
from_image_key = _ImageKey(from_image_key)
|
696
|
+
to_image_key = _ImageKey(to_image_key)
|
699
697
|
|
700
698
|
self._operations[from_image_key] = to_image_key
|
701
699
|
self._update()
|
702
700
|
self.sigOperationsChanged.emit()
|
703
701
|
|
704
702
|
def removeOperation(self, from_image_key: _ImageKey, to_image_key: _ImageKey):
|
705
|
-
from_image_key = _ImageKey
|
706
|
-
to_image_key = _ImageKey
|
703
|
+
from_image_key = _ImageKey(from_image_key)
|
704
|
+
to_image_key = _ImageKey(to_image_key)
|
707
705
|
if (
|
708
706
|
from_image_key not in self._operations
|
709
707
|
or self._operations[from_image_key] != to_image_key
|