-
Notifications
You must be signed in to change notification settings - Fork 2
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
Collect and apply field maps #79
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.59% 30.56% -0.04%
==========================================
Files 26 27 +1
Lines 2363 2405 +42
Branches 286 291 +5
==========================================
+ Hits 723 735 +12
- Misses 1617 1646 +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 <[email protected]>
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 <[email protected]>
@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. |
Closes #63. Once this is working, I'll copy over the changes to
fmripost_template
.Changes proposed in this pull request