From 82dcb250c50f307e6db97f1cf31828df6d5549b6 Mon Sep 17 00:00:00 2001 From: David Rotermund <54365609+davrot@users.noreply.github.com> Date: Tue, 27 Feb 2024 18:18:47 +0100 Subject: [PATCH] Add files via upload --- new_pipeline/functions/perform_donor_volume_rotation.py | 2 ++ new_pipeline/functions/perform_donor_volume_translation.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/new_pipeline/functions/perform_donor_volume_rotation.py b/new_pipeline/functions/perform_donor_volume_rotation.py index 45e58c2..1c9b804 100644 --- a/new_pipeline/functions/perform_donor_volume_rotation.py +++ b/new_pipeline/functions/perform_donor_volume_rotation.py @@ -26,6 +26,7 @@ def perform_donor_volume_rotation( ]: mylogger.info("Calculate rotation between donor data and donor ref image") + angle_donor = calculate_rotation( input=donor, reference_image=ref_image_donor, @@ -43,6 +44,7 @@ def perform_donor_volume_rotation( mylogger.info("Average over both rotations") angle_donor_volume = (angle_donor + angle_volume) / 2.0 + angle_donor_volume *= 0.0 mylogger.info("Rotate acceptor data based on the average rotation") for frame_id in range(0, angle_donor_volume.shape[0]): diff --git a/new_pipeline/functions/perform_donor_volume_translation.py b/new_pipeline/functions/perform_donor_volume_translation.py index bbfe115..0fce44e 100644 --- a/new_pipeline/functions/perform_donor_volume_translation.py +++ b/new_pipeline/functions/perform_donor_volume_translation.py @@ -45,6 +45,8 @@ def perform_donor_volume_translation( mylogger.info("Average over both translations") tvec_donor_volume = (tvec_donor + tvec_volume) / 2.0 + tvec_donor_volume *= 0.0 + mylogger.info("Translate acceptor data based on the average translation vector") for frame_id in range(0, tvec_donor_volume.shape[0]): acceptor[frame_id, ...] = tv.transforms.functional.affine(