Skip to content

Commit

Permalink
Merge pull request #195 from chrisfilo/fix/epi_mean
Browse files Browse the repository at this point in the history
[RTM] reuse existing mean
  • Loading branch information
Shoshana Berleant committed Dec 4, 2016
2 parents 2db10f7 + 6210919 commit 75b7cdf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions fmriprep/workflows/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def wf_ds054_type(subject_data, settings, name='fMRI_prep'):
(sbref_pre, epi2sbref, [('outputnode.sbref_unwarped', 'inputnode.sbref_brain'),
('outputnode.sbref_unwarped_mask', 'inputnode.sbref_brain_mask')]),
(hmcwf, epi2sbref, [('outputnode.epi_brain', 'inputnode.epi_brain')]),
(hmcwf, epi2sbref, [('outputnode.epi_mean', 'inputnode.epi_mean')]),
(hmcwf, epi2sbref, [('inputnode.epi', 'inputnode.epi')]),
(hmcwf, epiunwarp_wf, [('inputnode.epi', 'inputnode.epi')]),
(fmap_est, epiunwarp_wf, [('outputnode.fmap', 'inputnode.fmap'),
Expand Down
6 changes: 2 additions & 4 deletions fmriprep/workflows/epi.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,13 +275,12 @@ def epi_sbref_registration(settings, name='EPI_SBrefRegistration'):
workflow = pe.Workflow(name=name)
inputnode = pe.Node(
niu.IdentityInterface(fields=['epi', 'epi_brain', 'sbref_brain',
'sbref_brain_mask']),
'epi_mean', 'sbref_brain_mask']),
name='inputnode'
)
outputnode = pe.Node(niu.IdentityInterface(
fields=['epi_registered', 'out_mat', 'out_mat_inv']), name='outputnode')

mean = pe.Node(fsl.MeanImage(dimension='T'), name='EPImean')
inu = pe.Node(ants.N4BiasFieldCorrection(dimension=3), name='EPImeanBias')
epi_sbref = pe.Node(FLIRTRPT(generate_report=True, dof=6,
out_matrix_file='init.mat',
Expand All @@ -307,8 +306,7 @@ def epi_sbref_registration(settings, name='EPI_SBrefRegistration'):
(inputnode, epi_split, [('epi_brain', 'in_file')]),
(inputnode, epi_sbref, [('sbref_brain', 'reference')]),
(inputnode, epi_xfm, [('sbref_brain', 'reference')]),
(inputnode, mean, [('epi_brain', 'in_file')]),
(mean, inu, [('out_file', 'input_image')]),
(inputnode, inu, [('epi_mean', 'input_image')]),
(inu, epi_sbref, [('output_image', 'in_file')]),

(epi_split, epi_xfm, [('out_files', 'in_file')]),
Expand Down

0 comments on commit 75b7cdf

Please sign in to comment.