Skip to content

Commit a6850ce

Browse files
ellisdgDavid Ellis
authored andcommitted
FIX: Removes in_aseg from ribbon masking.
1 parent 759f52e commit a6850ce

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

nipype/interfaces/freesurfer/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2363,7 +2363,8 @@ def run(self, **inputs):
23632363
copy2subjdir(self, self.inputs.rh_pial, 'surf', 'rh.pial')
23642364
copy2subjdir(self, self.inputs.lh_white, 'surf', 'lh.white')
23652365
copy2subjdir(self, self.inputs.rh_white, 'surf', 'rh.white')
2366-
copy2subjdir(self, self.inputs.in_aseg, 'mri')
2366+
if isdefined(self.inputs.in_aseg):
2367+
copy2subjdir(self, self.inputs.in_aseg, 'mri')
23672368
return super(VolumeMask, self).run(**inputs)
23682369

23692370
def _format_arg(self, name, spec, value):

nipype/workflows/smri/freesurfer/autorecon3.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from nipype.interfaces.io import DataGrabber
99

1010
def create_AutoRecon3(name="AutoRecon3", qcache=False, plugin_args=None,
11-
th3=True, exvivo=True, entorhinal=True):
11+
th3=True, exvivo=True, entorhinal=True, fsvernum=5.3):
1212

1313
# AutoRecon3
1414
# Workflow
@@ -274,14 +274,15 @@ def create_AutoRecon3(name="AutoRecon3", qcache=False, plugin_args=None,
274274
volume_mask.inputs.copy_inputs = True
275275

276276

277-
ar3_wf.connect([(inputspec, volume_mask, [('aseg_presurf', 'in_aseg'),
278-
('lh_white', 'lh_white'),
279-
('rh_white', 'rh_white'),
280-
]),
277+
ar3_wf.connect([(inputspec, volume_mask, [('lh_white', 'lh_white'),
278+
('rh_white', 'rh_white')]),
281279
(ar3_lh_wf1, volume_mask, [('outputspec.pial', 'lh_pial')]),
282280
(ar3_rh_wf1, volume_mask, [('outputspec.pial', 'rh_pial')]),
283281
])
284282

283+
if fsvernum > 6:
284+
ar3_wf.connect([(inputpsec, volume_mask, [('aseg_presurf', 'in_aseg')])])
285+
285286
ar3_lh_wf2 = pe.Workflow(name="AutoRecon3_Left_2")
286287
ar3_rh_wf2 = pe.Workflow(name="AutoRecon3_Right_2")
287288

nipype/workflows/smri/freesurfer/recon.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,8 @@ def checkarg(arg, default):
274274

275275
# create AutoRecon3
276276
ar3_wf, ar3_outputs = create_AutoRecon3(plugin_args=plugin_args, th3=th3,
277-
exvivo=exvivo, entorhinal=entorhinal)
277+
exvivo=exvivo, entorhinal=entorhinal,
278+
fsvernum=fsvernum)
278279
# connect inputs for AutoRecon3
279280
reconall.connect([(config_node, ar3_wf, [('lh_atlas', 'inputspec.lh_atlas'),
280281
('rh_atlas', 'inputspec.rh_atlas'),

0 commit comments

Comments
 (0)