From 8d57500307d92188b4fe997bed3af2a3b4f47610 Mon Sep 17 00:00:00 2001 From: IvanARashid Date: Tue, 10 Dec 2024 10:39:15 +0100 Subject: [PATCH] Changed to dictionary outputs from osipi_fit --- WrapImage/nifti_wrapper.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/WrapImage/nifti_wrapper.py b/WrapImage/nifti_wrapper.py index 6f43792..150e610 100644 --- a/WrapImage/nifti_wrapper.py +++ b/WrapImage/nifti_wrapper.py @@ -109,10 +109,10 @@ def loop_over_first_n_minus_1_dimensions(arr): n = data.ndim total_iteration = np.prod(data.shape[:n-1]) for idx, view in tqdm(loop_over_first_n_minus_1_dimensions(data), desc=f"{args.algorithm} is fitting", dynamic_ncols=True, total=total_iteration): - [f_fit, Dp_fit, D_fit] = fit.osipi_fit(view, bvals) - f_image.append(f_fit) - Dp_image.append(Dp_fit) - D_image.append(D_fit) + fit_result = fit.osipi_fit(view, bvals) + f_image.append(fit_result["f"]) + Dp_image.append(fit_result["D*"]) + D_image.append(fit_result["D"]) # Convert lists to NumPy arrays f_image = np.array(f_image)