Skip to content

Commit 1b95329

Browse files
author
David Ellis
committed
FIX: Temporary fix for apas2aseg. Will still need to fix what is going wrong with aseg.mgz.
1 parent 37fd56c commit 1b95329

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

nipype/workflows/smri/freesurfer/autorecon3.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from .ba_maps import create_ba_maps_wf
77
from .utils import createsrcsubj
88
from nipype.interfaces.io import DataGrabber
9+
from .utils import copy_file
910

1011
def create_AutoRecon3(name="AutoRecon3", qcache=False, plugin_args=None,
1112
th3=True, exvivo=True, entorhinal=True, fsvernum=5.3):
@@ -600,9 +601,17 @@ def create_AutoRecon3(name="AutoRecon3", qcache=False, plugin_args=None,
600601
(relabel_hypos, aparc_2_aseg_2009, [('out_file', 'aseg')])
601602
])
602603

603-
apas_2_aseg = pe.Node(Apas2Aseg(), name="Apas_2_Aseg")
604+
if fsvernum > 6:
605+
apas_2_aseg = pe.Node(Apas2Aseg(), name="Apas_2_Aseg")
606+
else:
607+
apas_2_aseg = pe.Node(Function(['in_file', 'out_file'],
608+
['out_file'],
609+
copy_file),
610+
name="Copy2Aseg")
611+
612+
ar3_wf.connect([(aparc_2_aseg, apas_2_aseg, [('out_file', 'in_file')])])
604613
apas_2_aseg.inputs.out_file = "aseg.mgz"
605-
ar3_wf.connect([(aparc_2_aseg, apas_2_aseg, [('out_file', 'in_file')])])
614+
606615

607616
# Segmentation Stats
608617
"""

0 commit comments

Comments
 (0)