Skip to content

Commit

Permalink
Restore missed points affine setting in callback (#94)
Browse files Browse the repository at this point in the history
In #58, we forgot to also propagate the affine transformation to the
moving
points layer. This PR fixes that.
  • Loading branch information
jni authored Feb 23, 2024
1 parent 68eb9e9 commit ac135ce
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/affinder/affinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ac135ce

Please sign in to comment.