tomwer 1.4.2__py3-none-any.whl → 1.4.3__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.
@@ -445,13 +445,47 @@ def interpret_tomwer_configuration(config: dict, scan: TomwerScanBase | None) ->
445
445
  return nabu_config
446
446
 
447
447
  if "tomwer_slices" in config and scan is not None:
448
+ reconstruction_axis = NabuPlane.from_value(
449
+ config.get("reconstruction", {}).get("slice_plane", "XY")
450
+ )
448
451
  slices = list(
449
452
  NabuSliceMode.getSlices(
450
453
  config["tomwer_slices"],
451
454
  scan=scan,
452
- axis=config.get("reconstruction", {}).get("slice_plane", "XY"),
455
+ axis=reconstruction_axis,
456
+ )
457
+ )
458
+
459
+ def filter_slice(slice_index: int, axis: NabuPlane):
460
+ """remove slices that 'cannot' be reconstructed (out of bounds)"""
461
+ if axis is NabuPlane.XY:
462
+ index_max = scan.dim_2
463
+ elif axis in (NabuPlane.XZ, NabuPlane.YZ):
464
+ index_max = scan.dim_1
465
+ else:
466
+ raise ValueError
467
+
468
+ if index_max is None:
469
+ return True
470
+
471
+ index_max = index_max - 1
472
+
473
+ if slice_index > index_max:
474
+ _logger.error(
475
+ f"slice index {slice_index} requested. But slice index must be in 0-{index_max} - ignore this request"
476
+ )
477
+ return False
478
+ return True
479
+
480
+ slices = list(
481
+ filter(
482
+ lambda slice_index: filter_slice(
483
+ int(slice_index), axis=reconstruction_axis
484
+ ),
485
+ slices,
453
486
  )
454
487
  )
488
+
455
489
  else:
456
490
  slices = []
457
491
 
@@ -464,17 +498,6 @@ def interpret_tomwer_configuration(config: dict, scan: TomwerScanBase | None) ->
464
498
  else:
465
499
  pag_dbs = (None,)
466
500
 
467
- # remove slices that 'cannot' be reconstructed (out of bounds)
468
- def filter_slice(slice_index: int):
469
- if scan.dim_2 is not None and slice_index > scan.dim_2:
470
- _logger.error(
471
- f"slice index {slice_index} requested. But slice index must be in 0-{scan.dim_2} - ignore this request"
472
- )
473
- return False
474
- return True
475
-
476
- slices = list(filter(lambda slice_index: filter_slice(int(slice_index)), slices))
477
-
478
501
  # by default add the slice 'None' which is the slice for the volume
479
502
  slices.append(None)
480
503
  nabu_config = get_nabu_config(config=config)
