Skip to content

Commit

Permalink
correct clip threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
ravih18 committed Nov 20, 2024
1 parent 9eef928 commit eb3fbb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clinica/pipelines/pet/linear/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eb3fbb7

Please sign in to comment.