From 08f8efd2fe3d84027e1ed2e400563ea4a5604415 Mon Sep 17 00:00:00 2001 From: Tomas Farago Date: Mon, 3 Nov 2025 17:03:57 +0100 Subject: [PATCH] Add cubic interpolation --- bin/tofu | 1 - tofu/config.py | 5 +++++ tofu/reco.py | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/tofu b/bin/tofu index f9c8e8c..483e100 100755 --- a/bin/tofu +++ b/bin/tofu @@ -191,7 +191,6 @@ def main(): version='%(prog)s {}'.format(__version__)) sino_params = ('flat-correction', 'sinos') - reco_params = ('flat-correction', 'reconstruction') tomo_params = config.TOMO_PARAMS lamino_params = config.LAMINO_PARAMS gui_params = tomo_params + ('gui', ) diff --git a/tofu/config.py b/tofu/config.py index 27ce12d..e19f549 100644 --- a/tofu/config.py +++ b/tofu/config.py @@ -293,6 +293,11 @@ 'type': float, 'unit': "rad", 'help': "Angle offset of first projection"}, + 'interpolation': { + 'default': "cubic", + 'type': str, + 'help': "Interpolation method (texture is actually linear, but implemented differently)", + 'choices': ['nearest', 'texture', 'linear', 'cubic']}, 'method': { 'default': 'fbp', 'type': str, diff --git a/tofu/reco.py b/tofu/reco.py index e8dae76..70edfd9 100644 --- a/tofu/reco.py +++ b/tofu/reco.py @@ -100,6 +100,7 @@ def tomo(params): bp = get_task('backproject', axis_pos=axis) last_node = bp + bp.props.mode = params.interpolation if params.angle: bp.props.angle_step = params.angle