tomwer/version.py CHANGED
@@ -77,7 +77,7 @@ RELEASE_LEVEL_VALUE = {
77
77
 
78
78
  MAJOR = 1
79
79
  MINOR = 4
80
- MICRO = 2
80
+ MICRO = 3
81
81
  RELEV = "final" # <16
82
82
  SERIAL = 0 # <16
83
83
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tomwer
3
- Version: 1.4.2
3
+ Version: 1.4.3
4
4
  Summary: "tomography workflow tools"
5
5
  Home-page: https://gitlab.esrf.fr/tomotools/tomwer
6
6
  Author: Henri Payno, Pierre Paleo, Pierre-Olivier Autran, Jérôme Lesaint, Alessandro Mirone
@@ -220,7 +220,7 @@ orangecontrib/tomwer/widgets/visualization/tests/__init__.py,sha256=47DEQpj8HBSa
220
220
  tomwer/__init__.py,sha256=GeLSeY4__z-HQZu1y4ptZ5Y1OeXFvG8kuEwWXhkeaMA,360
221
221
  tomwer/__main__.py,sha256=7tCADiS4u7k1PCxFhlRAcYSIOpxQTGUTx8sCEQ-hi1E,8707
222
222
  tomwer/utils.py,sha256=7h7dEgKAEUmQ43jkULvC1B9Adl55nkCty-SEKUKCl4U,7008
223
- tomwer/version.py,sha256=Ut5Y5Pzhf7aqEi5CMCIwsyq_OqFINJdLxd0lcDcQ7js,4386
223
+ tomwer/version.py,sha256=a1loEqEj9NVb3IVtlWL8YHxJkt3I_gA4e_oclG0NANo,4386
224
224
  tomwer/app/__init__.py,sha256=RYMB2YhbQaoMXC8W-oOyfZ_Y1vmHD7L13YkKeAMuShM,85
225
225
  tomwer/app/axis.py,sha256=OhDgMj_gS-45PnjKBTyOCOkmZ1Iy-Tb6Dj66mzQg0sU,5827
226
226
  tomwer/app/canvas.py,sha256=sM368nniUwbQXLA-oNCg1iNwMMol_ZGTKbiw8WsC4yw,1539
@@ -336,7 +336,7 @@ tomwer/core/process/reconstruction/nabu/castvolume.py,sha256=4VEVnJxWfG8_Ku2uhUS
336
336
  tomwer/core/process/reconstruction/nabu/helical.py,sha256=gauUkoPiShvnvMQrCQXv28g0yLe-GceML5kYMSXmNIg,1997
337
337
  tomwer/core/process/reconstruction/nabu/nabucommon.py,sha256=s1KxEzHQJ09JEWP3_EvKFe51k1boi_a8YRlbs3TppdE,23338
338
338
  tomwer/core/process/reconstruction/nabu/nabuscores.py,sha256=e5tRG1QtmVAdXb8KHMTMtBXA3KQXqKKcqipY2HzMURg,25275
339
- tomwer/core/process/reconstruction/nabu/nabuslices.py,sha256=sUpU1f6_qWbuKVUDNattFVvFE88By29f3CtTCtuKT-k,31517
339
+ tomwer/core/process/reconstruction/nabu/nabuslices.py,sha256=WAmNlfyRWL0zhEE8jMjMg7WyzPM4BcBA6bWpaH8O53A,32101
340
340
  tomwer/core/process/reconstruction/nabu/nabuvolume.py,sha256=Fn0tkPDTDJQaMEJA4LzpPp0ZtG4MIu9YN82-jesxRKo,20052
341
341
  tomwer/core/process/reconstruction/nabu/plane.py,sha256=366gWprWw8Rlob8jsMn753CqgudruvvVauU0ihH2lU4,400
342
342
  tomwer/core/process/reconstruction/nabu/settings.py,sha256=3AJpxVQbJziw4v6F26Ppz8Q9vc9ZNepTWygqpCAbIEM,955
@@ -903,9 +903,9 @@ tomwer/tests/orangecontrib/tomwer/widgets/visualization/tests/test_volume_viewer
903
903
  tomwer/tests/test_ewoks/test_conversion.py,sha256=a8cEWbErXiFCAkaapi0jeEoRKYxcFQCoa-Jr_u77_OM,3656
904
904
  tomwer/tests/test_ewoks/test_single_node_execution.py,sha256=YBUHfiAnkciv_kjj7biC5fOs7c7ofNImM_azGMn4LZM,2813
905
905
  tomwer/tests/test_ewoks/test_workflows.py,sha256=Eq80eexf5NVL7SzvwctLOaUeuQ8V3vDiFiHgbJA4Yb8,4871
906
- tomwer-1.4.2.dist-info/LICENSE,sha256=62p1wL0n9WMTu8x2YDv0odYgTqeSvTd9mQ0v6Mq7lzE,1876
907
- tomwer-1.4.2.dist-info/METADATA,sha256=0YX0nYm5b6VVBEgnLOx-vDB7Hermd6Q0lDpus2rD-tc,13377
908
- tomwer-1.4.2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
909
- tomwer-1.4.2.dist-info/entry_points.txt,sha256=py3ZUWvGnWGc5c7Yhw_uBTm8Fmew0BDw3aQZnWMBNZI,500
910
- tomwer-1.4.2.dist-info/top_level.txt,sha256=Yz5zKh0FPiImtzHYcPuztG1AO8-6KEpUWgoChGbA0Ys,21
911
- tomwer-1.4.2.dist-info/RECORD,,
906
+ tomwer-1.4.3.dist-info/LICENSE,sha256=62p1wL0n9WMTu8x2YDv0odYgTqeSvTd9mQ0v6Mq7lzE,1876
907
+ tomwer-1.4.3.dist-info/METADATA,sha256=Ld2sbq0AQqYvZRs3bw6o5BjDIzkFYxLOMzOXiANnUiY,13377
908
+ tomwer-1.4.3.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
909
+ tomwer-1.4.3.dist-info/entry_points.txt,sha256=py3ZUWvGnWGc5c7Yhw_uBTm8Fmew0BDw3aQZnWMBNZI,500
910
+ tomwer-1.4.3.dist-info/top_level.txt,sha256=Yz5zKh0FPiImtzHYcPuztG1AO8-6KEpUWgoChGbA0Ys,21
911
+ tomwer-1.4.3.dist-info/RECORD,,
File without changes