Skip to content

Commit 4bd4962

Browse files
author
David Ellis
committed
FIX: Allows for changing of RB atlas
1 parent 291bafd commit 4bd4962

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

nipype/workflows/smri/freesurfer/recon.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ def create_reconall_workflow(name="ReconAll", plugin_args=None,
146146
stop = 0.0001
147147
exvivo = True
148148
entorhinal = True
149+
rb_date = "2014-08-21"
149150
else:
150151
# 5.3 is default
151152
if 'v5.3' in fs_version_full:
@@ -161,6 +162,7 @@ def create_reconall_workflow(name="ReconAll", plugin_args=None,
161162
stop = None
162163
exvivo = False
163164
entorhinal = False
165+
rb_date = "2008-03-26"
164166

165167
print("FreeSurfer Version: {0}".format(fs_version))
166168

@@ -179,7 +181,8 @@ def setconfig(reg_template=None,
179181
color_table=None,
180182
lookup_table=None,
181183
wm_lookup_table=None,
182-
awk_file=None):
184+
awk_file=None,
185+
rb_date=rb_date):
183186
"""Set optional configurations to the default"""
184187
from nipype.workflows.smri.freesurfer.utils import getdefaultconfig
185188
def checkarg(arg, default):
@@ -188,7 +191,7 @@ def checkarg(arg, default):
188191
return arg
189192
else:
190193
return default
191-
defaultconfig = getdefaultconfig(exitonfail=True)
194+
defaultconfig = getdefaultconfig(exitonfail=True, rb_date=rb_date)
192195
# set the default template and classifier files
193196
reg_template = checkarg(reg_template, defaultconfig['registration_template'])
194197
reg_template_withskull = checkarg(reg_template_withskull,

nipype/workflows/smri/freesurfer/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ def mkdir_p(path):
420420
else:
421421
raise
422422

423-
def getdefaultconfig(exitonfail=False):
423+
def getdefaultconfig(exitonfail=False, rb_date="2014-08-21"):
424424
config = { 'custom_atlas' : None,
425425
'cw256' : False,
426426
'field_strength' : '1.5T',
@@ -440,9 +440,9 @@ def getdefaultconfig(exitonfail=False):
440440
config['awk_file'] = os.path.join(config['fs_home'], 'bin',
441441
'extract_talairach_avi_QA.awk')
442442
config['registration_template'] = os.path.join(config['fs_home'], 'average',
443-
'RB_all_2014-08-21.gca')
443+
'RB_all_{0}.gca'.format(rb_date))
444444
config['registration_template_withskull'] = os.path.join(config['fs_home'], 'average',
445-
'RB_all_withskull_2014-08-21.gca')
445+
'RB_all_withskull_{0}.gca'.format(rb_date))
446446
for hemi in ('lh', 'rh'):
447447
config['{0}_atlas'.format(hemi)] = os.path.join(
448448
config['fs_home'], 'average',

0 commit comments

Comments
 (0)