Skip to content

Commit f1f0213

Browse files
committed
Merge pull request #947 from chrisfilo/fix/spm12
different names in SPM12
2 parents 00155c1 + e554136 commit f1f0213

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

nipype/interfaces/spm/preprocess.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from nipype.interfaces.base import (OutputMultiPath, TraitedSpec, isdefined,
2323
traits, InputMultiPath, File)
2424
from nipype.interfaces.spm.base import (SPMCommand, scans_for_fname,
25-
func_is_3d,
25+
func_is_3d, Info,
2626
scans_for_fnames, SPMCommandInputSpec)
2727
from nipype.utils.filemanip import (fname_presuffix, filename_to_list,
2828
list_to_filename, split_filename)
@@ -599,9 +599,13 @@ class Segment(SPMCommand):
599599
>>> seg.run() # doctest: +SKIP
600600
601601
"""
602-
603-
_jobtype = 'spatial'
604-
_jobname = 'preproc'
602+
603+
if Info.version() and Info.version()['name'] == "SPM12":
604+
_jobtype = 'tools'
605+
_jobname = 'oldseg'
606+
else:
607+
_jobtype = 'spatial'
608+
_jobname = 'preproc'
605609

606610
input_spec = SegmentInputSpec
607611
output_spec = SegmentOutputSpec
@@ -723,8 +727,12 @@ class NewSegment(SPMCommand):
723727

724728
input_spec = NewSegmentInputSpec
725729
output_spec = NewSegmentOutputSpec
726-
_jobtype = 'tools'
727-
_jobname = 'preproc8'
730+
if Info.version() and Info.version()['name'] == "SPM12":
731+
_jobtype = 'spatial'
732+
_jobname = 'preproc'
733+
else:
734+
_jobtype = 'tools'
735+
_jobname = 'preproc8'
728736

729737
def _format_arg(self, opt, spec, val):
730738
"""Convert input to appropriate format for spm

0 commit comments

Comments
 (0)