Skip to content

Commit

Permalink
fix: use correct interpolation for affine correction while space warp…
Browse files Browse the repository at this point in the history
…ing in ParcellationRegistry.get
  • Loading branch information
synchon committed Dec 4, 2024
1 parent a67eb9b commit 3e3308e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion junifer/data/parcellations/_parcellations.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,11 @@ def get(
# Remove extra dimension added by ANTs
img = image.math_img("np.squeeze(img)", img=raw_img)
# Set correct affine as resolution won't be correct
img = image.resample_img(img, target_affine=target_img.affine)
img = image.resample_img(
img=img,
target_affine=target_img.affine,
interpolation="nearest",
)
else:
if target_space != "native":
# No warping is going to happen, just resampling, because
Expand Down

0 comments on commit 3e3308e

Please sign in to comment.