diff --git a/neuromaps/resampling.py b/neuromaps/resampling.py index 3e11e942..a74cc372 100644 --- a/neuromaps/resampling.py +++ b/neuromaps/resampling.py @@ -270,6 +270,8 @@ def resample_images(src, trg, src_space, trg_space, method='linear', func = globals()[resampling] src, trg = func(src, trg, src_space, trg_space, hemi=hemi, method=method, **opts) + src, _ = zip(*transforms._check_hemi(src, hemi)) + trg, _ = zip(*transforms._check_hemi(trg, hemi)) src = tuple(load_gifti(s) for s in src) trg = tuple(load_gifti(t) for t in trg) diff --git a/neuromaps/transforms.py b/neuromaps/transforms.py index b38c4e13..28ea7ca1 100644 --- a/neuromaps/transforms.py +++ b/neuromaps/transforms.py @@ -267,14 +267,15 @@ def mni152_to_mni152(img, target='1mm', method='linear'): def _check_hemi(data, hemi): - """ Utility to check that `data` and `hemi` jibe + """ + Utility to check that `data` and `hemi` jibe Parameters ---------- data : str or os.PathLike or tuple Input data hemi : str - Hemisphere(s) corresponding to `data + Hemisphere(s) corresponding to `data` Returns -------