Skip to content

Commit

Permalink
let scipy take care of inverting translation
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandrofelder committed Aug 16, 2024
1 parent 9de1c5a commit 3dfca3b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions brainglobe_template_builder/preproc/transform_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ def apply_transform(

transformed = affine_transform(
data,
np.linalg.inv(transform[:3, :3]),
offset=-transform[:3, 3],
np.linalg.inv(transform),
)
# Preserve original data range and type
transformed = np.clip(transformed, data.min(), data.max())
Expand Down

0 comments on commit 3dfca3b

Please sign in to comment.