Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH]: Allow BOLDWarper to warp between MNI spaces #302

Merged
merged 10 commits into from
Feb 21, 2024
Prev Previous commit
Next Next commit
update: remove space restriction in BOLDWarper
  • Loading branch information
synchon committed Feb 16, 2024
commit 6db58feaeece8f647642d9d6e314894fff3f0162
13 changes: 2 additions & 11 deletions junifer/preprocess/bold_warper.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
)

import nibabel as nib
from templateflow import api as tflow

from ..api.decorators import register_preprocessor
from ..data import get_template, get_xfm
Expand Down Expand Up @@ -64,17 +65,7 @@ def __init__(self, reference: str) -> None:
super().__init__(
on="BOLD", required_data_types=["BOLD", self.ref, "Warp"]
)
elif self.ref in [
"MNI152Lin",
"MNI152NLin6Sym",
"MNI152NLin6Asym",
"MNI152NLin2009aSym",
"MNI152NLin2009aAsym",
"MNI152NLin2009bSym",
"MNI152NLin2009bAsym",
"MNI152NLin2009cAsym",
"MNI152NLin2009cAsym",
]:
elif self.ref in tflow.templates():
super().__init__(on="BOLD", required_data_types=["BOLD"])
else:
raise_error(f"Unknown reference: {self.ref}")
Expand Down
Loading