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.
- tomwer/core/process/reconstruction/nabu/nabuslices.py +35 -12
- tomwer/version.py +1 -1
- {tomwer-1.4.2.dist-info → tomwer-1.4.3.dist-info}/METADATA +1 -1
- {tomwer-1.4.2.dist-info → tomwer-1.4.3.dist-info}/RECORD +8 -8
- {tomwer-1.4.2.dist-info → tomwer-1.4.3.dist-info}/LICENSE +0 -0
- {tomwer-1.4.2.dist-info → tomwer-1.4.3.dist-info}/WHEEL +0 -0
- {tomwer-1.4.2.dist-info → tomwer-1.4.3.dist-info}/entry_points.txt +0 -0
- {tomwer-1.4.2.dist-info → tomwer-1.4.3.dist-info}/top_level.txt +0 -0
@@ -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=
|
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
@@ -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=
|
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=
|
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.
|
907
|
-
tomwer-1.4.
|
908
|
-
tomwer-1.4.
|
909
|
-
tomwer-1.4.
|
910
|
-
tomwer-1.4.
|
911
|
-
tomwer-1.4.
|
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
|
File without changes
|
File without changes
|
File without changes
|