-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
♻️ Refactor niworkflow-ants
for skullstripping
#1403
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…n_wf` instead of maintaining our own copy Ref https://stackoverflow.com/a/41863728/7868821 Co-authored-by: Martin Valgur <martin.valgur@gmail.com> Co-authored-by: Dave Beazley <dave@dabeaz.com>
Modified from https://github.com/cookpa/antsInstallExample/blob/master/installANTs.sh Co-authored-by: Philip Cook <cookpa@pennmedicine.upenn.edu>
ANTs upgrade still in progress. Needs a newer version of ANTs than is available as an apt-install in Neurodebian (fmriprep installs ANTs from Dropbox) |
Co-authored-by: Lei Ai <ailei0801@gmail.com>
Great work so far! |
We can revisit this later if we want to, but this didn't help with the issues it intended to fix, so closing unmerged for now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes
(maybe) Fixes #1338 by @shnizzedy
(maybe) Fixes #1362 by @shnizzedy
Description
niworkflows-ants
from niworkflows v0.10.2 with a monkeypatched (see "technical details" below)niworklfows-ants
from niworkflows v1.3.2Technical details
niworkflows-ants has updated 4 times
(
)
since we reproduced their code here 15 months ago (Aug 19, 2019, niworkflows v0.10.2). This PR brings us up to date with niworkflows-ants from niworkflows v1.3.2 (Nov 5, 2020).
Monkeypatch
Up until this PR, we've been maintaining a copy of
niworkflows-ants
instead of importing directly fromniworkflows
because niworkflows requires a string name of a templateflow templatewhereas we want to use three local paths
C-PAC/CPAC/anat_preproc/ants.py
Lines 114 to 121 in e98e276
Instead of updating and continuing to maintain our own copy of niworkflows/anat/ants.py, we now have our own functions
get_template
andget_template_specs
C-PAC/CPAC/anat_preproc/ants.py
Lines 17 to 66 in e98e276
get_template
get_template_specs
Replacing
from ..utils.misc import get_template_specs
withfrom CPAC.anat_preproc.ants import get_template_specs
andfrom templateflow.api import get as get_template
withfrom CPAC.anat_preproc.ants import get_template
C-PAC/CPAC/anat_preproc/ants.py
Lines 187 to 191 in e98e276
C-PAC/requirements.txt
Line 13 in 7d31143
init_brain_extraction_wf
skullstrip_anatomical
For comparison, here's
niworkflows-ants
outside of C-PAC:Upgrade ANTs
Running from that upgrade resulted in
so this PR also upgrades ANTs (to v2.3.4 from v2.1.0).
Tests
C-PAC/CPAC/anat_preproc/ants.py
Lines 133 to 147 in e98e276
Checklist
Update index.md
).develop
branch of the repository.visible errors.
Developer Certificate of Origin
Developer Certificate of Origin