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
@@ -131,21 +131,29 @@ class _NabuPreProcessingConfig(_NabuStageConfigBase, qt.QWidget):
|
|
131
131
|
self.registerWidget(self._ccdThreshold, "optional"),
|
132
132
|
]
|
133
133
|
|
134
|
+
# sr current normalization
|
135
|
+
self._normalizeCurrent = qt.QCheckBox("normalize with current", self)
|
136
|
+
self._normalizeCurrent.setToolTip(
|
137
|
+
"Whether to normalize frames with Synchrotron Current. This can correct the effect of a beam refill not taken into account by flats."
|
138
|
+
)
|
139
|
+
self.layout().addWidget(self._normalizeCurrent, 6, 0, 1, 2)
|
140
|
+
self.registerWidget(self._normalizeCurrent, "required")
|
141
|
+
|
134
142
|
# take logarithm
|
135
143
|
self._takeLogarithmCB = qt.QCheckBox("take logarithm", self)
|
136
|
-
self.layout().addWidget(self._takeLogarithmCB,
|
137
|
-
self.registerWidget(self._takeLogarithmCB, "
|
144
|
+
self.layout().addWidget(self._takeLogarithmCB, 7, 0, 1, 2)
|
145
|
+
self.registerWidget(self._takeLogarithmCB, "advanced")
|
138
146
|
|
139
147
|
# log min clip value
|
140
148
|
self._clipMinLogValueLabel = qt.QLabel("log min clip value:", self)
|
141
149
|
self._clipMinLogValueLabel.setAlignment(qt.Qt.AlignRight)
|
142
|
-
self.layout().addWidget(self._clipMinLogValueLabel,
|
150
|
+
self.layout().addWidget(self._clipMinLogValueLabel, 8, 2, 1, 1)
|
143
151
|
self._clipMinLogValue = QDoubleSpinBox(self, scrollArea=scrollArea)
|
144
152
|
self._clipMinLogValue.setMinimum(0.0)
|
145
153
|
self._clipMinLogValue.setMaximum(9999999)
|
146
154
|
self._clipMinLogValue.setSingleStep(0.01)
|
147
155
|
self._clipMinLogValue.setDecimals(6)
|
148
|
-
self.layout().addWidget(self._clipMinLogValue,
|
156
|
+
self.layout().addWidget(self._clipMinLogValue, 8, 3, 1, 1)
|
149
157
|
self._takeLogOpt = [
|
150
158
|
self.registerWidget(self._clipMinLogValueLabel, "optional"),
|
151
159
|
self.registerWidget(self._clipMinLogValue, "optional"),
|
@@ -154,13 +162,13 @@ class _NabuPreProcessingConfig(_NabuStageConfigBase, qt.QWidget):
|
|
154
162
|
# log max clip value
|
155
163
|
self._clipMaxLogValueLabel = qt.QLabel("log max clip value:", self)
|
156
164
|
self._clipMaxLogValueLabel.setAlignment(qt.Qt.AlignRight)
|
157
|
-
self.layout().addWidget(self._clipMaxLogValueLabel,
|
165
|
+
self.layout().addWidget(self._clipMaxLogValueLabel, 9, 2, 1, 1)
|
158
166
|
self._clipMaxLogValue = QDoubleSpinBox(self, scrollArea=scrollArea)
|
159
167
|
self._clipMaxLogValue.setMinimum(0.0)
|
160
168
|
self._clipMaxLogValue.setMaximum(9999999)
|
161
169
|
self._clipMaxLogValue.setSingleStep(0.01)
|
162
170
|
self._clipMaxLogValue.setDecimals(6)
|
163
|
-
self.layout().addWidget(self._clipMaxLogValue,
|
171
|
+
self.layout().addWidget(self._clipMaxLogValue, 9, 3, 1, 1)
|
164
172
|
self._takeLogOpt.extend(
|
165
173
|
[
|
166
174
|
self.registerWidget(self._clipMaxLogValueLabel, "optional"),
|
@@ -171,7 +179,7 @@ class _NabuPreProcessingConfig(_NabuStageConfigBase, qt.QWidget):
|
|
171
179
|
# tilt correction
|
172
180
|
self._tiltCorrection = TiltCorrection("tilt correction", self)
|
173
181
|
self.registerWidget(self._tiltCorrection, "advanced")
|
174
|
-
self.layout().addWidget(self._tiltCorrection,
|
182
|
+
self.layout().addWidget(self._tiltCorrection, 10, 0, 1, 4)
|
175
183
|
|
176
184
|
# spacer for style
|
177
185
|
spacer = qt.QWidget(self)
|
@@ -183,6 +191,7 @@ class _NabuPreProcessingConfig(_NabuStageConfigBase, qt.QWidget):
|
|
183
191
|
self.setDFFOptVisible(False)
|
184
192
|
|
185
193
|
self._ccdFilterCB.setChecked(False)
|
194
|
+
self._normalizeCurrent.setChecked(False)
|
186
195
|
self._ccdThreshold.setValue(0.04)
|
187
196
|
|
188
197
|
self._clipMinLogValue.setValue(1e-6)
|
@@ -201,6 +210,7 @@ class _NabuPreProcessingConfig(_NabuStageConfigBase, qt.QWidget):
|
|
201
210
|
self._dffCB.toggled.connect(self.setDFFOptVisible)
|
202
211
|
self._dffSigmaQDSB.valueChanged.connect(self._dffSigmaChanged)
|
203
212
|
self._ccdFilterCB.toggled.connect(self._ccdFilterChanged)
|
213
|
+
self._normalizeCurrent.toggled.connect(self._normalizeCurrentChanged)
|
204
214
|
self._ccdThreshold.editingFinished.connect(self._ccdFilterThresholdChanged)
|
205
215
|
self._clipMinLogValue.editingFinished.connect(self._logMinClipChanged)
|
206
216
|
self._clipMaxLogValue.editingFinished.connect(self._logMaxClipChanged)
|
@@ -226,6 +236,9 @@ class _NabuPreProcessingConfig(_NabuStageConfigBase, qt.QWidget):
|
|
226
236
|
def _ccdFilterChanged(self, *args, **kwargs):
|
227
237
|
self._signalConfChanged("ccd_filter_enabled")
|
228
238
|
|
239
|
+
def _normalizeCurrentChanged(self, *args, **kwargs):
|
240
|
+
self._signalConfChanged("normalize_srcurrent")
|
241
|
+
|
229
242
|
def _ccdFilterThresholdChanged(self, *args, **kwargs):
|
230
243
|
self._signalConfChanged("ccd_filter_threshold")
|
231
244
|
|
@@ -284,6 +297,12 @@ class _NabuPreProcessingConfig(_NabuStageConfigBase, qt.QWidget):
|
|
284
297
|
def getCCDThreshold(self) -> float:
|
285
298
|
return float(self._ccdThreshold.text())
|
286
299
|
|
300
|
+
def getNormalizeCurrent(self) -> bool:
|
301
|
+
return self._normalizeCurrent.isChecked()
|
302
|
+
|
303
|
+
def setNormalizeCurrent(self, normalize: bool) -> None:
|
304
|
+
self._normalizeCurrent.setChecked(normalize)
|
305
|
+
|
287
306
|
def getLogMinClipValue(self) -> float:
|
288
307
|
return float(self._clipMinLogValue.text())
|
289
308
|
|
@@ -329,6 +348,7 @@ class _NabuPreProcessingConfig(_NabuStageConfigBase, qt.QWidget):
|
|
329
348
|
"sino_rings_options": self.getSinoRingcorrectionOptions(),
|
330
349
|
"tilt_correction": tilt_correction,
|
331
350
|
"autotilt_options": autotilt_opts,
|
351
|
+
"normalize_srcurrent": int(self.getNormalizeCurrent()),
|
332
352
|
}
|
333
353
|
|
334
354
|
@docstring(_NabuStageConfigBase)
|
@@ -359,6 +379,9 @@ class _NabuPreProcessingConfig(_NabuStageConfigBase, qt.QWidget):
|
|
359
379
|
ccd_filter_threshold = conf["ccd_filter_threshold"]
|
360
380
|
if ccd_filter_threshold not in (None, "", "none"):
|
361
381
|
self._ccdThreshold.setValue(float(ccd_filter_threshold))
|
382
|
+
normalize_srcurrent = conf.get("normalize_srcurrent", None)
|
383
|
+
if normalize_srcurrent is not None:
|
384
|
+
self.setNormalizeCurrent(bool(normalize_srcurrent))
|
362
385
|
if "take_logarithm" in conf:
|
363
386
|
take_logarithm = conf["take_logarithm"]
|
364
387
|
if take_logarithm not in (None, "", "none"):
|
@@ -194,7 +194,7 @@ class TranslationMvtFileWidget(qt.QWidget):
|
|
194
194
|
else:
|
195
195
|
return dialog.selectedUrl()
|
196
196
|
|
197
|
-
def _selectTextFile(self):
|
197
|
+
def _selectTextFile(self): # pragma: no cover
|
198
198
|
dialog = qt.QFileDialog(self)
|
199
199
|
dialog.setFileMode(qt.QFileDialog.ExistingFile)
|
200
200
|
|
@@ -256,7 +256,7 @@ class AnglesFileWidget(qt.QWidget):
|
|
256
256
|
def setFile(self, file_path):
|
257
257
|
self._qle.setText(file_path)
|
258
258
|
|
259
|
-
def _selectFile(self) -> str:
|
259
|
+
def _selectFile(self) -> str: # pragma: no cover
|
260
260
|
dialog = qt.QFileDialog()
|
261
261
|
dialog.setFileMode(qt.QFileDialog.ExistingFile)
|
262
262
|
dialog.setNameFilters(
|
@@ -401,6 +401,13 @@ class _NabuReconstructionConfig(qt.QWidget, _NabuStageConfigBase):
|
|
401
401
|
"Whether to set to zero voxels falling outside of the reconstruction region"
|
402
402
|
)
|
403
403
|
self.layout().addWidget(self._clipOuterCircleCB, 11, 0, 1, 2)
|
404
|
+
self.registerWidget(self._clipOuterCircleCB, "optional")
|
405
|
+
|
406
|
+
# centered axis option
|
407
|
+
self._centeredAxisCB = qt.QCheckBox("centered axis", self)
|
408
|
+
self._centeredAxisCB.setToolTip("")
|
409
|
+
self.layout().addWidget(self._centeredAxisCB, 12, 0, 1, 2)
|
410
|
+
self.registerWidget(self._centeredAxisCB, "optional")
|
404
411
|
|
405
412
|
# translation movement file
|
406
413
|
self._transMvtFileLabel = qt.QLabel("translation movement file", self)
|
@@ -437,6 +444,7 @@ class _NabuReconstructionConfig(qt.QWidget, _NabuStageConfigBase):
|
|
437
444
|
self._preconditioningFilter.setChecked(True)
|
438
445
|
self._positivityConstraintCB.setChecked(True)
|
439
446
|
self._clipOuterCircleCB.setChecked(False)
|
447
|
+
self._centeredAxisCB.setChecked(False)
|
440
448
|
|
441
449
|
# connect signal / slot
|
442
450
|
self._methodQCB.currentIndexChanged.connect(self._methodChanged)
|
@@ -454,6 +462,7 @@ class _NabuReconstructionConfig(qt.QWidget, _NabuStageConfigBase):
|
|
454
462
|
self._binSubSamplingGB.binningChanged.connect(self._binningChanged)
|
455
463
|
self._anglesFileWidget._qle.textChanged.connect(self._anglesFilechanged)
|
456
464
|
self._clipOuterCircleCB.toggled.connect(self._clipOuterCircleChanged)
|
465
|
+
self._centeredAxisCB.toggled.connect(self._centeredAxisChanged)
|
457
466
|
|
458
467
|
def getSlices(self):
|
459
468
|
return self._slicesWidget.getSlices()
|
@@ -501,6 +510,9 @@ class _NabuReconstructionConfig(qt.QWidget, _NabuStageConfigBase):
|
|
501
510
|
def _clipOuterCircleChanged(self, *args, **kwargs):
|
502
511
|
self._signalConfChanged("clip_outer_circle")
|
503
512
|
|
513
|
+
def _centeredAxisChanged(self, *args, **kwargs):
|
514
|
+
self._signalConfChanged("centered_axis")
|
515
|
+
|
504
516
|
def _binningChanged(self, *args, **kwargs):
|
505
517
|
self._signalConfChanged("binning")
|
506
518
|
self._signalConfChanged("binning_z")
|
@@ -590,7 +602,7 @@ class _NabuReconstructionConfig(qt.QWidget, _NabuStageConfigBase):
|
|
590
602
|
return self._binSubSamplingGB.getVerticalBinning()
|
591
603
|
|
592
604
|
def setVerticalBinning(self, binning):
|
593
|
-
return self._binSubSamplingGB.
|
605
|
+
return self._binSubSamplingGB.setVerticalBinning(binning=binning)
|
594
606
|
|
595
607
|
def getProjSubsampling(self):
|
596
608
|
return self._binSubSamplingGB.getProjSubsampling()
|
@@ -607,8 +619,14 @@ class _NabuReconstructionConfig(qt.QWidget, _NabuStageConfigBase):
|
|
607
619
|
def getClipOuterCircle(self) -> bool:
|
608
620
|
return self._clipOuterCircleCB.isChecked()
|
609
621
|
|
610
|
-
def setClipOuterCircle(self, checked) ->
|
611
|
-
|
622
|
+
def setClipOuterCircle(self, checked: bool) -> None:
|
623
|
+
self._clipOuterCircleCB.setChecked(checked)
|
624
|
+
|
625
|
+
def getCenteredAxis(self) -> bool:
|
626
|
+
return self._centeredAxisCB.isChecked()
|
627
|
+
|
628
|
+
def setCenteredAxis(self, checked: bool):
|
629
|
+
self._centeredAxisCB.setChecked(checked)
|
612
630
|
|
613
631
|
@docstring(_NabuStageConfigBase)
|
614
632
|
def getConfiguration(self) -> dict:
|
@@ -632,6 +650,7 @@ class _NabuReconstructionConfig(qt.QWidget, _NabuStageConfigBase):
|
|
632
650
|
"rotation_axis_position": "",
|
633
651
|
"translation_movements_file": self.getTranslationMvtFile() or "",
|
634
652
|
"clip_outer_circle": int(self.getClipOuterCircle()),
|
653
|
+
"centered_axis": int(self.getCenteredAxis()),
|
635
654
|
}
|
636
655
|
config.update(self._subRegionSelector.getConfiguration())
|
637
656
|
return config
|
@@ -668,6 +687,8 @@ class _NabuReconstructionConfig(qt.QWidget, _NabuStageConfigBase):
|
|
668
687
|
self.setTranslationMvtFile(config["translation_movements_file"])
|
669
688
|
if "clip_outer_circle" in config:
|
670
689
|
self.setClipOuterCircle(bool(config["clip_outer_circle"]))
|
690
|
+
if "centered_axis" in config:
|
691
|
+
self.setCenteredAxis(bool(config["centered_axis"]))
|
671
692
|
self._subRegionSelector.setConfiguration(config=config)
|
672
693
|
|
673
694
|
def _signalConfChanged(self, param):
|
@@ -958,11 +979,3 @@ class _BinSubSampling(qt.QGroupBox):
|
|
958
979
|
|
959
980
|
def _valueUpdated(self, *args, **kwargs):
|
960
981
|
self.binningChanged.emit()
|
961
|
-
|
962
|
-
|
963
|
-
if __name__ == "__main__":
|
964
|
-
app = qt.QApplication([])
|
965
|
-
widget = _NabuReconstructionConfig(None, None)
|
966
|
-
widget.show()
|
967
|
-
print(widget.getConfiguration())
|
968
|
-
app.exec_()
|
@@ -361,9 +361,17 @@ class NabuWindow(qt.QMainWindow):
|
|
361
361
|
config = parse_nabu_config_file(inputFile)
|
362
362
|
self.setConfiguration(config)
|
363
363
|
|
364
|
-
def askForNabuconfigFile(
|
364
|
+
def askForNabuconfigFile( # pragma: no cover
|
365
|
+
self, acceptMode=qt.QFileDialog.AcceptSave
|
366
|
+
):
|
365
367
|
dialog = qt.QFileDialog(self)
|
366
|
-
dialog.setNameFilters(
|
368
|
+
dialog.setNameFilters(
|
369
|
+
[
|
370
|
+
"Configuration files (*.cfg *.conf *.config)",
|
371
|
+
"Any files (*)",
|
372
|
+
]
|
373
|
+
)
|
374
|
+
|
367
375
|
dialog.setAcceptMode(acceptMode)
|
368
376
|
dialog.setFileMode(qt.QFileDialog.AnyFile)
|
369
377
|
|
@@ -117,7 +117,7 @@ class SlurmSettingsWidget(qt.QWidget):
|
|
117
117
|
self._nCores.setValue(SlurmSettings.N_CORES_PER_TASK)
|
118
118
|
self._nWorkers.setValue(SlurmSettings.N_TASKS)
|
119
119
|
self._memory.setValue(SlurmSettings.MEMORY_PER_WORKER)
|
120
|
-
self._queue.setText(SlurmSettings.
|
120
|
+
self._queue.setText(SlurmSettings.PARTITION)
|
121
121
|
self._nGpu.setValue(SlurmSettings.N_GPUS_PER_WORKER)
|
122
122
|
|
123
123
|
# connect signal / slot
|
@@ -435,13 +435,6 @@ class NabuVolumeWindow(qt.QMainWindow):
|
|
435
435
|
menu.addAction(self._expertConfiguration)
|
436
436
|
self.__configurationModesGroup.addAction(self._expertConfiguration)
|
437
437
|
|
438
|
-
# expose API
|
439
|
-
self.getConfiguration = self._mainWidget.getConfiguration
|
440
|
-
self.setConfiguration = self._mainWidget.setConfiguration
|
441
|
-
self.setConfigurationLevel = self._mainWidget.setConfigurationLevel
|
442
|
-
self.getConfigurationLevel = self._mainWidget.getConfigurationLevel
|
443
|
-
self.setScan = self._mainWidget.setScan
|
444
|
-
|
445
438
|
# set up
|
446
439
|
self._basicConfigAction.setChecked(True)
|
447
440
|
self._userModeChanged(action=self._basicConfigAction)
|
@@ -463,5 +456,18 @@ class NabuVolumeWindow(qt.QMainWindow):
|
|
463
456
|
raise ValueError("unknow configuration level")
|
464
457
|
self._mainWidget.setConfigurationLevel(level)
|
465
458
|
|
459
|
+
# expose API
|
466
460
|
def getConfigurationLevel(self):
|
467
461
|
self._mainWidget.getConfigurationLevel()
|
462
|
+
|
463
|
+
def setConfigurationLevel(self, level):
|
464
|
+
self._mainWidget.setConfigurationLevel(level=level)
|
465
|
+
|
466
|
+
def getConfiguration(self):
|
467
|
+
return self._mainWidget.getConfiguration()
|
468
|
+
|
469
|
+
def setConfiguration(self, config):
|
470
|
+
return self._mainWidget.setConfiguration(config=config)
|
471
|
+
|
472
|
+
def setScan(self, scan):
|
473
|
+
return self._mainWidget.setScan(scan=scan)
|
@@ -866,7 +866,7 @@ class _NormIntensityDatasetWidget(qt.QWidget):
|
|
866
866
|
if self._lastGlobalPath is not None:
|
867
867
|
self.setGlobalFilePath(self._lastGlobalPath)
|
868
868
|
|
869
|
-
def _selectFile(self):
|
869
|
+
def _selectFile(self): # pragma: no cover
|
870
870
|
dialog = qt.QFileDialog(self)
|
871
871
|
dialog.setNameFilters(["HDF5 file *.h5 *.hdf5 *.nx *.nxs *.nexus"])
|
872
872
|
|
@@ -150,9 +150,13 @@ class SinogramViewer(_SinogramViewer):
|
|
150
150
|
if self._corMarker is not None:
|
151
151
|
self._corMarker.sigDragFinished.disconnect(self._middleMarkerMoved)
|
152
152
|
if self._fromMarker is not None:
|
153
|
-
self._fromMarker.sigDragFinished.disconnect(
|
153
|
+
self._fromMarker.sigDragFinished.disconnect(
|
154
|
+
self._fromCallback # pylint: disable=E0203
|
155
|
+
)
|
154
156
|
if self._toMarker is not None:
|
155
|
-
self._toMarker.sigDragFinished.disconnect(
|
157
|
+
self._toMarker.sigDragFinished.disconnect(
|
158
|
+
self._toCallback # pylint: disable=E0203
|
159
|
+
)
|
156
160
|
|
157
161
|
# clear existing markers
|
158
162
|
markers = [
|
@@ -212,7 +216,7 @@ class _ReconstructionModeGB(qt.QGroupBox):
|
|
212
216
|
|
213
217
|
_DEFAULT_VERTICAL_SLICE_MODE = ("middle", "other")
|
214
218
|
|
215
|
-
def __init__(self, parent=None, title="Slice
|
219
|
+
def __init__(self, parent=None, title="Slice to be reconstructed"):
|
216
220
|
self.__scan = None
|
217
221
|
qt.QGroupBox.__init__(self, parent)
|
218
222
|
self.setTitle(title)
|
@@ -262,9 +266,9 @@ class _ReconstructionModeGB(qt.QGroupBox):
|
|
262
266
|
self.blockSignals(True)
|
263
267
|
self.setCurrentMode("vertical", "middle")
|
264
268
|
self.blockSignals(False)
|
265
|
-
# for now we don't have the tilt correction mode
|
266
|
-
# self._sliceTiltCorrQSB.hide()
|
267
269
|
self._tiltCorrectionRB.hide()
|
270
|
+
# as for now only the Vertical mode is handled hide it to avoid confusing user
|
271
|
+
self._verticalRB.hide()
|
268
272
|
|
269
273
|
def setCurrentMode(self, mode, slices):
|
270
274
|
valid_modes = ("vertical", "horizontal")
|
@@ -309,7 +313,7 @@ class _ReconstructionModeGB(qt.QGroupBox):
|
|
309
313
|
index_radio = list(projections.keys())[len(projections) // 2]
|
310
314
|
data = get_data(projections[index_radio])
|
311
315
|
except Exception as e:
|
312
|
-
_logger.error("Fail to load radio data:
|
316
|
+
_logger.error(f"Fail to load radio data: {str(e)}")
|
313
317
|
return
|
314
318
|
|
315
319
|
lineSelection.setData(data)
|
@@ -823,31 +827,3 @@ class SliceAndCorWidget(qt.QMainWindow):
|
|
823
827
|
self._sinogramViewer.close()
|
824
828
|
self._sinogramViewer = None
|
825
829
|
super().close()
|
826
|
-
|
827
|
-
|
828
|
-
if __name__ == "__main__":
|
829
|
-
import tempfile
|
830
|
-
import shutil
|
831
|
-
from tomwer.core.utils.scanutils import MockHDF5
|
832
|
-
|
833
|
-
app = qt.QApplication([])
|
834
|
-
window = SliceAndCorWidget()
|
835
|
-
|
836
|
-
img_width = 216
|
837
|
-
slices_folder = tempfile.mkdtemp()
|
838
|
-
|
839
|
-
scan = MockHDF5(
|
840
|
-
scan_path=slices_folder,
|
841
|
-
n_proj=60,
|
842
|
-
n_ini_proj=60,
|
843
|
-
create_ini_dark=False,
|
844
|
-
create_ini_ref=False,
|
845
|
-
dim=img_width,
|
846
|
-
).scan
|
847
|
-
|
848
|
-
window.setScan(scan)
|
849
|
-
window.setWindowTitle("cor and slice selection")
|
850
|
-
window.show()
|
851
|
-
app.exec_()
|
852
|
-
|
853
|
-
shutil.rmtree(slices_folder)
|
@@ -48,6 +48,7 @@ from tomwer.gui.utils.buttons import TabBrowsersButtons
|
|
48
48
|
from tomwer.gui.reconstruction.scores.control import ControlWidget
|
49
49
|
from tomwer.core.process.reconstruction.saaxis.saaxis import SAAxisProcess
|
50
50
|
from tomwer.core.process.reconstruction.axis import mode as axis_mode
|
51
|
+
from tomwer.gui.utils.scandescription import ScanNameLabelAndShape
|
51
52
|
import numpy
|
52
53
|
from typing import Union
|
53
54
|
import logging
|
@@ -182,7 +183,6 @@ class _SAAxisTabWidget(qt.QTabWidget):
|
|
182
183
|
self.setVolumeSize = self._resultsViewer.setVolumeSize
|
183
184
|
self.setCurrentCorValue = self._resultsViewer.setCurrentVarValue
|
184
185
|
self.getCurrentCorValue = self._resultsViewer.getCurrentVarValue
|
185
|
-
self.getScoreMethod = self._resultsViewer.getScoreMethod
|
186
186
|
self.getEstimatedCorPosition = self._sliceAndCorWidget.getEstimatedCorPosition
|
187
187
|
self.setEstimatedCorPosition = self._sliceAndCorWidget.setEstimatedCorPosition
|
188
188
|
self.getNReconstruction = self._sliceAndCorWidget.getNReconstruction
|
@@ -200,6 +200,7 @@ class _SAAxisTabWidget(qt.QTabWidget):
|
|
200
200
|
self.getSlicesRange = self._sliceAndCorWidget.getSlicesRange
|
201
201
|
self.setSlicesRange = self._sliceAndCorWidget.setSlicesRange
|
202
202
|
self.loadSinogram = self._sliceAndCorWidget.loadSinogram
|
203
|
+
self.saveReconstructedSlicesTo = self._resultsViewer.saveReconstructedSlicesTo
|
203
204
|
# expose signals
|
204
205
|
self.sigStartSinogramLoad = self._sliceAndCorWidget.sigStartSinogramLoad
|
205
206
|
self.sigEndSinogramLoad = self._sliceAndCorWidget.sigEndSinogramLoad
|
@@ -318,8 +319,14 @@ class SAAxisWindow(qt.QMainWindow):
|
|
318
319
|
self._qaxis_rp = QAxisRP()
|
319
320
|
self.setWindowFlags(qt.Qt.Widget)
|
320
321
|
# central widget
|
322
|
+
self._mainWidget = qt.QWidget(self)
|
323
|
+
self._mainWidget.setLayout(qt.QVBoxLayout())
|
324
|
+
|
325
|
+
self._scanInfo = ScanNameLabelAndShape(self)
|
326
|
+
self._mainWidget.layout().addWidget(self._scanInfo)
|
321
327
|
self._tabWidget = _SAAxisTabWidget(self)
|
322
|
-
self.
|
328
|
+
self._mainWidget.layout().addWidget(self._tabWidget)
|
329
|
+
self.setCentralWidget(self._mainWidget)
|
323
330
|
# next and previous buttons for browsing the tab widget
|
324
331
|
self._browserButtons = TabBrowsersButtons(self)
|
325
332
|
self._dockWidgetBrwButtons = qt.QDockWidget(self)
|
@@ -355,7 +362,7 @@ class SAAxisWindow(qt.QMainWindow):
|
|
355
362
|
self.getCors = self._tabWidget.getCors
|
356
363
|
self.getMode = self._tabWidget.getReconstructionMode
|
357
364
|
self.loadSinogram = self._tabWidget.loadSinogram
|
358
|
-
self.
|
365
|
+
self.saveReconstructedSlicesTo = self._tabWidget.saveReconstructedSlicesTo
|
359
366
|
# expose signals
|
360
367
|
self.sigValidated = self._saaxisControl.sigValidateRequest
|
361
368
|
self.sigStartSinogramLoad = self._tabWidget.sigStartSinogramLoad
|
@@ -408,6 +415,7 @@ class SAAxisWindow(qt.QMainWindow):
|
|
408
415
|
def setScan(self, scan):
|
409
416
|
self._scan = scan
|
410
417
|
self._tabWidget.setScan(scan)
|
418
|
+
self._scanInfo.setScan(scan)
|
411
419
|
self._updateSinogramLine()
|
412
420
|
self._loadEstimatedCorFromScan(scan)
|
413
421
|
|
@@ -450,9 +458,6 @@ class SAAxisWindow(qt.QMainWindow):
|
|
450
458
|
line = list(r_slice.values())[0]
|
451
459
|
self._tabWidget.getSinogramViewer().setLine(line)
|
452
460
|
|
453
|
-
def setEstimatedCorPosition(self, value):
|
454
|
-
self.setEstimatedCorPosition(value=value)
|
455
|
-
|
456
461
|
def _autoCorRequested(self):
|
457
462
|
window = self.getAutomaticCorWindow()
|
458
463
|
window.activateWindow()
|
@@ -63,14 +63,6 @@ class SliceSelector(qt.QWidget):
|
|
63
63
|
self._volumeView = _SliceSelectorFrmVolume(self, invert_y_axis=invert_y_axis)
|
64
64
|
self.layout().addWidget(self._volumeView)
|
65
65
|
|
66
|
-
# expose API
|
67
|
-
self.getSlicesValue = self._volumeView.getSlicesValue
|
68
|
-
self.getSlicesRange = self._volumeView.getSlicesRange
|
69
|
-
self.setSliceValue = self._volumeView.setSliceValue
|
70
|
-
|
71
|
-
def getSlicesRange(self) -> tuple:
|
72
|
-
return self._volumeView.getSlicesRange()
|
73
|
-
|
74
66
|
def setSlicesRange(self, min_index, max_index):
|
75
67
|
self._volumeView.setSlicesRange(min_index, max_index)
|
76
68
|
for widget in self._slicesQSB:
|
@@ -136,6 +128,16 @@ class SliceSelector(qt.QWidget):
|
|
136
128
|
position = self._volumeView.plotSpaceToValue(marker.getPosition()[1])
|
137
129
|
sb.setValue(position)
|
138
130
|
|
131
|
+
# expose API
|
132
|
+
def getSlicesValue(self) -> dict:
|
133
|
+
return self._volumeView.getSlicesValue()
|
134
|
+
|
135
|
+
def setSliceValue(self, name: str, value: float):
|
136
|
+
self._volumeView.setSliceValue(name=name, value=value)
|
137
|
+
|
138
|
+
def getSlicesRange(self) -> tuple:
|
139
|
+
return self._volumeView.getSlicesRange()
|
140
|
+
|
139
141
|
|
140
142
|
class _SliceSelectorFrmVolume(PlotWidget):
|
141
143
|
"""
|
@@ -252,7 +254,7 @@ class _SliceSelectorFrmVolume(PlotWidget):
|
|
252
254
|
)
|
253
255
|
if self._yAxisInverted:
|
254
256
|
res = self._slicesRange[1] - res
|
255
|
-
return res
|
257
|
+
return int(res)
|
256
258
|
|
257
259
|
def _updatePlane(self, y, curve_name, color):
|
258
260
|
anchor_shift = 0.2
|
@@ -334,20 +336,3 @@ class _SliceSelectorFrmVolume(PlotWidget):
|
|
334
336
|
marker = self._getMarker(self.getMarkerName(name))
|
335
337
|
marker.setPosition(0, self.valueToPlotSpace(float(value)))
|
336
338
|
marker.sigDragFinished.emit()
|
337
|
-
|
338
|
-
|
339
|
-
class _SliceSB(qt.QWidget):
|
340
|
-
def __init__(self, parent):
|
341
|
-
qt.QWidget.__init__(self, parent)
|
342
|
-
|
343
|
-
|
344
|
-
if __name__ == "__main__":
|
345
|
-
app = qt.QApplication([])
|
346
|
-
window = SliceSelector(insert=False)
|
347
|
-
window.setSlicesRange(0, 100)
|
348
|
-
window.addSlice(value=0, name="slice0", color="blue")
|
349
|
-
window.addSlice(value=25, name="slice1", color="green")
|
350
|
-
window.addSlice(value=70, name="slice2", color="cyan")
|
351
|
-
window.addSlice(value=100, name="slice3", color="red")
|
352
|
-
window.show()
|
353
|
-
app.exec_()
|
@@ -43,6 +43,7 @@ from tomwer.core.process.reconstruction.sadeltabeta.sadeltabeta import (
|
|
43
43
|
from tomwer.synctools.sadeltabeta import QSADeltaBetaParams
|
44
44
|
from tomwer.gui.utils.buttons import TabBrowsersButtons
|
45
45
|
from tomwer.gui.reconstruction.nabu.slices import NabuWindow
|
46
|
+
from tomwer.gui.utils.scandescription import ScanNameLabelAndShape
|
46
47
|
from tomwer.gui.reconstruction.scores.scoreplot import ScorePlot as _ScorePlot
|
47
48
|
from tomwer.gui.reconstruction.scores.scoreplot import DelaBetaSelection
|
48
49
|
from tomwer.core.process.reconstruction.nabu.utils import _NabuMode
|
@@ -120,6 +121,7 @@ class _SADeltaBetaTabWidget(qt.QTabWidget):
|
|
120
121
|
# expose function API
|
121
122
|
self.setNabuReconsParams = self._nabuSettings.setConfiguration
|
122
123
|
self.getNabuReconsParams = self._nabuSettings.getConfiguration
|
124
|
+
self.saveReconstructedSlicesTo = self._resultsViewer.saveReconstructedSlicesTo
|
123
125
|
|
124
126
|
def setDeltaBetaScores(self, *args, **kwargs):
|
125
127
|
self._resultsViewer.setVarScores(*args, **kwargs)
|
@@ -239,8 +241,13 @@ class SADeltaBetaWindow(qt.QMainWindow):
|
|
239
241
|
self._qdeltabeta_rp = QSADeltaBetaParams()
|
240
242
|
self.setWindowFlags(qt.Qt.Widget)
|
241
243
|
# central widget
|
244
|
+
self._mainWidget = qt.QWidget(self)
|
245
|
+
self._mainWidget.setLayout(qt.QVBoxLayout())
|
246
|
+
self._scanInfo = ScanNameLabelAndShape(self)
|
247
|
+
self._mainWidget.layout().addWidget(self._scanInfo)
|
242
248
|
self._tabWidget = _SADeltaBetaTabWidget(self)
|
243
|
-
self.
|
249
|
+
self._mainWidget.layout().addWidget(self._tabWidget)
|
250
|
+
self.setCentralWidget(self._mainWidget)
|
244
251
|
# next and previous buttons for browsing the tab widget
|
245
252
|
self._browserButtons = TabBrowsersButtons(self)
|
246
253
|
self._dockWidgetBrwButtons = qt.QDockWidget(self)
|
@@ -283,6 +290,7 @@ class SADeltaBetaWindow(qt.QMainWindow):
|
|
283
290
|
def setScan(self, scan):
|
284
291
|
self._scan = scan
|
285
292
|
self._tabWidget.setScan(scan)
|
293
|
+
self._scanInfo.setScan(scan)
|
286
294
|
|
287
295
|
def getScan(self):
|
288
296
|
return self._scan
|
@@ -358,6 +366,9 @@ class SADeltaBetaWindow(qt.QMainWindow):
|
|
358
366
|
def setSlicesRange(self, min_, max_):
|
359
367
|
self._tabWidget.setSliceRange(min_, max_)
|
360
368
|
|
369
|
+
def saveReconstructedSlicesTo(self, output_folder):
|
370
|
+
self._tabWidget.saveReconstructedSlicesTo(output_folder=output_folder)
|
371
|
+
|
361
372
|
|
362
373
|
class DeltaBetaSelectionWidget(qt.QWidget):
|
363
374
|
"""Widget used to select the range of delta / beta to use"""
|
@@ -396,6 +407,7 @@ class DeltaBetaSelectionWidget(qt.QWidget):
|
|
396
407
|
self._paganinGB.setLayout(qt.QVBoxLayout())
|
397
408
|
self._mainWindow = _NabuPhaseConfig(self, scrollArea=None)
|
398
409
|
self._mainWindow.setConfigurationLevel(ConfigurationLevel.ADVANCED)
|
410
|
+
self._mainWindow._ctfOpts.hide()
|
399
411
|
self._paganinGB.layout().addWidget(self._mainWindow)
|
400
412
|
self._mainWindow._methodCB.hide()
|
401
413
|
self._mainWindow._methodLabel.hide()
|
@@ -489,10 +501,3 @@ class DeltaBetaSelectionWidget(qt.QWidget):
|
|
489
501
|
from_=values.min(), to_=values.max(), step_=step
|
490
502
|
)
|
491
503
|
)
|
492
|
-
|
493
|
-
|
494
|
-
if __name__ == "__main__":
|
495
|
-
qapp = qt.QApplication([])
|
496
|
-
widget = SADeltaBetaWindow(parent=None)
|
497
|
-
widget.show()
|
498
|
-
qapp.exec_()
|