Skip to content

Commit d5859e9

Browse files
committed
tst: cleaned up tests
1 parent 4a2e9dc commit d5859e9

File tree

4 files changed

+30
-24
lines changed

4 files changed

+30
-24
lines changed

nipype/interfaces/freesurfer/model.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -782,9 +782,9 @@ class MS_LDAInputSpec(FSTraitedSpec):
782782
weight_file = traits.File(argstr='-weight %s', mandatory=True,
783783
desc='filename for the LDA weights (input or output)')
784784
vol_synth_file = traits.File(exists=False, argstr='-synth %s',
785-
mandatory=True,
786-
desc='filename for the synthesized output volume',
787-
xor=['vol_synth_file', 'output_synth'])
785+
mandatory=True,
786+
desc=('filename for the synthesized output '
787+
'volume'))
788788
label_file = traits.File(exists=True, argstr='-label %s',
789789
desc='filename of the label volume')
790790
mask_file = traits.File(exists=True, argstr='-mask %s',

nipype/interfaces/freesurfer/tests/test_auto_MS_LDA.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,8 @@ def test_MS_LDA_inputs():
1414
sep=' ',
1515
argstr='-lda %s',
1616
),
17-
output_synth=dict(new_name='vol_synth_file',
18-
mandatory=True,
19-
xor=['vol_synth_file', 'output_synth'],
20-
deprecated='0.8',
21-
argstr='-synth %s',
22-
),
2317
vol_synth_file=dict(mandatory=True,
2418
argstr='-synth %s',
25-
xor=['vol_synth_file', 'output_synth'],
2619
),
2720
shift=dict(argstr='-shift %d',
2821
),

nipype/interfaces/freesurfer/tests/test_auto_Surface2VolTransform.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ def test_Surface2VolTransform_inputs():
2121
args=dict(argstr='%s',
2222
),
2323
surf_name=dict(argstr='--surf %s',
24-
exists=True,
2524
),
2625
vertexvol_file=dict(name_source=['source_file'],
2726
hash_files=False,
@@ -42,7 +41,6 @@ def test_Surface2VolTransform_inputs():
4241
argstr='--surfval %s',
4342
),
4443
projfrac=dict(argstr='--projfrac %s',
45-
exists=True,
4644
),
4745
mkmask=dict(argstr='--mkmask',
4846
),

nipype/interfaces/freesurfer/utils.py

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -382,33 +382,47 @@ def _gen_filename(self, name):
382382
return self._list_outputs()[name]
383383
return None
384384

385+
385386
class Surface2VolTransformInputSpec(FSTraitedSpec):
386387
source_file = File(exists=True, argstr='--surfval %s',
387388
copyfile=False, mandatory=True,
388389
desc='This is the source of the surface values')
389-
hemi = traits.Str(argstr='--hemi %s', mandatory=True, desc='hemisphere of data')
390-
transformed_file = File(name_template="%s_asVol.nii", desc='Output volume', argstr='--outvol %s',
390+
hemi = traits.Str(argstr='--hemi %s', mandatory=True,
391+
desc='hemisphere of data')
392+
transformed_file = File(name_template="%s_asVol.nii", desc='Output volume',
393+
argstr='--outvol %s',
391394
name_source=['source_file'], hash_files=False)
392395
reg_file = File(exists=True, argstr='--volreg %s',
393396
mandatory=True,
394397
desc='tkRAS-to-tkRAS matrix (tkregister2 format)',
395398
xor=['subject_id'])
396399
template_file = File(exists=True, argstr='--template %s',
397400
desc='Output template volume')
398-
mkmask = traits.Bool(desc='make a mask instead of loading surface values', argstr='--mkmask')
399-
vertexvol_file = File(name_template="%s_asVol_vertex.nii", desc='Path name of the vertex output '
400-
'volume, which is the same as output volume except that the value of each '
401-
'voxel is the vertex-id that is mapped to that voxel.',
402-
argstr='--vtxvol %s', name_source=['source_file'], hash_files=False)
403-
surf_name = traits.Str(exists=True, argstr='--surf %s',desc='surfname (default is white)')
404-
projfrac = traits.Float(exists=True, argstr='--projfrac %s',desc='thickness fraction')
405-
subjects_dir = traits.Str(argstr='--sd %s',desc='freesurfer subjects directory defaults to $SUBJECTS_DIR')
406-
subject_id = traits.Str(argstr='--identity %s',desc='subject id', xor=['reg_file'])
401+
mkmask = traits.Bool(desc='make a mask instead of loading surface values',
402+
argstr='--mkmask')
403+
vertexvol_file = File(name_template="%s_asVol_vertex.nii",
404+
desc=('Path name of the vertex output volume, which '
405+
'is the same as output volume except that the '
406+
'value of each voxel is the vertex-id that is '
407+
'mapped to that voxel.'),
408+
argstr='--vtxvol %s', name_source=['source_file'],
409+
hash_files=False)
410+
surf_name = traits.Str(argstr='--surf %s',
411+
desc='surfname (default is white)')
412+
projfrac = traits.Float(argstr='--projfrac %s', desc='thickness fraction')
413+
subjects_dir = traits.Str(argstr='--sd %s',
414+
desc=('freesurfer subjects directory defaults to '
415+
'$SUBJECTS_DIR'))
416+
subject_id = traits.Str(argstr='--identity %s',desc='subject id',
417+
xor=['reg_file'])
418+
407419

408420
class Surface2VolTransformOutputSpec(TraitedSpec):
409-
transformed_file = File(exists=True, desc='Path to output file if used normally')
421+
transformed_file = File(exists=True,
422+
desc='Path to output file if used normally')
410423
vertexvol_file = File(desc='vertex map volume path id. Optional')
411424

425+
412426
class Surface2VolTransform(FSCommand):
413427
"""Use FreeSurfer mri_surf2vol to apply a transform.
414428
@@ -432,6 +446,7 @@ class Surface2VolTransform(FSCommand):
432446
input_spec = Surface2VolTransformInputSpec
433447
output_spec = Surface2VolTransformOutputSpec
434448

449+
435450
class ApplyMaskInputSpec(FSTraitedSpec):
436451

437452
in_file = File(exists=True, mandatory=True, position=-3, argstr="%s",

0 commit comments

Comments
 (0)