Skip to content

Commit c40c13e

Browse files
author
bpinsard
committed
minor fixes, ExtractMainComponent still have test failure for extension problems (.pial)
1 parent 9b5371f commit c40c13e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

nipype/interfaces/freesurfer/preprocess.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ class ReconAll(CommandLine):
626626
>>> reconall.inputs.subjects_dir = '.'
627627
>>> reconall.inputs.T1_files = 'structural.nii'
628628
>>> reconall.cmdline
629-
'recon-all -i structural.nii -all -subjid foo -sd .'
629+
'recon-all -all -i structural.nii -subjid foo -sd .'
630630
631631
"""
632632

@@ -748,7 +748,7 @@ def _list_outputs(self):
748748
outputs['subjects_dir'] = subjects_dir
749749
return outputs
750750

751-
751+
@property
752752
def cmdline(self):
753753
subjects_dir = self.inputs.subjects_dir
754754
if not isdefined(subjects_dir):

nipype/interfaces/freesurfer/utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,8 +1032,8 @@ class ExtractMainComponentInputSpec(CommandLineInputSpec):
10321032
exists=True, mandatory=True, argstr='%s', position=1,
10331033
desc='input surface file')
10341034
out_file = File(
1035-
'%s_maincmp', usedefault=True,
1036-
name_source='in_file', argstr='%s', position=2,
1035+
name_template ='%s.maincmp', name_source='in_file',
1036+
argstr='%s', position=2, keep_extension = True,
10371037
desc='surface containing main component')
10381038

10391039
class ExtractMainComponentOutputSpec(TraitedSpec):
@@ -1046,9 +1046,9 @@ class ExtractMainComponent(CommandLine):
10461046
--------
10471047
10481048
>>> from nipype.interfaces.freesurfer import ExtractMainComponent
1049-
>>> mcmp = ExtractMainComponent(in_file='lh.white')
1049+
>>> mcmp = ExtractMainComponent(in_file='lh.pial')
10501050
>>> mcmp.cmdline
1051-
'mris_extract_main_component lh.white lh.white_maincmp'
1051+
'mris_extract_main_component lh.pial lh.pial.maincmp'
10521052
10531053
"""
10541054

0 commit comments

Comments
 (0)