-
Notifications
You must be signed in to change notification settings - Fork 3
Collect and apply field maps #79
New 8000 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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #79 +/- ##
==========================================
- Coverage 30.83% 30.79% -0.04%
==========================================
Files 26 27 +1
Lines 2374 2416 +42
Branches 289 294 +5
==========================================
+ Hits 732 744 +12
- Misses 1619 1648 +29
- Partials 23 24 +1 ☔ View full report in Codecov by Sentry. |
src/fmripost_aroma/workflows/base.py
Outdated
# Warp desc-preproc_fieldmap to boldref space | ||
# Warp the mask as well | ||
fieldmap_to_boldref = pe.Node( | ||
ApplyTransforms(), | ||
name='fieldmap_to_boldref', | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This node needs to go into the bold_MNI6_wf
because you want to resample from fmap to the MNI space.
distortion_params = pe.Node( | ||
DistortionParameters(metadata=metadata), | ||
name='distortion_params', | ||
run_without_submitting=True, | ||
) | ||
workflow.connect([ | ||
(inputnode, fmap_select, [ | ||
('fmap', 'fmap_ref'), | ||
('fmap_id', 'keys'), | ||
]), | ||
(inputnode, distortion_params, [('bold_file', 'in_file')]), | ||
# Inject fieldmap correction into resample node | ||
(fmap_select, resample, [('fmap', 'fieldmap')]), | ||
(distortion_params, resample, [ | ||
('readout_time', 'ro_time'), | ||
('pe_direction', 'pe_dir'), | ||
]), | ||
]) # fmt:skip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the section where you need to resample the fieldmap from fmap space to target space, using the inverse boldref2fmap transform, in addition to the boldref2anat and anat2MNI transforms. Then you pass in the fieldmap in MNI space to resample
.
Co-authored-by: Chris Markiewicz <markiewicz@stanford.edu>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed what I was thinking for resample.py
. Feel free to revert.
Co-authored-by: Chris Markiewicz <markiewicz@stanford.edu>
@effigies thanks for intervening directly on this. I started addressing your review last weekend but got drawn into other things. I'm hoping to test out the changes here soon. |
@tsalo is this working for you? I need to implement it in fMRIPrep... |
I haven't had a chance to try it yet. I might be able to give it a try by the end of the week though. |
Well, I'll implement it over in fMRIPrep and we'll see how I do. Thanks for laying the groundwork! |
Closes #63. Once this is working, I'll copy over the changes to
fmripost_template
.Changes proposed in this pull request