Skip to content

Commit 6a075b8

Browse files
committed
Merge remote-tracking branch 'upstream/master' into enh/restingconn
* upstream/master: fix: spm requires CmdLine to be lowercase fix: close figures when using spm with mcr add test remove unecessary changes Minor edits in resampling interfaces
2 parents 4e55f51 + 4edfa98 commit 6a075b8

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

nipype/interfaces/ants/resampling.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,11 @@ class WarpImageMultiTransformInputSpec(ANTSCommandInputSpec):
130130
'with additional transforms'))
131131
use_nearest = traits.Bool(argstr='--use-NN',
132132
desc='Use nearest neighbor interpolation')
133-
use_bspline = traits.Bool(argstr='--use-Bspline',
133+
use_bspline = traits.Bool(argstr='--use-BSpline',
134134
desc='Use 3rd order B-Spline interpolation')
135135
transformation_series = InputMultiPath(File(exists=True), argstr='%s',
136136
desc='transformation file(s) to be applied',
137-
mandatory=True)
137+
mandatory=True, position=-1)
138138
invert_affine = traits.List(traits.Int,
139139
desc=('List of Affine transformations to invert.'
140140
'E.g.: [1,4,5] inverts the 1st, 4th, and 5th Affines '

nipype/interfaces/ants/tests/test_auto_WarpImageMultiTransform.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ def test_WarpImageMultiTransform_inputs():
4646
),
4747
transformation_series=dict(argstr='%s',
4848
mandatory=True,
49+
position=-1,
4950
),
50-
use_bspline=dict(argstr='--use-Bspline',
51+
use_bspline=dict(argstr='--use-BSpline',
5152
),
5253
use_nearest=dict(argstr='--use-NN',
5354
),

nipype/interfaces/spm/base.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ def _make_matlab_command(self, contents, postscript=None):
468468
469469
if strcmp(name, 'SPM8') || strcmp(name, 'SPM12b'),
470470
spm_jobman('initcfg');
471-
spm_get_defaults('CmdLine', 1);
471+
spm_get_defaults('cmdline', 1);
472472
end\n
473473
"""
474474
if self.mlab.inputs.mfile:
@@ -499,6 +499,12 @@ def _make_matlab_command(self, contents, postscript=None):
499499
mscript += """
500500
spm_jobman(\'run\', jobs);\n
501501
"""
502+
if self.inputs.use_mcr:
503+
mscript += """
504+
if strcmp(name, 'SPM8') || strcmp(name, 'SPM12b'),
505+
close(\'all\', \'force\');
506+
end;
507+
"""
502508
if postscript is not None:
503509
mscript += postscript
504510
return mscript

0 commit comments

Comments
 (0)