From 654cd09380411eb2cb907b4f83d82f74be382bdb Mon Sep 17 00:00:00 2001 From: Thomas Sanchez Date: Mon, 22 Apr 2024 13:53:20 +0200 Subject: [PATCH] Fixed a typo in cropping range function --- fetal_brain_utils/cropping.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fetal_brain_utils/cropping.py b/fetal_brain_utils/cropping.py index 218972e..46dc0ad 100644 --- a/fetal_brain_utils/cropping.py +++ b/fetal_brain_utils/cropping.py @@ -166,7 +166,7 @@ def get_rectangular_masked_region( ran = np.nonzero(sum_mask)[0] low = np.max([0, ran[0]]) - high = np.min([shape[0], ran[-1] + 1]) + high = np.min([shape[i], ran[-1] + 1]) range_list.append(np.array([low, high]).astype(int)) return range_list