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
@@ -36,21 +36,22 @@ from nabu.pipeline.fullfield.nabu_config import (
|
|
36
36
|
from silx.gui import icons as silx_icons
|
37
37
|
from silx.gui import qt
|
38
38
|
from silx.utils.enum import Enum as _Enum
|
39
|
-
from
|
39
|
+
from nxtomo.nxobject.nxdetector import FOV
|
40
40
|
|
41
|
-
from tomwer.core.process.reconstruction.nabu.utils import
|
41
|
+
from tomwer.core.process.reconstruction.nabu.utils import _NabuMode
|
42
42
|
from tomwer.core.scan.scanbase import TomwerScanBase
|
43
43
|
from tomwer.gui import icons as tomwer_icons
|
44
44
|
from tomwer.gui.reconstruction.nabu.nabuflow import NabuFlowArea
|
45
45
|
from tomwer.gui.utils.buttons import PadlockButton
|
46
46
|
|
47
47
|
from ...utils.flow import FlowDirection
|
48
|
-
from .action import (
|
48
|
+
from tomwer.gui.configuration.action import (
|
49
49
|
BasicConfigurationAction,
|
50
50
|
ExpertConfigurationAction,
|
51
51
|
FilterAction,
|
52
52
|
MinimalisticConfigurationAction,
|
53
53
|
)
|
54
|
+
from tomwer.gui.configuration.level import ConfigurationLevel
|
54
55
|
from .nabuconfig import NabuConfiguration
|
55
56
|
|
56
57
|
_logger = logging.getLogger(__name__)
|
@@ -250,7 +251,7 @@ class NabuWindow(qt.QMainWindow):
|
|
250
251
|
|
251
252
|
# add load option
|
252
253
|
self.__loadAction = qt.QAction(self)
|
253
|
-
self.__loadAction.setToolTip("load nabu configuration from a
|
254
|
+
self.__loadAction.setToolTip("load nabu configuration from a text file")
|
254
255
|
# load_icon = style.standardIcon(qt.QStyle.SP_)
|
255
256
|
load_icon = silx_icons.getQIcon("document-open")
|
256
257
|
self.__loadAction.setIcon(load_icon)
|
@@ -259,7 +260,7 @@ class NabuWindow(qt.QMainWindow):
|
|
259
260
|
|
260
261
|
# add save option
|
261
262
|
self.__saveAction = qt.QAction(self)
|
262
|
-
self.__saveAction.setToolTip("save nabu configuration to a
|
263
|
+
self.__saveAction.setToolTip("save nabu configuration to a text file")
|
263
264
|
save_icon = silx_icons.getQIcon("document-save")
|
264
265
|
self.__saveAction.setIcon(save_icon)
|
265
266
|
toolbar.addAction(self.__saveAction)
|
@@ -287,7 +288,7 @@ class NabuWindow(qt.QMainWindow):
|
|
287
288
|
self.hidePaganinInterface = self._mainWidget.hidePaganinInterface
|
288
289
|
|
289
290
|
# connect signal / slot
|
290
|
-
self._mainWidget.sigConfigChanged.connect(self.
|
291
|
+
self._mainWidget.sigConfigChanged.connect(self.sigConfigChanged)
|
291
292
|
|
292
293
|
# set up
|
293
294
|
self._resetParameters()
|
@@ -348,6 +349,7 @@ class NabuWindow(qt.QMainWindow):
|
|
348
349
|
|
349
350
|
def _resetParameters(self):
|
350
351
|
default_config = get_default_nabu_config(nabu_fullfield_default_config)
|
352
|
+
self._mainWidget._configuration._preProcessingWidget._sinoRingsOpts.resetConfiguration()
|
351
353
|
default_config["tomwer_slices"] = "middle"
|
352
354
|
default_config["preproc"]["ccd_filter_enabled"] = False
|
353
355
|
default_config["preproc"]["double_flatfield_enabled"] = False
|
@@ -386,8 +388,8 @@ class NabuWindow(qt.QMainWindow):
|
|
386
388
|
filesSelected = dialog.selectedFiles()
|
387
389
|
if filesSelected is not None and len(filesSelected) > 0:
|
388
390
|
output = filesSelected[0]
|
389
|
-
if not output.endswith(".cfg"):
|
390
|
-
output = "."
|
391
|
+
if not output.endswith((".cfg", ".conf", ".config")):
|
392
|
+
output = f"{output}.conf"
|
391
393
|
return output
|
392
394
|
|
393
395
|
def _userModeChanged(self, *args, **kwargs):
|
@@ -431,9 +433,6 @@ class NabuWindow(qt.QMainWindow):
|
|
431
433
|
def isModeLocked(self):
|
432
434
|
return self._mainWidget.isModeLocked()
|
433
435
|
|
434
|
-
def _triggerConfigChanged(self):
|
435
|
-
self.sigConfigChanged.emit()
|
436
|
-
|
437
436
|
|
438
437
|
class NabuWidget(qt.QWidget):
|
439
438
|
"""
|
@@ -34,15 +34,15 @@ from asyncio.log import logger
|
|
34
34
|
from silx.gui import qt
|
35
35
|
|
36
36
|
from tomwer.core.process.reconstruction.nabu.utils import (
|
37
|
-
ConfigurationLevel,
|
38
37
|
_NabuStages,
|
39
38
|
)
|
40
39
|
from tomwer.gui import icons
|
41
|
-
from tomwer.gui.
|
40
|
+
from tomwer.gui.configuration.action import (
|
42
41
|
BasicConfigurationAction,
|
43
42
|
ExpertConfigurationAction,
|
44
43
|
MinimalisticConfigurationAction,
|
45
44
|
)
|
45
|
+
from tomwer.gui.configuration.level import ConfigurationLevel
|
46
46
|
from tomwer.gui.reconstruction.nabu.nabuconfig.base import _NabuStageConfigBase
|
47
47
|
from tomwer.gui.reconstruction.nabu.nabuconfig.output import (
|
48
48
|
NabuOutputLocationWidget,
|
@@ -196,7 +196,7 @@ class NabuVolumeWidget(_NabuStageConfigBase, qt.QWidget):
|
|
196
196
|
)
|
197
197
|
self._redefineNabuOutputLocation.setCheckable(True)
|
198
198
|
self._redefineNabuOutputLocation.setLayout(qt.QVBoxLayout())
|
199
|
-
self._outputLocationWidget = NabuOutputLocationWidget(self)
|
199
|
+
self._outputLocationWidget = NabuOutputLocationWidget(parent=self)
|
200
200
|
self._redefineNabuOutputLocation.layout().addWidget(self._outputLocationWidget)
|
201
201
|
self.layout().addWidget(self._redefineNabuOutputLocation, 5, 0, 1, 2)
|
202
202
|
self.registerWidget(self._redefineNabuOutputLocation, "advanced")
|
@@ -259,13 +259,15 @@ class NabuVolumeWidget(_NabuStageConfigBase, qt.QWidget):
|
|
259
259
|
self._outputLocationWidget._outputDirQLE.editingFinished.connect(
|
260
260
|
self._triggerSigConfChanged
|
261
261
|
)
|
262
|
-
self._outputLocationWidget.
|
263
|
-
|
264
|
-
)
|
262
|
+
self._outputLocationWidget.sigOutputChanged.connect(self._triggerSigConfChanged)
|
263
|
+
self._redefineNabuOutputLocation.toggled.connect(self._triggerSigConfChanged)
|
265
264
|
|
266
265
|
def redefineOutputLocation(self):
|
267
266
|
return self._redefineNabuOutputLocation.isChecked()
|
268
267
|
|
268
|
+
def setRedefineOutputLocation(self, redefine: bool):
|
269
|
+
self._redefineNabuOutputLocation.setChecked(redefine)
|
270
|
+
|
269
271
|
def getNabuOutputLocation(self):
|
270
272
|
if self.redefineOutputLocation():
|
271
273
|
return self._outputLocationWidget.getOutputDir()
|
@@ -277,6 +279,7 @@ class NabuVolumeWidget(_NabuStageConfigBase, qt.QWidget):
|
|
277
279
|
self._redefineNabuOutputLocation.setChecked(False)
|
278
280
|
else:
|
279
281
|
self._redefineNabuOutputLocation.setChecked(True)
|
282
|
+
self._outputLocationWidget.setOutputDirMode("other")
|
280
283
|
self._outputLocationWidget.setOutputDir(location)
|
281
284
|
|
282
285
|
def redefineNabuFileFormat(self):
|
@@ -307,13 +310,13 @@ class NabuVolumeWidget(_NabuStageConfigBase, qt.QWidget):
|
|
307
310
|
return self._spbCPUFract.value() / 100.0
|
308
311
|
|
309
312
|
def setCPUFract(self, value):
|
310
|
-
return self._spbCPUFract.setValue(value * 100.0)
|
313
|
+
return self._spbCPUFract.setValue(int(value * 100.0))
|
311
314
|
|
312
315
|
def getGPUFract(self):
|
313
316
|
return self._spbGPUFract.value() / 100.0
|
314
317
|
|
315
318
|
def setGPUFract(self, value):
|
316
|
-
return self._spbGPUFract.setValue(value * 100.0)
|
319
|
+
return self._spbGPUFract.setValue(int(value * 100.0))
|
317
320
|
|
318
321
|
def getStartZ(self):
|
319
322
|
return self._fromSlice.value()
|
@@ -357,6 +360,8 @@ class NabuVolumeWidget(_NabuStageConfigBase, qt.QWidget):
|
|
357
360
|
},
|
358
361
|
"new_output_file_format": self.getNabuFileFormat() or "",
|
359
362
|
"new_output_location": self.getNabuOutputLocation() or "",
|
363
|
+
"output_dir_mode": self._outputLocationWidget.getOutputDirMode().value,
|
364
|
+
"overwrite_output_location": self.redefineOutputLocation(),
|
360
365
|
}
|
361
366
|
|
362
367
|
def setConfiguration(self, config):
|
@@ -382,6 +387,12 @@ class NabuVolumeWidget(_NabuStageConfigBase, qt.QWidget):
|
|
382
387
|
if new_output_location == "":
|
383
388
|
new_output_location = None
|
384
389
|
self.setNabuOutputLocation(new_output_location)
|
390
|
+
output_dir_mode = config.get("output_dir_mode", None)
|
391
|
+
if output_dir_mode is not None:
|
392
|
+
self._outputLocationWidget.setOutputDirMode(output_dir_mode)
|
393
|
+
overwrite_output_location = config.get("overwrite_output_location", None)
|
394
|
+
if overwrite_output_location is not None:
|
395
|
+
self.setRedefineOutputLocation(overwrite_output_location)
|
385
396
|
|
386
397
|
def setPostProcConfiguration(self, config):
|
387
398
|
if "output_histogram" in config:
|
@@ -430,6 +441,7 @@ class NabuVolumeWindow(qt.QMainWindow):
|
|
430
441
|
|
431
442
|
self._minimalisticAction = MinimalisticConfigurationAction(toolbar)
|
432
443
|
menu.addAction(self._minimalisticAction)
|
444
|
+
self.__configurationModesGroup.addAction(self._minimalisticAction)
|
433
445
|
self._basicConfigAction = BasicConfigurationAction(toolbar)
|
434
446
|
menu.addAction(self._basicConfigAction)
|
435
447
|
self.__configurationModesGroup.addAction(self._basicConfigAction)
|
@@ -438,8 +450,8 @@ class NabuVolumeWindow(qt.QMainWindow):
|
|
438
450
|
self.__configurationModesGroup.addAction(self._expertConfiguration)
|
439
451
|
|
440
452
|
# set up
|
441
|
-
self._basicConfigAction.setChecked(True)
|
442
453
|
self._userModeChanged(action=self._basicConfigAction)
|
454
|
+
self._basicConfigAction.setChecked(True)
|
443
455
|
|
444
456
|
# connect signal / slot
|
445
457
|
self._mainWidget.sigConfigChanged.connect(self._triggerSigConfigChanged)
|
@@ -455,7 +467,7 @@ class NabuVolumeWindow(qt.QMainWindow):
|
|
455
467
|
elif action is self._expertConfiguration:
|
456
468
|
level = ConfigurationLevel.ADVANCED
|
457
469
|
else:
|
458
|
-
|
470
|
+
level = ConfigurationLevel.REQUIRED
|
459
471
|
self._mainWidget.setConfigurationLevel(level)
|
460
472
|
|
461
473
|
# expose API
|
@@ -46,7 +46,7 @@ from tomoscan.normalization import Method
|
|
46
46
|
|
47
47
|
from tomwer.core.process.reconstruction.normalization import params as _normParams
|
48
48
|
from tomwer.core.process.reconstruction.normalization.params import _ValueSource
|
49
|
-
from tomwer.core.scan.
|
49
|
+
from tomwer.core.scan.nxtomoscan import NXtomoScan
|
50
50
|
from tomwer.core.scan.scanbase import TomwerScanBase
|
51
51
|
from tomwer.gui.reconstruction.scores.control import ControlWidget
|
52
52
|
from tomwer.gui.utils.buttons import PadlockButton
|
@@ -88,7 +88,7 @@ class SinoNormWindow(qt.QMainWindow):
|
|
88
88
|
# connect signal / slot
|
89
89
|
# self._optsWidget.sigModeChanged.connect(self._modeChanged)
|
90
90
|
self._optsWidget.sigValueUpdated.connect(self.setResult)
|
91
|
-
self._optsWidget.sigConfigurationChanged.connect(self.
|
91
|
+
self._optsWidget.sigConfigurationChanged.connect(self.sigConfigurationChanged)
|
92
92
|
self._optsWidget.sigSourceChanged.connect(self._sourceChanged)
|
93
93
|
self._crtWidget.sigValidateRequest.connect(self._validated)
|
94
94
|
|
@@ -96,14 +96,6 @@ class SinoNormWindow(qt.QMainWindow):
|
|
96
96
|
self._centralWidget._updateSinogramROI()
|
97
97
|
self._modeChanged()
|
98
98
|
|
99
|
-
def close(self):
|
100
|
-
self._centralWidget.stop()
|
101
|
-
self._centralWidget = None
|
102
|
-
super().close()
|
103
|
-
|
104
|
-
def _configurationChanged(self):
|
105
|
-
self.sigConfigurationChanged.emit()
|
106
|
-
|
107
99
|
def _hideLockButton(self):
|
108
100
|
self._optsWidget._hideLockButton()
|
109
101
|
|
@@ -168,11 +160,6 @@ class SinoNormWindow(qt.QMainWindow):
|
|
168
160
|
self._centralWidget.setScan(scan=scan)
|
169
161
|
self._optsWidget.setScan(scan=scan)
|
170
162
|
|
171
|
-
def stop(self):
|
172
|
-
if self._centralWidget is not None:
|
173
|
-
self._centralWidget.stop()
|
174
|
-
self._centralWidget = None
|
175
|
-
|
176
163
|
def getExtraArgs(self) -> dict:
|
177
164
|
return self._optsWidget.getExtraInfos()
|
178
165
|
|
@@ -249,12 +236,6 @@ class _Viewer(qt.QTabWidget):
|
|
249
236
|
self._projView.setManualROIVisible(visible=visible)
|
250
237
|
self._sinoView.setROIVisible(visible=visible)
|
251
238
|
|
252
|
-
def stop(self):
|
253
|
-
self._projView.stop()
|
254
|
-
self._projView = None
|
255
|
-
self._sinoView.stop()
|
256
|
-
self._sinoView = None
|
257
|
-
|
258
239
|
def getROI(self):
|
259
240
|
return self._projView.getROI()
|
260
241
|
|
@@ -344,9 +325,6 @@ class _ProjPlotWithROI(DataViewer):
|
|
344
325
|
super().clear()
|
345
326
|
self.getPlotWidget().removeMarker("sinogram_line")
|
346
327
|
|
347
|
-
def stop(self):
|
348
|
-
self._viewer._plot.stopUpdateThread()
|
349
|
-
|
350
328
|
|
351
329
|
class SinogramViewer(_SinogramViewer):
|
352
330
|
""" "Sinogram viewer but adapated for Intensity normalization"""
|
@@ -400,14 +378,11 @@ class SinogramViewer(_SinogramViewer):
|
|
400
378
|
self.getPlotWidget().addItem(item)
|
401
379
|
|
402
380
|
def getPlotWidget(self):
|
403
|
-
return self._plot
|
381
|
+
return self._plot
|
404
382
|
|
405
383
|
def _updatePlot(self, sinogram):
|
406
|
-
self.
|
407
|
-
self.
|
408
|
-
|
409
|
-
def stop(self):
|
410
|
-
self._plot.stopUpdateThread()
|
384
|
+
self.getPlotWidget().addImage(data=sinogram)
|
385
|
+
self.getPlotWidget().replot()
|
411
386
|
|
412
387
|
|
413
388
|
class _NormIntensityOptions(qt.QWidget):
|
@@ -489,21 +464,20 @@ class _NormIntensityOptions(qt.QWidget):
|
|
489
464
|
|
490
465
|
# connect signal / slot
|
491
466
|
self._modeCB.currentIndexChanged.connect(self._modeChanged)
|
492
|
-
self._modeCB.currentIndexChanged.connect(self.
|
467
|
+
self._modeCB.currentIndexChanged.connect(self.sigConfigurationChanged)
|
493
468
|
self._sourceCB.currentIndexChanged.connect(self._sourceChanged)
|
494
|
-
self._sourceCB.currentIndexChanged.connect(self.
|
495
|
-
self._computeButton.released.connect(self.
|
469
|
+
self._sourceCB.currentIndexChanged.connect(self.sigConfigurationChanged)
|
470
|
+
self._computeButton.released.connect(self.sigProcessingRequested)
|
496
471
|
self._scalarValueWidget.sigValueChanged.connect(self._valueUpdated)
|
497
|
-
self._scalarValueWidget.sigValueChanged.connect(self.
|
498
|
-
self._datasetWidget.sigConfigurationChanged.connect(
|
472
|
+
self._scalarValueWidget.sigValueChanged.connect(self.sigConfigurationChanged)
|
473
|
+
self._datasetWidget.sigConfigurationChanged.connect(
|
474
|
+
self.sigConfigurationChanged
|
475
|
+
)
|
499
476
|
self._intensityCalcOpts.sigConfigurationChanged.connect(
|
500
|
-
self.
|
477
|
+
self.sigConfigurationChanged
|
501
478
|
)
|
502
479
|
self._lockButton.toggled.connect(self._lockChanged)
|
503
|
-
self._lockButton.toggled.connect(self.
|
504
|
-
|
505
|
-
def _configurationChanged(self):
|
506
|
-
self.sigConfigurationChanged.emit()
|
480
|
+
self._lockButton.toggled.connect(self.sigConfigurationChanged)
|
507
481
|
|
508
482
|
def _sourceChanged(self):
|
509
483
|
source = self.getCurrentSource()
|
@@ -644,9 +618,6 @@ class _NormIntensityOptions(qt.QWidget):
|
|
644
618
|
else:
|
645
619
|
raise ValueError(f"unhandled source: {source} for method {method}")
|
646
620
|
|
647
|
-
def _computationRequested(self):
|
648
|
-
self.sigProcessingRequested.emit()
|
649
|
-
|
650
621
|
|
651
622
|
class _NormIntensityCalcOpts(qt.QWidget):
|
652
623
|
"""Options to compute the norm intensity"""
|
@@ -665,15 +636,14 @@ class _NormIntensityCalcOpts(qt.QWidget):
|
|
665
636
|
self.layout().addRow(self._calculationModeLabel, self._calculationModeCB)
|
666
637
|
|
667
638
|
# connect signal / slot
|
668
|
-
self._calculationModeCB.currentIndexChanged.connect(
|
639
|
+
self._calculationModeCB.currentIndexChanged.connect(
|
640
|
+
self.sigConfigurationChanged
|
641
|
+
)
|
669
642
|
|
670
643
|
def setCalculationFctVisible(self, visible):
|
671
644
|
self._calculationModeLabel.setVisible(visible)
|
672
645
|
self._calculationModeCB.setVisible(visible)
|
673
646
|
|
674
|
-
def _configurationChanged(self):
|
675
|
-
self.sigConfigurationChanged.emit()
|
676
|
-
|
677
647
|
def getCalculationFct(self):
|
678
648
|
return _normParams._ValueCalculationFct.from_value(
|
679
649
|
self._calculationModeCB.currentText()
|
@@ -885,7 +855,7 @@ class _NormIntensityDatasetWidget(qt.QWidget):
|
|
885
855
|
if self.getMode() is _normParams._DatasetScope.LOCAL:
|
886
856
|
if self.getScan() is not None:
|
887
857
|
scan = self.getScan()
|
888
|
-
if not isinstance(scan,
|
858
|
+
if not isinstance(scan, NXtomoScan):
|
889
859
|
mess = qt.QMessageBox(
|
890
860
|
parent=self,
|
891
861
|
icon=qt.QMessageBox.Warning,
|
@@ -148,7 +148,7 @@ class SinogramViewer(_SinogramViewer):
|
|
148
148
|
self._estimated_cor = estimated_cor
|
149
149
|
self._other_cors = other_cors if other_cors is not None else tuple()
|
150
150
|
|
151
|
-
plot = self._plot
|
151
|
+
plot = self._plot
|
152
152
|
|
153
153
|
if self._corMarker is not None:
|
154
154
|
self._corMarker.sigDragFinished.disconnect(self._middleMarkerMoved)
|
@@ -259,9 +259,7 @@ class _ReconstructionModeGB(qt.QGroupBox):
|
|
259
259
|
# connect signal / slot
|
260
260
|
self._verticalRB.toggled.connect(self._reconstructionModeChanged)
|
261
261
|
self._tiltCorrectionRB.toggled.connect(self._reconstructionModeChanged)
|
262
|
-
self._sliceVerticalQSB.sigSlicesChanged.connect(
|
263
|
-
self._reconstructionSliceChanged
|
264
|
-
)
|
262
|
+
self._sliceVerticalQSB.sigSlicesChanged.connect(self.reconstructionSliceChanged)
|
265
263
|
self._onRadioButton.released.connect(self._onRadioActivated)
|
266
264
|
self._defaultSlicesCB.currentIndexChanged.connect(self._updateVerticalSelection)
|
267
265
|
|
@@ -295,7 +293,7 @@ class _ReconstructionModeGB(qt.QGroupBox):
|
|
295
293
|
mode_is_middle = current_mode == "middle"
|
296
294
|
self._sliceVerticalQSB.setVisible(not mode_is_middle)
|
297
295
|
self._onRadioButton.setVisible(not mode_is_middle)
|
298
|
-
self.
|
296
|
+
self.reconstructionSliceChanged.emit()
|
299
297
|
|
300
298
|
def _onRadioActivated(self):
|
301
299
|
lineSelection = QSliceSelectorDialog(parent=self, n_required_slice=1)
|
@@ -327,11 +325,6 @@ class _ReconstructionModeGB(qt.QGroupBox):
|
|
327
325
|
def setScan(self, scan):
|
328
326
|
self.__scan = weakref.ref(scan)
|
329
327
|
|
330
|
-
def _reconstructionSliceChanged(self):
|
331
|
-
# for now we only synchronize sliceQSB from vertical with the sinogram
|
332
|
-
# viewer
|
333
|
-
self.reconstructionSliceChanged.emit()
|
334
|
-
|
335
328
|
def getReconstructionMode(self) -> ReconstructionMode:
|
336
329
|
if self._tiltCorrectionRB.isChecked():
|
337
330
|
return ReconstructionMode.TILT_CORRECTION
|
@@ -516,10 +509,10 @@ class _EstimatedCorWidget(qt.QGroupBox):
|
|
516
509
|
self._middlePositionRB.toggled.connect(self._modeChanged)
|
517
510
|
self._manualCORRel.editingFinished.connect(self._relativePositionChanged)
|
518
511
|
self._manualCORAbs.editingFinished.connect(self._absolutePositionChanged)
|
519
|
-
self._autoCorPB.released.connect(self.
|
520
|
-
self._middlePositionRB.toggled.connect(self.
|
521
|
-
self._manualCORRel.editingFinished.connect(self.
|
522
|
-
self._manualCORAbs.editingFinished.connect(self.
|
512
|
+
self._autoCorPB.released.connect(self.sigAutoCorRequested)
|
513
|
+
self._middlePositionRB.toggled.connect(self.sigAutoCorChanged)
|
514
|
+
self._manualCORRel.editingFinished.connect(self.sigAutoCorChanged)
|
515
|
+
self._manualCORAbs.editingFinished.connect(self.sigAutoCorChanged)
|
523
516
|
# set up
|
524
517
|
self._middlePositionRB.setChecked(True)
|
525
518
|
self._modeChanged()
|
@@ -607,12 +600,6 @@ class _EstimatedCorWidget(qt.QGroupBox):
|
|
607
600
|
self._manualCORAbs.setValue(float(value))
|
608
601
|
self._manualCORAbs.editingFinished.emit()
|
609
602
|
|
610
|
-
def _autoCorReqested(self):
|
611
|
-
self.sigAutoCorRequested.emit()
|
612
|
-
|
613
|
-
def _autoCorValueChanged(self):
|
614
|
-
self.sigAutoCorChanged.emit()
|
615
|
-
|
616
603
|
|
617
604
|
class SAAxisOptions(qt.QWidget):
|
618
605
|
"""
|
@@ -673,7 +660,7 @@ class SAAxisOptions(qt.QWidget):
|
|
673
660
|
|
674
661
|
# connect signal / slot
|
675
662
|
self._reconstructionMode.reconstructionSliceChanged.connect(
|
676
|
-
self.
|
663
|
+
self.sigReconstructionSliceChanged
|
677
664
|
)
|
678
665
|
self._nReconsSB.valueChanged.connect(self._reconstructionRangeChanged)
|
679
666
|
self._estimatedCorWidget.sigAutoCorChanged.connect(
|
@@ -722,9 +709,6 @@ class SAAxisOptions(qt.QWidget):
|
|
722
709
|
self._reconstructionMode.setSlicesRange(min_index, max_index)
|
723
710
|
self.sigConfigurationChanged.emit()
|
724
711
|
|
725
|
-
def _reconstructionSliceChanged(self):
|
726
|
-
self.sigReconstructionSliceChanged.emit()
|
727
|
-
|
728
712
|
def _reconstructionRangeChanged(self):
|
729
713
|
self.sigReconstructionRangeChanged.emit()
|
730
714
|
self.sigConfigurationChanged.emit()
|
@@ -41,7 +41,7 @@ import numpy
|
|
41
41
|
from silx.gui import qt
|
42
42
|
|
43
43
|
from tomwer.core.process.reconstruction.axis import mode as axis_mode
|
44
|
-
from tomwer.core.process.reconstruction.nabu.utils import _NabuMode
|
44
|
+
from tomwer.core.process.reconstruction.nabu.utils import _NabuMode, slice_index_to_int
|
45
45
|
from tomwer.core.process.reconstruction.saaxis.params import SAAxisParams
|
46
46
|
from tomwer.core.process.reconstruction.saaxis.saaxis import SAAxisTask
|
47
47
|
from tomwer.gui import icons
|
@@ -66,14 +66,14 @@ class ScorePlot(_ScorePlot, constructor=CorSelection):
|
|
66
66
|
|
67
67
|
def _updateScores(self):
|
68
68
|
scan = self.__scan() if self.__scan else None
|
69
|
+
img_width = None
|
69
70
|
if scan is not None:
|
70
71
|
if scan.saaxis_params:
|
71
72
|
scan.saaxis_params.score_method = self.getScoreMethod()
|
72
73
|
img_width = scan.dim_1
|
73
74
|
# update autofocus
|
74
75
|
SAAxisTask.autofocus(scan)
|
75
|
-
|
76
|
-
img_width = None
|
76
|
+
|
77
77
|
self.setVarScores(
|
78
78
|
scores=self._scores,
|
79
79
|
score_method=self.getScoreMethod(),
|
@@ -131,13 +131,10 @@ class NabuAutoCorDiag(qt.QDialog):
|
|
131
131
|
self.layout().addWidget(self._buttons)
|
132
132
|
|
133
133
|
self._buttons.button(qt.QDialogButtonBox.Ok).clicked.connect(
|
134
|
-
self.
|
134
|
+
self.sigRequestAutoCor
|
135
135
|
)
|
136
136
|
self._buttons.button(qt.QDialogButtonBox.Ok).setText("compute")
|
137
137
|
|
138
|
-
def _requestAutomaticCor(self, *args, **kwargs):
|
139
|
-
self.sigRequestAutoCor.emit()
|
140
|
-
|
141
138
|
|
142
139
|
class _SAAxisTabWidget(qt.QTabWidget):
|
143
140
|
sigConfigurationChanged = qt.Signal()
|
@@ -258,6 +255,10 @@ class _SAAxisTabWidget(qt.QTabWidget):
|
|
258
255
|
"mode": self.getReconstructionMode().value,
|
259
256
|
"score_method": self.getScoreMethod().value,
|
260
257
|
"estimated_cor": self.getEstimatedCorPosition(),
|
258
|
+
"output_dir": self.getNabuReconsParams()
|
259
|
+
.get("output", {})
|
260
|
+
.get("location", None)
|
261
|
+
or None,
|
261
262
|
}
|
262
263
|
|
263
264
|
def setConfiguration(self, config):
|
@@ -302,10 +303,6 @@ class _SAAxisTabWidget(qt.QTabWidget):
|
|
302
303
|
self._nabuSettings = None
|
303
304
|
super().close()
|
304
305
|
|
305
|
-
def _stopAnimationThread(self):
|
306
|
-
self._resultsViewer._stopAnimationThread()
|
307
|
-
self._sliceAndCorWidget._sinogramViewer._stopAnimationThread()
|
308
|
-
|
309
306
|
|
310
307
|
class SAAxisWindow(qt.QMainWindow):
|
311
308
|
"""
|
@@ -380,9 +377,6 @@ class SAAxisWindow(qt.QMainWindow):
|
|
380
377
|
self._saaxisControl.sigComputationRequest.connect(self._launchReconstructions)
|
381
378
|
self._saaxisControl.sigValidateRequest.connect(self._validate)
|
382
379
|
|
383
|
-
def stop(self):
|
384
|
-
self._stopAnimationThread()
|
385
|
-
|
386
380
|
def showResults(self):
|
387
381
|
self._tabWidget.showResults()
|
388
382
|
|
@@ -450,10 +444,7 @@ class SAAxisWindow(qt.QMainWindow):
|
|
450
444
|
def _updateSinogramLine(self):
|
451
445
|
r_slice = self.getReconstructionSlices()
|
452
446
|
if r_slice == "middle":
|
453
|
-
|
454
|
-
line = self._scan.dim_2 // 2
|
455
|
-
else:
|
456
|
-
line = 1024
|
447
|
+
line = slice_index_to_int(slice_index="middle", scan=self._scan, axis="XY")
|
457
448
|
else:
|
458
449
|
line = list(r_slice.values())[0]
|
459
450
|
self._tabWidget.getSinogramViewer().setLine(line)
|
@@ -509,9 +500,6 @@ class SAAxisWindow(qt.QMainWindow):
|
|
509
500
|
if idx >= 0:
|
510
501
|
self._tabWidget.setCurrentIndex(idx)
|
511
502
|
|
512
|
-
def _stopAnimationThread(self):
|
513
|
-
self._tabWidget._stopAnimationThread()
|
514
|
-
|
515
503
|
def close(self):
|
516
504
|
self._tabWidget.close()
|
517
505
|
self._tabWidget = None
|
@@ -41,10 +41,10 @@ import numpy
|
|
41
41
|
from silx.gui import qt
|
42
42
|
|
43
43
|
from tomwer.core.process.reconstruction.nabu.utils import (
|
44
|
-
ConfigurationLevel,
|
45
44
|
_NabuMode,
|
46
45
|
retrieve_lst_of_value_from_str,
|
47
46
|
)
|
47
|
+
from tomwer.gui.configuration.level import ConfigurationLevel
|
48
48
|
from tomwer.core.process.reconstruction.sadeltabeta.sadeltabeta import (
|
49
49
|
SADeltaBetaTask,
|
50
50
|
)
|
@@ -175,11 +175,22 @@ class _SADeltaBetaTabWidget(qt.QTabWidget):
|
|
175
175
|
nabu_config = self.getNabuReconsParams()
|
176
176
|
enable_ht = int(self._nabuSettings.getMode() is _NabuMode.HALF_ACQ)
|
177
177
|
nabu_config["reconstruction"]["enable_halftomo"] = enable_ht
|
178
|
+
# update phase option
|
179
|
+
nabu_config["phase"][
|
180
|
+
"padding_type"
|
181
|
+
] = self._deltaBetaSelectionWidget.getPaddingType().value
|
182
|
+
nabu_config["phase"][
|
183
|
+
"unsharp_coeff"
|
184
|
+
] = self._deltaBetaSelectionWidget.getUnsharpCoeff()
|
185
|
+
nabu_config["phase"][
|
186
|
+
"unsharp_sigma"
|
187
|
+
] = self._deltaBetaSelectionWidget.getUnsharpSigma()
|
178
188
|
return {
|
179
189
|
"slice_index": self.getReconstructionSlice(),
|
180
190
|
"nabu_params": nabu_config,
|
181
191
|
"score_method": self.getScoreMethod().value,
|
182
192
|
"delta_beta_values": self.getDeltaBetaValues(),
|
193
|
+
"output_dir": nabu_config.get("output", {}).get("location", None) or None,
|
183
194
|
}
|
184
195
|
|
185
196
|
def getReconstructionSlice(self):
|
@@ -203,7 +214,21 @@ class _SADeltaBetaTabWidget(qt.QTabWidget):
|
|
203
214
|
if slice_index is not None:
|
204
215
|
self.setReconstructionSlice(slice_index)
|
205
216
|
if "nabu_params" in config:
|
206
|
-
|
217
|
+
nabu_params = config["nabu_params"]
|
218
|
+
self.setNabuReconsParams(nabu_params)
|
219
|
+
# special handling of unsharp coeff, sigma and padding type
|
220
|
+
padding_type = nabu_params.get("phase", {}).get("padding_type", None)
|
221
|
+
if padding_type is not None:
|
222
|
+
self._deltaBetaSelectionWidget.setPaddingType(padding_type=padding_type)
|
223
|
+
|
224
|
+
unsharp_coeff = nabu_params.get("phase", {}).get("unsharp_coeff", None)
|
225
|
+
if unsharp_coeff is not None:
|
226
|
+
self._deltaBetaSelectionWidget.setUnsharpCoeff(coeff=unsharp_coeff)
|
227
|
+
|
228
|
+
unsharp_sigma = nabu_params.get("phase", {}).get("unsharp_sigma", None)
|
229
|
+
if unsharp_sigma is not None:
|
230
|
+
self._deltaBetaSelectionWidget.setUnsharpSigma(sigma=unsharp_sigma)
|
231
|
+
|
207
232
|
if "score_method" in config:
|
208
233
|
self.setScoreMethod(config["score_method"])
|
209
234
|
|
@@ -214,7 +239,6 @@ class _SADeltaBetaTabWidget(qt.QTabWidget):
|
|
214
239
|
self._resultsViewer.setScoreMethod(method)
|
215
240
|
|
216
241
|
def close(self):
|
217
|
-
self._stopAnimationThread()
|
218
242
|
self._resultsViewer.close()
|
219
243
|
self._resultsViewer = None
|
220
244
|
self._deltaBetaSelectionWidget.close()
|
@@ -223,9 +247,6 @@ class _SADeltaBetaTabWidget(qt.QTabWidget):
|
|
223
247
|
self._nabuSettings = None
|
224
248
|
super().close()
|
225
249
|
|
226
|
-
def _stopAnimationThread(self):
|
227
|
-
self._resultsViewer._stopAnimationThread()
|
228
|
-
|
229
250
|
def setSliceRange(self, min_, max_):
|
230
251
|
self._deltaBetaSelectionWidget.setSliceRange(min_, max_)
|
231
252
|
|
@@ -332,12 +353,6 @@ class SADeltaBetaWindow(qt.QMainWindow):
|
|
332
353
|
self._tabWidget = None
|
333
354
|
super().close()
|
334
355
|
|
335
|
-
def stop(self):
|
336
|
-
self._stopAnimationThread()
|
337
|
-
|
338
|
-
def _stopAnimationThread(self):
|
339
|
-
self._tabWidget._stopAnimationThread()
|
340
|
-
|
341
356
|
def setDBScores(
|
342
357
|
self,
|
343
358
|
scores: dict,
|
@@ -498,3 +513,21 @@ class DeltaBetaSelectionWidget(qt.QWidget):
|
|
498
513
|
from_=values.min(), to_=values.max(), step_=step
|
499
514
|
)
|
500
515
|
)
|
516
|
+
|
517
|
+
def getPaddingType(self):
|
518
|
+
return self._mainWindow.getPaddingType()
|
519
|
+
|
520
|
+
def setPaddingType(self, padding_type: str):
|
521
|
+
self._mainWindow.setPaddingType(padding_type=padding_type)
|
522
|
+
|
523
|
+
def getUnsharpCoeff(self) -> float:
|
524
|
+
return self._mainWindow.getUnsharpCoeff()
|
525
|
+
|
526
|
+
def setUnsharpCoeff(self, coeff) -> float:
|
527
|
+
return self._mainWindow.setUnsharpCoeff(coeff=coeff)
|
528
|
+
|
529
|
+
def getUnsharpSigma(self) -> float:
|
530
|
+
return self._mainWindow.getUnsharpSigma()
|
531
|
+
|
532
|
+
def setUnsharpSigma(self, sigma):
|
533
|
+
self._mainWindow.setUnsharpSigma(sigma=sigma)
|
@@ -71,12 +71,5 @@ class ControlWidget(qt.QWidget):
|
|
71
71
|
self.layout().addWidget(self._buttons)
|
72
72
|
|
73
73
|
# make connection
|
74
|
-
self._computeBut.pressed.connect(self.
|
75
|
-
self._applyBut.pressed.connect(self.
|
76
|
-
|
77
|
-
def _needComputation(self, *arg, **kwargs):
|
78
|
-
"""callback when the radio line changed"""
|
79
|
-
self.sigComputationRequest.emit()
|
80
|
-
|
81
|
-
def _validate(self):
|
82
|
-
self.sigValidateRequest.emit()
|
74
|
+
self._computeBut.pressed.connect(self.sigComputationRequest)
|
75
|
+
self._applyBut.pressed.connect(self.sigValidateRequest)
|