From eb3fbb7d754726be6b46d0dcf146b7af48af4d9b Mon Sep 17 00:00:00 2001 From: ravih18 Date: Wed, 20 Nov 2024 14:13:26 +0100 Subject: [PATCH] correct clip threshold --- clinica/pipelines/pet/linear/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clinica/pipelines/pet/linear/utils.py b/clinica/pipelines/pet/linear/utils.py index ab1e0ff23..f3f629853 100644 --- a/clinica/pipelines/pet/linear/utils.py +++ b/clinica/pipelines/pet/linear/utils.py @@ -205,7 +205,7 @@ def clip_img( unique, counts = np.unique( pet_image.get_fdata().reshape(-1), axis=0, return_counts=True ) - clip_threshold = min(0.0, unique[np.argmax(counts)]) + clip_threshold = max(0.0, unique[np.argmax(counts)]) data = np.clip( pet_image.get_fdata(dtype="float32"), a_min=clip_threshold, a_max=None