tomwer 1.2.1__py3-none-any.whl → 1.3.12__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/icat_publication.ows +58 -0
- orangecontrib/tomwer/widgets/__init__.py +11 -11
- orangecontrib/tomwer/widgets/control/DataDiscoveryOW.py +2 -2
- orangecontrib/tomwer/widgets/control/DataListOW.py +9 -7
- orangecontrib/tomwer/widgets/control/DataListenerOW.py +6 -6
- orangecontrib/tomwer/widgets/control/DataSelectorOW.py +21 -10
- orangecontrib/tomwer/widgets/control/DataValidatorOW.py +6 -6
- orangecontrib/tomwer/widgets/control/EDF2NXTomomillOW.py +24 -7
- orangecontrib/tomwer/widgets/control/EmailOW.py +4 -4
- orangecontrib/tomwer/widgets/control/NXTomomillMixIn.py +3 -3
- orangecontrib/tomwer/widgets/control/NXTomomillOW.py +64 -23
- orangecontrib/tomwer/widgets/control/NXtomoConcatenate.py +20 -8
- orangecontrib/tomwer/widgets/control/NotifierOW.py +1 -0
- orangecontrib/tomwer/widgets/control/SingleTomoObjOW.py +6 -6
- orangecontrib/tomwer/widgets/control/VolumeSelector.py +7 -4
- orangecontrib/tomwer/widgets/control/VolumeSymLinkOW.py +182 -182
- orangecontrib/tomwer/widgets/debugtools/DatasetGeneratorOW.py +5 -5
- orangecontrib/tomwer/widgets/edit/DarkFlatPatchOW.py +4 -4
- orangecontrib/tomwer/widgets/edit/ImageKeyEditorOW.py +3 -3
- orangecontrib/tomwer/widgets/edit/ImageKeyUpgraderOW.py +8 -1
- orangecontrib/tomwer/widgets/edit/NXtomoEditorOW.py +3 -3
- orangecontrib/tomwer/widgets/edit/test/test_nxtomo_editor.py +3 -3
- orangecontrib/tomwer/widgets/icat/PublishProcessedDataOW.py +115 -0
- orangecontrib/tomwer/widgets/icat/RawDataScreenshotCreatorOW.py +98 -0
- orangecontrib/tomwer/widgets/icat/SaveToGalleryAndPublishOW.py +129 -0
- orangecontrib/tomwer/widgets/icat/__init__.py +13 -0
- orangecontrib/tomwer/widgets/icat/icons/add_gallery.png +0 -0
- orangecontrib/tomwer/widgets/icat/icons/add_gallery.svg +82 -0
- orangecontrib/tomwer/widgets/icat/icons/publish_processed_data.png +0 -0
- orangecontrib/tomwer/widgets/icat/icons/publish_processed_data.svg +95 -0
- orangecontrib/tomwer/widgets/icat/icons/raw_screenshots.png +0 -0
- orangecontrib/tomwer/widgets/icat/icons/raw_screenshots.svg +143 -0
- orangecontrib/tomwer/widgets/icons/tomwer_data_portal.png +0 -0
- orangecontrib/tomwer/widgets/icons/tomwer_data_portal.svg +76 -0
- orangecontrib/tomwer/widgets/reconstruction/AxisOW.py +22 -20
- orangecontrib/tomwer/widgets/reconstruction/CastNabuVolumeOW.py +19 -3
- orangecontrib/tomwer/widgets/reconstruction/NabuHelicalPrepareWeightsDoubleOW.py +184 -169
- orangecontrib/tomwer/widgets/reconstruction/NabuOW.py +23 -0
- orangecontrib/tomwer/widgets/reconstruction/NabuVolumeOW.py +39 -5
- orangecontrib/tomwer/widgets/reconstruction/SAAxisOW.py +18 -22
- orangecontrib/tomwer/widgets/reconstruction/SADeltaBetaOW.py +18 -26
- orangecontrib/tomwer/widgets/reconstruction/SinoNormOW.py +15 -19
- orangecontrib/tomwer/widgets/visualization/DataViewerOW.py +9 -9
- orangecontrib/tomwer/widgets/visualization/DiffViewerOW.py +1 -1
- orangecontrib/tomwer/widgets/visualization/LivesliceOW.py +1 -1
- orangecontrib/tomwer/widgets/visualization/NXtomoMetadataViewerOW.py +3 -3
- orangecontrib/tomwer/widgets/visualization/SinogramViewerOW.py +0 -1
- orangecontrib/tomwer/widgets/visualization/VolumeViewerOW.py +3 -29
- tomwer/__main__.py +7 -64
- tomwer/app/axis.py +3 -3
- tomwer/app/canvas.py +8 -0
- tomwer/app/canvas_launcher/config.py +16 -14
- tomwer/app/canvas_launcher/environ.py +1 -0
- tomwer/app/canvas_launcher/mainwindow.py +4 -1
- tomwer/app/darkref.py +1 -1
- tomwer/app/darkrefpatch.py +1 -1
- tomwer/app/diffframe.py +3 -3
- tomwer/app/imagekeyeditor.py +5 -5
- tomwer/app/imagekeyupgrader.py +5 -5
- tomwer/app/intensitynormalization.py +14 -13
- tomwer/app/{saaxis.py → multicor.py} +3 -3
- tomwer/app/{sadeltabeta.py → multipag.py} +3 -3
- tomwer/app/nabuapp.py +0 -11
- tomwer/app/radiostack.py +6 -4
- tomwer/app/samplemoved.py +3 -2
- tomwer/app/scanviewer.py +4 -2
- tomwer/app/sinogramviewer.py +3 -2
- tomwer/app/slicestack.py +3 -2
- tomwer/app/zstitching.py +88 -6
- tomwer/core/cluster/cluster.py +26 -0
- tomwer/core/log/logger.py +7 -5
- tomwer/core/process/conditions/filters.py +1 -1
- tomwer/core/process/control/datalistener/datalistener.py +19 -14
- tomwer/core/process/control/datawatcher/edfdwprocess.py +0 -9
- tomwer/core/process/control/nxtomoconcatenate.py +13 -13
- tomwer/core/process/control/nxtomomill.py +92 -34
- tomwer/core/process/control/scantransfer.py +20 -43
- tomwer/core/process/control/scanvalidator.py +3 -2
- tomwer/core/process/control/test/test_concatenate_nxtomos.py +9 -9
- tomwer/core/process/control/test/test_email.py +4 -4
- tomwer/core/process/control/test/test_h52nx_process.py +59 -7
- tomwer/core/process/control/test/test_volume_link.py +64 -64
- tomwer/core/process/control/timer.py +1 -1
- tomwer/core/process/control/volumesymlink.py +200 -200
- tomwer/core/process/edit/darkflatpatch.py +14 -15
- tomwer/core/process/edit/imagekeyeditor.py +41 -39
- tomwer/core/process/icat/__init__.py +0 -0
- tomwer/core/process/icat/createscreenshots.py +100 -0
- tomwer/core/process/icat/gallery.py +377 -0
- tomwer/core/process/icat/icatbase.py +36 -0
- tomwer/core/process/icat/publish.py +228 -0
- tomwer/core/process/icat/screenshots.py +27 -0
- tomwer/core/process/output.py +52 -0
- tomwer/core/process/reconstruction/axis/axis.py +280 -69
- tomwer/core/process/reconstruction/axis/mode.py +163 -48
- tomwer/core/process/reconstruction/axis/params.py +29 -21
- tomwer/core/process/reconstruction/darkref/darkrefs.py +41 -127
- tomwer/core/process/reconstruction/darkref/darkrefscopy.py +4 -3
- tomwer/core/process/reconstruction/darkref/params.py +1 -1
- tomwer/core/process/reconstruction/nabu/castvolume.py +4 -4
- tomwer/core/process/reconstruction/nabu/helical.py +9 -5
- tomwer/core/process/reconstruction/nabu/nabucommon.py +71 -78
- tomwer/core/process/reconstruction/nabu/nabuscores.py +425 -53
- tomwer/core/process/reconstruction/nabu/nabuslices.py +114 -93
- tomwer/core/process/reconstruction/nabu/nabuvolume.py +54 -27
- tomwer/core/process/reconstruction/nabu/plane.py +9 -0
- tomwer/core/process/reconstruction/nabu/settings.py +2 -2
- tomwer/core/process/reconstruction/nabu/utils.py +164 -26
- tomwer/core/process/reconstruction/output.py +108 -0
- tomwer/core/process/reconstruction/saaxis/saaxis.py +238 -264
- tomwer/core/process/reconstruction/sadeltabeta/sadeltabeta.py +151 -87
- tomwer/core/process/reconstruction/scores/params.py +7 -4
- tomwer/core/process/reconstruction/scores/scores.py +13 -0
- tomwer/core/process/reconstruction/test/test_axis_params.py +2 -2
- tomwer/core/process/reconstruction/test/test_darkref.py +3 -3
- tomwer/core/process/reconstruction/test/test_darkref_copy.py +7 -7
- tomwer/core/process/reconstruction/test/test_saaxis.py +3 -4
- tomwer/core/process/reconstruction/test/test_sadeltabeta.py +2 -2
- tomwer/core/process/stitching/nabustitcher.py +13 -12
- tomwer/core/process/task.py +34 -26
- tomwer/core/process/test/test_axis.py +13 -12
- tomwer/core/process/test/test_dark_and_flat.py +10 -7
- tomwer/core/process/test/test_data_transfer.py +10 -8
- tomwer/core/process/test/test_nabu.py +14 -6
- tomwer/core/process/test/test_normalization.py +4 -4
- tomwer/core/scan/blissscan.py +3 -3
- tomwer/core/scan/edfscan.py +13 -10
- tomwer/core/scan/hdf5scan.py +19 -530
- tomwer/core/scan/nxtomoscan.py +534 -0
- tomwer/core/scan/scanbase.py +72 -44
- tomwer/core/scan/scanfactory.py +13 -13
- tomwer/core/scan/test/test_edf.py +2 -2
- tomwer/core/scan/test/test_future_scan.py +3 -3
- tomwer/core/scan/test/test_h5.py +18 -16
- tomwer/core/scan/test/test_process_registration.py +4 -40
- tomwer/core/scan/test/test_scan.py +5 -78
- tomwer/core/settings.py +22 -2
- tomwer/core/test/test_scanutils.py +8 -7
- tomwer/core/test/test_utils.py +35 -28
- tomwer/core/tomwer_object.py +1 -1
- tomwer/core/utils/__init__.py +0 -466
- tomwer/core/utils/deprecation.py +1 -1
- tomwer/core/utils/dictutils.py +14 -0
- tomwer/core/utils/lbsram.py +35 -0
- tomwer/core/utils/nxtomoutils.py +1 -1
- tomwer/core/utils/scanutils.py +6 -6
- tomwer/core/utils/spec.py +263 -0
- tomwer/core/volume/edfvolume.py +6 -6
- tomwer/core/volume/hdf5volume.py +6 -6
- tomwer/core/volume/jp2kvolume.py +6 -6
- tomwer/core/volume/rawvolume.py +6 -6
- tomwer/core/volume/tiffvolume.py +12 -12
- tomwer/core/volume/volumefactory.py +2 -2
- tomwer/gui/cluster/slurm.py +274 -65
- tomwer/gui/cluster/supervisor.py +12 -0
- tomwer/gui/cluster/test/test_cluster.py +14 -2
- tomwer/gui/cluster/test/test_supervisor.py +3 -3
- tomwer/gui/configuration/__init__.py +0 -0
- tomwer/gui/{reconstruction/nabu → configuration}/action.py +1 -32
- tomwer/gui/configuration/level.py +22 -0
- tomwer/gui/control/actions.py +54 -0
- tomwer/gui/control/datalist.py +83 -16
- tomwer/gui/control/datalistener.py +4 -16
- tomwer/gui/control/datawatcher/controlwidget.py +2 -4
- tomwer/gui/control/datawatcher/datawatcher.py +1 -24
- tomwer/gui/control/{email.py → emailnotifier.py} +9 -18
- tomwer/gui/control/history.py +2 -2
- tomwer/gui/control/observations.py +2 -2
- tomwer/gui/control/reducedarkflatselector.py +9 -9
- tomwer/gui/control/selectorwidgetbase.py +36 -9
- tomwer/gui/control/serie/seriecreator.py +5 -22
- tomwer/gui/control/test/test_email.py +1 -1
- tomwer/gui/control/test/test_scanvalidator.py +6 -5
- tomwer/gui/control/test/test_single_tomo_obj.py +3 -3
- tomwer/gui/control/tomoobjdisplaymode.py +8 -0
- tomwer/gui/debugtools/datasetgenerator.py +3 -3
- tomwer/gui/edit/dkrfpatch.py +20 -26
- tomwer/gui/edit/imagekeyeditor.py +11 -12
- tomwer/gui/edit/nxtomoeditor.py +111 -44
- tomwer/gui/edit/nxtomowarmer.py +7 -6
- tomwer/gui/edit/test/test_dkrf_patch.py +13 -13
- tomwer/gui/edit/test/test_image_key_editor.py +3 -3
- tomwer/gui/edit/test/test_nx_editor.py +40 -16
- tomwer/gui/icat/__init__.py +0 -0
- tomwer/gui/icat/createscreenshots.py +80 -0
- tomwer/gui/icat/gallery.py +214 -0
- tomwer/gui/icat/publish.py +187 -0
- tomwer/gui/imagefromfile.py +2 -2
- tomwer/gui/qfolderdialog.py +24 -1
- tomwer/gui/reconstruction/axis/CompareImages.py +88 -168
- tomwer/gui/reconstruction/axis/axis.py +171 -57
- tomwer/gui/reconstruction/axis/radioaxis.py +122 -257
- tomwer/gui/reconstruction/darkref/darkrefcopywidget.py +3 -2
- tomwer/gui/reconstruction/darkref/darkrefwidget.py +2 -1
- tomwer/gui/reconstruction/nabu/castvolume.py +14 -3
- tomwer/gui/reconstruction/nabu/check.py +9 -9
- tomwer/gui/reconstruction/nabu/helical.py +29 -12
- tomwer/gui/reconstruction/nabu/nabuconfig/base.py +2 -4
- tomwer/gui/reconstruction/nabu/nabuconfig/nabuconfig.py +2 -1
- tomwer/gui/reconstruction/nabu/nabuconfig/output.py +126 -35
- tomwer/gui/reconstruction/nabu/nabuconfig/phase.py +39 -32
- tomwer/gui/reconstruction/nabu/nabuconfig/preprocessing.py +222 -31
- tomwer/gui/reconstruction/nabu/nabuconfig/reconstruction.py +57 -27
- tomwer/gui/reconstruction/nabu/nabuflow.py +12 -20
- tomwer/gui/reconstruction/nabu/slices.py +10 -11
- tomwer/gui/reconstruction/nabu/volume.py +22 -10
- tomwer/gui/reconstruction/normalization/intensity.py +18 -48
- tomwer/gui/reconstruction/saaxis/corrangeselector.py +8 -24
- tomwer/gui/reconstruction/saaxis/dimensionwidget.py +1 -1
- tomwer/gui/reconstruction/saaxis/saaxis.py +9 -21
- tomwer/gui/reconstruction/sadeltabeta/saadeltabeta.py +45 -12
- tomwer/gui/reconstruction/scores/control.py +2 -9
- tomwer/gui/reconstruction/scores/scoreplot.py +13 -11
- tomwer/gui/reconstruction/test/test_axis.py +41 -16
- tomwer/gui/reconstruction/test/test_nabu.py +31 -9
- tomwer/gui/reconstruction/test/test_saaxis.py +3 -3
- tomwer/gui/reconstruction/test/test_sadeltabeta.py +12 -2
- tomwer/gui/settings.py +5 -28
- tomwer/gui/stackplot.py +2 -5
- tomwer/gui/stitching/action.py +49 -0
- tomwer/gui/stitching/config/axisparams.py +7 -24
- tomwer/gui/stitching/config/output.py +10 -8
- tomwer/gui/stitching/config/positionoveraxis.py +22 -23
- tomwer/gui/stitching/normalization.py +117 -0
- tomwer/gui/stitching/stitchandbackground.py +4 -6
- tomwer/gui/stitching/stitching.py +267 -45
- tomwer/gui/stitching/stitching_preview.py +62 -55
- tomwer/gui/stitching/stitching_raw.py +13 -12
- tomwer/gui/stitching/z_stitching/fineestimation.py +0 -60
- tomwer/gui/utils/buttons.py +112 -29
- tomwer/gui/utils/inputwidget.py +43 -25
- tomwer/gui/utils/lineselector/lineselector.py +1 -1
- tomwer/gui/utils/scandescription.py +4 -0
- tomwer/gui/utils/step.py +144 -0
- tomwer/gui/utils/unitsystem.py +2 -5
- tomwer/gui/utils/vignettes.py +176 -15
- tomwer/gui/visualization/dataviewer.py +48 -35
- tomwer/gui/visualization/diffviewer/diffviewer.py +7 -16
- tomwer/gui/visualization/diffviewer/shiftwidget.py +2 -5
- tomwer/gui/visualization/scanoverview.py +1 -1
- tomwer/gui/visualization/sinogramviewer.py +20 -36
- tomwer/gui/visualization/test/test_diffviewer.py +3 -3
- tomwer/gui/visualization/test/test_nx_tomo_metadata_viewer.py +4 -4
- tomwer/gui/visualization/test/test_sinogramviewer.py +2 -2
- tomwer/gui/visualization/test/test_stacks.py +3 -3
- tomwer/gui/visualization/test/test_volumeviewer.py +65 -67
- tomwer/gui/visualization/volumeviewer.py +114 -113
- tomwer/io/utils/h5pyutils.py +3 -3
- tomwer/io/utils/raw_and_processed_data.py +84 -0
- tomwer/io/utils/tomoobj.py +4 -6
- tomwer/io/utils/utils.py +7 -7
- tomwer/resources/gui/icons/parameters.svg +1 -1
- tomwer/resources/gui/icons/ruler.png +0 -0
- tomwer/resources/gui/icons/ruler.svg +273 -0
- tomwer/resources/gui/icons/short_description.png +0 -0
- tomwer/resources/gui/icons/short_description.svg +58 -0
- tomwer/resources/gui/icons/url.png +0 -0
- tomwer/resources/gui/icons/url.svg +58 -0
- tomwer/resources/gui/illustrations/no_rot.svg +1 -1
- tomwer/synctools/stacks/edit/darkflatpatch.py +19 -14
- tomwer/synctools/stacks/edit/imagekeyeditor.py +2 -2
- tomwer/synctools/stacks/reconstruction/axis.py +4 -4
- tomwer/synctools/stacks/reconstruction/castvolume.py +22 -7
- tomwer/synctools/stacks/reconstruction/dkrefcopy.py +25 -20
- tomwer/synctools/stacks/reconstruction/nabu.py +2 -2
- tomwer/synctools/stacks/reconstruction/normalization.py +2 -2
- tomwer/synctools/stacks/reconstruction/saaxis.py +2 -2
- tomwer/synctools/stacks/reconstruction/sadeltabeta.py +2 -2
- tomwer/synctools/test/test_darkRefs.py +7 -58
- tomwer/synctools/test/test_foldertransfer.py +6 -6
- tomwer/synctools/utils/scanstages.py +6 -6
- tomwer/tests/conftest.py +34 -0
- tomwer/tests/datasets.py +13 -0
- tomwer/tests/test_scripts.py +91 -41
- tomwer/tests/utils.py +5 -0
- tomwer/third_part/WaitingOverlay.py +110 -0
- tomwer/third_part/__init__.py +0 -0
- tomwer/version.py +2 -2
- tomwer-1.3.12-py3.11-nspkg.pth +1 -0
- {tomwer-1.2.1.dist-info → tomwer-1.3.12.dist-info}/METADATA +73 -58
- {tomwer-1.2.1.dist-info → tomwer-1.3.12.dist-info}/RECORD +287 -286
- {tomwer-1.2.1.dist-info → tomwer-1.3.12.dist-info}/WHEEL +1 -1
- orangecontrib/tomwer/widgets/reconstruction/TofuOW.py +0 -197
- orangecontrib/tomwer/widgets/reconstruction/icons/XY_lamino.svg +0 -168
- orangecontrib/tomwer/widgets/reconstruction/icons/XZ_lamino.svg +0 -275
- orangecontrib/tomwer/widgets/reconstruction/icons/YZ_lamino.svg +0 -182
- tomwer/app/lamino.py +0 -143
- tomwer/core/process/reconstruction/lamino/__init__.py +0 -1
- tomwer/core/process/reconstruction/lamino/tofu.py +0 -1000
- tomwer/core/process/test/test_lamino.py +0 -76
- tomwer/core/test/test_lamino.py +0 -92
- tomwer/gui/reconstruction/lamino/__init__.py +0 -31
- tomwer/gui/reconstruction/lamino/tofu/TofuOptionLoader.py +0 -107
- tomwer/gui/reconstruction/lamino/tofu/__init__.py +0 -1
- tomwer/gui/reconstruction/lamino/tofu/misc.py +0 -148
- tomwer/gui/reconstruction/lamino/tofu/projections.py +0 -896
- tomwer/gui/reconstruction/lamino/tofu/settings.py +0 -75
- tomwer/gui/reconstruction/lamino/tofu/tofu.py +0 -432
- tomwer/gui/reconstruction/lamino/tofu/tofuexpert.py +0 -567
- tomwer/gui/reconstruction/lamino/tofu/tofuoutput.py +0 -760
- tomwer/gui/reconstruction/test/test_lamino.py +0 -189
- tomwer/resources/gui/icons/esrf_1.svg +0 -307
- tomwer/resources/gui/icons/lamino_parameters.svg +0 -70
- tomwer/resources/gui/icons/triangle.svg +0 -80
- tomwer/resources/gui/illustrations/lamino_angle.png +0 -0
- tomwer/resources/gui/illustrations/lamino_angle.svg +0 -509
- tomwer/resources/gui/illustrations/lamino_beta_angle.png +0 -0
- tomwer/resources/gui/illustrations/lamino_beta_angle.svg +0 -97
- tomwer/resources/gui/illustrations/lamino_theta_angle.png +0 -0
- tomwer/resources/gui/illustrations/lamino_theta_angle.svg +0 -368
- tomwer/resources/gui/illustrations/manual_slice.png +0 -0
- tomwer/resources/gui/illustrations/manual_slice.svg +0 -221
- tomwer/resources/gui/illustrations/psi_angle.png +0 -0
- tomwer/resources/gui/illustrations/psi_angle.svg +0 -479
- tomwer/resources/gui/illustrations/rotation_center.png +0 -0
- tomwer/resources/gui/illustrations/rotation_center.svg +0 -276
- tomwer/resources/gui/illustrations/slice_stack.png +0 -0
- tomwer/resources/gui/illustrations/slice_stack.svg +0 -266
- tomwer/resources/gui/illustrations/xy_slice.png +0 -0
- tomwer/resources/gui/illustrations/xy_slice.svg +0 -269
- tomwer/resources/gui/illustrations/xz_slice.png +0 -0
- tomwer/resources/gui/illustrations/xz_slice.svg +0 -270
- tomwer/resources/gui/illustrations/yz_slice.png +0 -0
- tomwer/resources/gui/illustrations/yz_slice.svg +0 -270
- tomwer/synctools/stacks/reconstruction/lamino.py +0 -233
- tomwer/synctools/test/test_scanstages.py +0 -162
- tomwer/tests/utils/__init__.py +0 -247
- tomwer/tests/utils/utilstest.py +0 -220
- tomwer-1.2.1-py3.11-nspkg.pth +0 -1
- /tomwer/core/process/control/{email.py → emailnotifier.py} +0 -0
- {tomwer-1.2.1.dist-info → tomwer-1.3.12.dist-info}/LICENSE +0 -0
- {tomwer-1.2.1.dist-info → tomwer-1.3.12.dist-info}/entry_points.txt +0 -0
- {tomwer-1.2.1.dist-info → tomwer-1.3.12.dist-info}/namespace_packages.txt +0 -0
- {tomwer-1.2.1.dist-info → tomwer-1.3.12.dist-info}/top_level.txt +0 -0
@@ -40,6 +40,7 @@ from silx.utils.deprecation import deprecated
|
|
40
40
|
from tomwer.core.process.reconstruction.axis.mode import AxisMode
|
41
41
|
from tomwer.core.scan.scanbase import TomwerScanBase
|
42
42
|
from tomwer.gui.utils.buttons import PadlockButton
|
43
|
+
from tomwer.gui.settings import EDITING_BACKGROUND_COLOR
|
43
44
|
from tomwer.synctools.axis import QAxisRP
|
44
45
|
|
45
46
|
from ...utils.scandescription import ScanNameLabelAndShape
|
@@ -135,7 +136,7 @@ class AxisWindow(qt.QMainWindow):
|
|
135
136
|
self._selectionGB._selectionChanged(self._selectionGB.getSelection())
|
136
137
|
|
137
138
|
# connect signal / slots
|
138
|
-
self._axisWidget.sigValidateRequest.connect(self.
|
139
|
+
self._axisWidget.sigValidateRequest.connect(self.sigApply)
|
139
140
|
self._axisWidget.sigComputationRequested.connect(self._computationRequested)
|
140
141
|
self._axisWidget.sigLockModeChanged.connect(self._lockModeChanged)
|
141
142
|
self._selectionGB.sigSelectionChanged.connect(self._axisWidget._axisTypeChanged)
|
@@ -202,11 +203,8 @@ class AxisWindow(qt.QMainWindow):
|
|
202
203
|
def _computationReady(self):
|
203
204
|
self.sigComputationRequested.emit()
|
204
205
|
|
205
|
-
def _repeatValidateRequest(self):
|
206
|
-
self.sigApply.emit()
|
207
|
-
|
208
206
|
def setPosition(self, frm: float, value: float):
|
209
|
-
self._axisWidget.setPosition(
|
207
|
+
self._axisWidget.setPosition(relative_value=value)
|
210
208
|
|
211
209
|
|
212
210
|
class _AxisWidget(qt.QMainWindow):
|
@@ -276,18 +274,36 @@ class _AxisWidget(qt.QMainWindow):
|
|
276
274
|
)
|
277
275
|
|
278
276
|
# connect signal / slots
|
279
|
-
self._controlWidget.sigComputationRequest.connect(
|
280
|
-
|
281
|
-
)
|
282
|
-
self._controlWidget.sigValidateRequest.connect(self._repeatValidateRequest)
|
277
|
+
self._controlWidget.sigComputationRequest.connect(self.sigComputationRequested)
|
278
|
+
self._controlWidget.sigValidateRequest.connect(self.sigValidateRequest)
|
283
279
|
self._controlWidget.sigLockCORValueChanged.connect(self._CORValueLocked)
|
284
|
-
self._radioAxis.sigLockModeChanged.connect(self.
|
280
|
+
self._radioAxis.sigLockModeChanged.connect(self.sigLockModeChanged)
|
285
281
|
self._radioAxis.sigPositionChanged.connect(self._setPositionFrmTuple)
|
282
|
+
self._controlWidget._positionInfo.sigRelativeValueSet.connect(
|
283
|
+
self._forceRelativePosition
|
284
|
+
)
|
285
|
+
self._controlWidget._positionInfo.sigAbsolueValueSet.connect(
|
286
|
+
self._forceAbsolutePosition
|
287
|
+
)
|
286
288
|
|
287
289
|
# set up
|
288
290
|
self.addPlot(self._radioAxis)
|
289
291
|
self.setActiveWidget(self._radioAxis)
|
290
292
|
|
293
|
+
def _forceRelativePosition(self, value: float):
|
294
|
+
self.setMode(AxisMode.manual)
|
295
|
+
self.setPosition(
|
296
|
+
relative_value=value,
|
297
|
+
absolute_value=None,
|
298
|
+
)
|
299
|
+
|
300
|
+
def _forceAbsolutePosition(self, value: float):
|
301
|
+
self.setMode(AxisMode.manual)
|
302
|
+
self.setPosition(
|
303
|
+
relative_value=None,
|
304
|
+
absolute_value=value,
|
305
|
+
)
|
306
|
+
|
291
307
|
def setAutoUpdateEstimatedCor(self, value):
|
292
308
|
self._radioAxis.setUpdateAutomaticallyEstimatedCor(value)
|
293
309
|
|
@@ -298,9 +314,6 @@ class _AxisWidget(qt.QMainWindow):
|
|
298
314
|
def getMode(self):
|
299
315
|
return self._radioAxis.getMode()
|
300
316
|
|
301
|
-
def _sinoAxisReady(self):
|
302
|
-
self.sigSinogramReady.emit()
|
303
|
-
|
304
317
|
def manual_uses_full_image(self, value):
|
305
318
|
self._radioAxis.manual_uses_full_image(value)
|
306
319
|
|
@@ -308,15 +321,6 @@ class _AxisWidget(qt.QMainWindow):
|
|
308
321
|
self.getAxis().mode = self.getMode()
|
309
322
|
self.getAxis().use_sinogram = self.useSinogram()
|
310
323
|
|
311
|
-
def _lockModeChanged(self):
|
312
|
-
self.sigLockModeChanged.emit()
|
313
|
-
|
314
|
-
def _repeatComputationRequest(self):
|
315
|
-
self.sigComputationRequested.emit()
|
316
|
-
|
317
|
-
def _repeatValidateRequest(self):
|
318
|
-
self.sigValidateRequest.emit()
|
319
|
-
|
320
324
|
def setMode(self, mode):
|
321
325
|
mode = AxisMode.from_value(mode)
|
322
326
|
self.setActiveWidget(self._radioAxis)
|
@@ -349,11 +353,9 @@ class _AxisWidget(qt.QMainWindow):
|
|
349
353
|
self._settingsDockWidget.setWidget(widget)
|
350
354
|
|
351
355
|
def _setPositionFrmTuple(self, value):
|
352
|
-
self.setPosition(
|
356
|
+
self.setPosition(relative_value=value[0])
|
353
357
|
|
354
|
-
def setPosition(
|
355
|
-
self, value_ref_tomwer: float, value_ref_nabu: float = None
|
356
|
-
) -> None:
|
358
|
+
def setPosition(self, relative_value: float, absolute_value: float = None) -> None:
|
357
359
|
"""
|
358
360
|
|
359
361
|
:param float value_ref_tomwer: center of rotation value on tomwer
|
@@ -363,19 +365,28 @@ class _AxisWidget(qt.QMainWindow):
|
|
363
365
|
:raises: ValueError if the frm parameter is not recognized
|
364
366
|
"""
|
365
367
|
if (
|
366
|
-
|
368
|
+
absolute_value is None
|
369
|
+
and self._axis_params.frame_width is not None
|
370
|
+
and relative_value is not None
|
371
|
+
):
|
372
|
+
try:
|
373
|
+
absolute_value = relative_value + self._axis_params.frame_width / 2.0
|
374
|
+
except TypeError:
|
375
|
+
absolute_value = None
|
376
|
+
if (
|
377
|
+
relative_value is None
|
367
378
|
and self._axis_params.frame_width is not None
|
368
|
-
and
|
379
|
+
and absolute_value is not None
|
369
380
|
):
|
370
381
|
try:
|
371
|
-
|
382
|
+
relative_value = absolute_value - self._axis_params.frame_width / 2.0
|
372
383
|
except TypeError:
|
373
|
-
|
384
|
+
relative_value = None
|
374
385
|
self._controlWidget.setPosition(
|
375
|
-
value_ref_tomwer=
|
386
|
+
value_ref_tomwer=relative_value, value_ref_nabu=absolute_value
|
376
387
|
)
|
377
|
-
if
|
378
|
-
self._radioAxis.setXShift(
|
388
|
+
if relative_value is not None:
|
389
|
+
self._radioAxis.setXShift(relative_value)
|
379
390
|
else:
|
380
391
|
self._radioAxis.resetShift()
|
381
392
|
|
@@ -399,10 +410,21 @@ class _AxisWidget(qt.QMainWindow):
|
|
399
410
|
)
|
400
411
|
elif set_position is False:
|
401
412
|
if scan.dim_1 is not None:
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
413
|
+
# if absolute position is know and relative position not (in the case the user already define absolute position only):
|
414
|
+
has_absolute_val_already = not self._controlWidget._positionInfo._absolutePositionQLE.text().startswith(
|
415
|
+
(".", "?")
|
416
|
+
)
|
417
|
+
has_relative_val_already = not self._controlWidget._positionInfo._relativePositionQLE.text().startswith(
|
418
|
+
(".", "?")
|
419
|
+
)
|
420
|
+
if (
|
421
|
+
self.getMode() is AxisMode.manual
|
422
|
+
and has_absolute_val_already
|
423
|
+
and not has_relative_val_already
|
424
|
+
):
|
425
|
+
self._controlWidget._updateRelativePosition(width=scan.dim_1)
|
426
|
+
else:
|
427
|
+
self._controlWidget._updateAbsolutePosition(width=scan.dim_1)
|
406
428
|
|
407
429
|
def _computationRequested(self) -> None:
|
408
430
|
self.sigComputationRequested.emit()
|
@@ -527,6 +549,9 @@ class _ControlWidget(qt.QWidget):
|
|
527
549
|
def _updateAbsolutePosition(self, width):
|
528
550
|
self._positionInfo._updateAbsolutePosition(width=width)
|
529
551
|
|
552
|
+
def _updateRelativePosition(self, width):
|
553
|
+
self._positionInfo._updateRelativePosition(width=width)
|
554
|
+
|
530
555
|
def isValueLock(self):
|
531
556
|
return self._lockBut.isLocked()
|
532
557
|
|
@@ -534,11 +559,25 @@ class _ControlWidget(qt.QWidget):
|
|
534
559
|
self._lockBut.setLock(lock)
|
535
560
|
|
536
561
|
|
562
|
+
class _PositionInfoValidator(qt.QDoubleValidator):
|
563
|
+
def validate(self, a0: str, a1: int):
|
564
|
+
if "..." in a0 or a0 == "?":
|
565
|
+
return (qt.QDoubleValidator.Acceptable, a0, a1)
|
566
|
+
else:
|
567
|
+
return super().validate(a0, a1)
|
568
|
+
|
569
|
+
|
537
570
|
class _PositionInfoWidget(qt.QWidget):
|
538
571
|
"""Widget used to display information relative to the current position"""
|
539
572
|
|
573
|
+
sigRelativeValueSet = qt.Signal(float)
|
574
|
+
"""Emit when the user define manually the relative value"""
|
575
|
+
sigAbsolueValueSet = qt.Signal(float)
|
576
|
+
"""Emit when the user define manually the absolute value"""
|
577
|
+
|
540
578
|
def __init__(self, parent, axis=None):
|
541
579
|
self._axis = None
|
580
|
+
self._defaultBackgroundColor = None
|
542
581
|
qt.QWidget.__init__(self, parent)
|
543
582
|
self.setLayout(qt.QGridLayout())
|
544
583
|
centerLabel = qt.QLabel("center", parent=self)
|
@@ -550,13 +589,14 @@ class _PositionInfoWidget(qt.QWidget):
|
|
550
589
|
self.layout().addWidget(centerLabel, 0, 0, 1, 1)
|
551
590
|
self.layout().addWidget(qt.QLabel(" (relative):"), 0, 1, 1, 1)
|
552
591
|
|
553
|
-
self.
|
554
|
-
self.
|
555
|
-
self.
|
592
|
+
self._relativePositionQLE = qt.QLineEdit("", parent=self)
|
593
|
+
self._positionValidator = _PositionInfoValidator(self)
|
594
|
+
self._relativePositionQLE.setValidator(self._positionValidator)
|
595
|
+
self._relativePositionQLE.setSizePolicy(
|
556
596
|
qt.QSizePolicy.Expanding, qt.QSizePolicy.Minimum
|
557
597
|
)
|
558
|
-
self.
|
559
|
-
self.layout().addWidget(self.
|
598
|
+
self._relativePositionQLE.setStyleSheet("color: red")
|
599
|
+
self.layout().addWidget(self._relativePositionQLE, 0, 2, 1, 1)
|
560
600
|
|
561
601
|
centerLabel = qt.QLabel("center", parent=self)
|
562
602
|
centerLabel.setSizePolicy(qt.QSizePolicy.Minimum, qt.QSizePolicy.Minimum)
|
@@ -566,17 +606,77 @@ class _PositionInfoWidget(qt.QWidget):
|
|
566
606
|
|
567
607
|
self.layout().addWidget(centerLabel, 1, 0, 1, 1)
|
568
608
|
self.layout().addWidget(qt.QLabel(" (absolute):"), 1, 1, 1, 1)
|
569
|
-
self.
|
570
|
-
self.
|
571
|
-
self.
|
609
|
+
self._absolutePositionQLE = qt.QLineEdit("", parent=self)
|
610
|
+
self._absolutePositionQLE.setValidator(self._positionValidator)
|
611
|
+
self._absolutePositionQLE.setSizePolicy(
|
572
612
|
qt.QSizePolicy.Expanding, qt.QSizePolicy.Minimum
|
573
613
|
)
|
574
|
-
self.
|
575
|
-
self.layout().addWidget(self.
|
614
|
+
self._absolutePositionQLE.setStyleSheet("color: #ff8c00")
|
615
|
+
self.layout().addWidget(self._absolutePositionQLE, 1, 2, 1, 1)
|
576
616
|
|
577
617
|
if axis:
|
578
618
|
self.setAxis(axis)
|
579
619
|
|
620
|
+
# connect signal / slot
|
621
|
+
self._relativePositionQLE.textEdited.connect(
|
622
|
+
self._userStartEditingRelativePosition
|
623
|
+
)
|
624
|
+
self._relativePositionQLE.editingFinished.connect(
|
625
|
+
self._userUpdatedRelativePosition
|
626
|
+
)
|
627
|
+
self._absolutePositionQLE.textEdited.connect(
|
628
|
+
self._userStartEditingAbsolutePosition
|
629
|
+
)
|
630
|
+
|
631
|
+
self._absolutePositionQLE.editingFinished.connect(
|
632
|
+
self._userUpdatedAbsolutePosition
|
633
|
+
)
|
634
|
+
|
635
|
+
def _getDefaultBackgroundColor(self):
|
636
|
+
if self._defaultBackgroundColor is None:
|
637
|
+
self._defaultBackgroundColor = self.palette().color(
|
638
|
+
self._absolutePositionQLE.backgroundRole()
|
639
|
+
)
|
640
|
+
return self._defaultBackgroundColor
|
641
|
+
|
642
|
+
def _userStartEditingRelativePosition(self, *args, **kwargs):
|
643
|
+
palette = self.palette()
|
644
|
+
palette.setColor(
|
645
|
+
self._relativePositionQLE.backgroundRole(), EDITING_BACKGROUND_COLOR
|
646
|
+
)
|
647
|
+
self._relativePositionQLE.setPalette(palette)
|
648
|
+
|
649
|
+
def _userStartEditingAbsolutePosition(self, *args, **kwargs):
|
650
|
+
palette = self.palette()
|
651
|
+
palette.setColor(
|
652
|
+
self._absolutePositionQLE.backgroundRole(), EDITING_BACKGROUND_COLOR
|
653
|
+
)
|
654
|
+
self._absolutePositionQLE.setPalette(palette)
|
655
|
+
|
656
|
+
def _userUpdatedRelativePosition(self, *args, **kwargs):
|
657
|
+
palette = self.palette()
|
658
|
+
palette.setColor(
|
659
|
+
self._relativePositionQLE.backgroundRole(),
|
660
|
+
self._getDefaultBackgroundColor(),
|
661
|
+
)
|
662
|
+
self._relativePositionQLE.setPalette(palette)
|
663
|
+
if self._relativePositionQLE.text().startswith((".", "?")):
|
664
|
+
return
|
665
|
+
else:
|
666
|
+
self.sigRelativeValueSet.emit(float(self._relativePositionQLE.text()))
|
667
|
+
|
668
|
+
def _userUpdatedAbsolutePosition(self, *args, **kwargs):
|
669
|
+
palette = self.palette()
|
670
|
+
palette.setColor(
|
671
|
+
self._absolutePositionQLE.backgroundRole(),
|
672
|
+
self._getDefaultBackgroundColor(),
|
673
|
+
)
|
674
|
+
self._absolutePositionQLE.setPalette(palette)
|
675
|
+
if self._absolutePositionQLE.text().startswith((".", "?")):
|
676
|
+
return
|
677
|
+
else:
|
678
|
+
self.sigAbsolueValueSet.emit(float(self._absolutePositionQLE.text()))
|
679
|
+
|
580
680
|
def setAxis(self, axis):
|
581
681
|
assert isinstance(axis, QAxisRP)
|
582
682
|
if axis == self._axis:
|
@@ -595,22 +695,36 @@ class _PositionInfoWidget(qt.QWidget):
|
|
595
695
|
)
|
596
696
|
|
597
697
|
def getPosition(self):
|
598
|
-
return float(self.
|
698
|
+
return float(self._relativePositionQLE.text())
|
599
699
|
|
600
700
|
def setPosition(self, relative_cor: Optional[float], abs_cor: Optional[float]):
|
601
701
|
if relative_cor is None:
|
602
|
-
self.
|
702
|
+
self._relativePositionQLE.setText("?")
|
603
703
|
elif isinstance(relative_cor, str):
|
604
|
-
self.
|
704
|
+
self._relativePositionQLE.setText(relative_cor)
|
605
705
|
else:
|
606
|
-
self.
|
706
|
+
self._relativePositionQLE.setText(f"{relative_cor:.3f}")
|
607
707
|
if abs_cor is None:
|
608
|
-
self.
|
708
|
+
self._absolutePositionQLE.setText("?")
|
609
709
|
else:
|
610
|
-
self.
|
710
|
+
self._absolutePositionQLE.setText(f"{abs_cor:.3f}")
|
611
711
|
|
612
712
|
def _updateAbsolutePosition(self, width):
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
713
|
+
if width is not None:
|
714
|
+
try:
|
715
|
+
rel_value = float(self._relativePositionQLE.text())
|
716
|
+
except Exception:
|
717
|
+
return
|
718
|
+
else:
|
719
|
+
abs_value = float(rel_value) + width / 2.0
|
720
|
+
self._absolutePositionQLE.setText(str(abs_value))
|
721
|
+
|
722
|
+
def _updateRelativePosition(self, width):
|
723
|
+
if width is not None:
|
724
|
+
try:
|
725
|
+
abs_value = float(self._absolutePositionQLE.text())
|
726
|
+
except Exception:
|
727
|
+
return
|
728
|
+
else:
|
729
|
+
rel_value = float(abs_value) - width / 2.0
|
730
|
+
self._relativePositionQLE.setText(str(rel_value))
|