Skip to content

Commit 77ca62f

Browse files
authored
Merge pull request #1106 from effigies/enh/ccfm_rf
[ENH] Add constrained cost-function masking to T1-MNI registration
2 parents 397f1ac + a0f46bc commit 77ca62f

File tree

7 files changed

+11
-4
lines changed

7 files changed

+11
-4
lines changed

docs/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ dependencies:
2828
- svgutils
2929
- nitime
3030
- nilearn
31-
- niworkflows>=0.3.11
31+
- git+https://github.com/poldracklab/niworkflows.git@e2b93ecdc7b6e52ee02466bf5d3be5bdb6d33beb#egg=niworkflows-0.3.12-dev

fmriprep/info.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@
8080
]
8181

8282
LINKS_REQUIRES = [
83+
'git+https://github.com/poldracklab/niworkflows.git@'
84+
'e2b93ecdc7b6e52ee02466bf5d3be5bdb6d33beb#egg=niworkflows-0.3.12-dev',
8385
]
8486

8587
TESTS_REQUIRES = [

fmriprep/interfaces/bids.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ class BIDSDataGrabberOutputSpec(TraitedSpec):
105105
bold = OutputMultiPath(desc='output functional images')
106106
sbref = OutputMultiPath(desc='output sbrefs')
107107
t1w = OutputMultiPath(desc='output T1w images')
108+
roi = OutputMultiPath(desc='output ROI images')
108109
t2w = OutputMultiPath(desc='output T2w images')
109110
flair = OutputMultiPath(desc='output FLAIR images')
110111

@@ -148,7 +149,7 @@ def _run_interface(self, runtime):
148149
raise FileNotFoundError('No functional images found for subject sub-{}'.format(
149150
self.inputs.subject_id))
150151

151-
for imtype in ['bold', 't2w', 'flair', 'fmap', 'sbref']:
152+
for imtype in ['bold', 't2w', 'flair', 'fmap', 'sbref', 'roi']:
152153
if not bids_dict[imtype]:
153154
LOGGER.warn('No \'{}\' images found for sub-{}'.format(
154155
imtype, self.inputs.subject_id))

fmriprep/utils/bids.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ def collect_data(dataset, participant_label, task=None):
165165
'extensions': ['nii', 'nii.gz']},
166166
't1w': {'subject': participant_label, 'type': 'T1w',
167167
'extensions': ['nii', 'nii.gz']},
168+
'roi': {'subject': participant_label, 'type': 'roi',
169+
'extensions': ['nii', 'nii.gz']},
168170
}
169171

170172
if task:

fmriprep/workflows/anatomical.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def init_anat_preproc_wf(skull_strip_template, output_spaces, template, debug,
177177
workflow = pe.Workflow(name=name)
178178

179179
inputnode = pe.Node(
180-
niu.IdentityInterface(fields=['t1w', 't2w', 'flair', 'subjects_dir', 'subject_id']),
180+
niu.IdentityInterface(fields=['t1w', 't2w', 'roi', 'flair', 'subjects_dir', 'subject_id']),
181181
name='inputnode')
182182
outputnode = pe.Node(niu.IdentityInterface(
183183
fields=['t1_preproc', 't1_brain', 't1_mask', 't1_seg', 't1_tpms',
@@ -302,6 +302,7 @@ def init_anat_preproc_wf(skull_strip_template, output_spaces, template, debug,
302302
mni_tpms.inputs.reference_image = ref_img
303303

304304
workflow.connect([
305+
(inputnode, t1_2_mni, [('roi', 'lesion_mask')]),
305306
(skullstrip_ants_wf, t1_2_mni, [('outputnode.bias_corrected', 'moving_image')]),
306307
(buffernode, t1_2_mni, [('t1_mask', 'moving_mask')]),
307308
(buffernode, mni_mask, [('t1_mask', 'input_image')]),

fmriprep/workflows/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ def init_single_subject_wf(subject_id, task_id, name,
419419
(bids_info, summary, [('subject_id', 'subject_id')]),
420420
(bidssrc, anat_preproc_wf, [('t1w', 'inputnode.t1w'),
421421
('t2w', 'inputnode.t2w'),
422+
('roi', 'inputnode.roi'),
422423
('flair', 'inputnode.flair')]),
423424
(summary, anat_preproc_wf, [('subject_id', 'inputnode.subject_id')]),
424425
(bidssrc, ds_summary_report, [(('t1w', fix_multi_T1w_source_name), 'source_file')]),

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
niworkflows>=0.3.11
1+
git+https://github.com/poldracklab/niworkflows.git@e2b93ecdc7b6e52ee02466bf5d3be5bdb6d33beb#egg=niworkflows-0.3.12-dev
22
versioneer

0 commit comments

Comments
 (0)