Skip to content

Commit baed706

Browse files
committed
modify example to pass test
1 parent 94836ca commit baed706

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

nipype/interfaces/freesurfer/utils.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,22 +1191,24 @@ class ExtractMainComponent(CommandLine):
11911191

11921192

11931193
class Tkregister2InputSpec(FSTraitedSpec):
1194-
moving_image = File(exists=True, mandatory=True, argstr="--mov %s",
1194+
moving_image = File(exists=True, mandatory=True, argstr="--mov %s",
11951195
desc='moving volume')
1196-
fsl_in_matrix = File(exists=True, argstr="--fsl %s",
1196+
fsl_in_matrix = File(exists=True, argstr="--fsl %s",
11971197
desc='fsl-style registration input matrix')
1198-
subject_id = traits.String(argstr="--s %s", mandatory=True,
1198+
subject_id = traits.String(argstr="--s %s", mandatory=True,
11991199
desc='freesurfer subject ID')
12001200
subjects_dir = traits.Str(argstr='--sd %s',
12011201
desc=('freesurfer subjects directory defaults to $SUBJECTS_DIR'))
12021202
noedit = traits.Bool(True, argstr="--noedit", desc='do not open edit window (exit)', usedefault=True)
1203-
reg_file = File(name_template='%s.dat', name_source='fsl',
1204-
mandatory=True, argstr="--reg %s",
1203+
reg_file = File(name_template='%s.dat', name_source='fsl',
1204+
mandatory=True, argstr="--reg %s",
12051205
desc='freesurfer-style registration file')
12061206

1207+
12071208
class Tkregister2OutputSpec(TraitedSpec):
12081209
reg_file = File(exists=True, desc='freesurfer-style registration file')
12091210

1211+
12101212
class Tkregister2(FSCommand):
12111213
"""Use tkregister2 without the manual editing stage to convert
12121214
FSL-style registration matrix (.mat) to FreeSurfer-style registration matrix (.dat)
@@ -1216,11 +1218,11 @@ class Tkregister2(FSCommand):
12161218
12171219
>>> from nipype.interfaces.freesurfer import Tkregister2
12181220
>>> tk2 = Tkregister2(reg_file='register.dat')
1219-
>>> tk2.inputs.moving_image = 'func.nii.gz'
1220-
>>> tk2.inputs.fsl_in_matrix = 'func2anat.mat'
1221+
>>> tk2.inputs.moving_image = 'epi.nii'
1222+
>>> tk2.inputs.fsl_in_matrix = 'flirt.mat'
12211223
>>> tk2.inputs.subject_id = 'test_subject'
12221224
>>> tk2.inputs.subjects_dir = '.'
1223-
>>> tk2.run()
1225+
>>> tk2.run() # doctest: +SKIP
12241226
"""
12251227
_cmd = "tkregister2"
12261228
input_spec = Tkregister2InputSpec

0 commit comments

Comments
 (0)