From ac135cedf28021757c74bc175561db9b7179ead3 Mon Sep 17 00:00:00 2001 From: Juan Nunez-Iglesias Date: Fri, 23 Feb 2024 01:35:22 +0100 Subject: [PATCH] Restore missed points affine setting in callback (#94) In #58, we forgot to also propagate the affine transformation to the moving points layer. This PR fixes that. --- src/affinder/affinder.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/affinder/affinder.py b/src/affinder/affinder.py index 8b51026..b2820d5 100644 --- a/src/affinder/affinder.py +++ b/src/affinder/affinder.py @@ -84,6 +84,9 @@ def next_layer_callback( moving_image_layer.affine = convert_affine_to_ndims( (ref_mat @ mat.params), moving_image_layer.ndim ) + moving_points_layer.affine = convert_affine_to_ndims( + (ref_mat @ mat.params), moving_image_layer.ndim + ) if output is not None: np.savetxt(output, np.asarray(mat.params), delimiter=',') viewer.layers.selection.active = reference_points_layer