Skip to content

Commit cba8e41

Browse files
committed
Merge pull request #827 from andsam/master
Added modulate -option for CreateWarped
2 parents e4ce216 + 3789f56 commit cba8e41

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

nipype/interfaces/spm/preprocess.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,6 +1084,8 @@ class CreateWarpedInputSpec(SPMCommandInputSpec):
10841084
field='crt_warped.K')
10851085
interp = traits.Range(low=0, high=7, field='crt_warped.interp',
10861086
desc='degree of b-spline used for interpolation')
1087+
modulate = traits.Bool(field='crt_warped.jactransf',
1088+
desc="Modulate images")
10871089

10881090

10891091
class CreateWarpedOutputSpec(TraitedSpec):
@@ -1127,8 +1129,12 @@ def _list_outputs(self):
11271129
outputs['warped_files'] = []
11281130
for filename in self.inputs.image_files:
11291131
pth, base, ext = split_filename(filename)
1130-
outputs['warped_files'].append(os.path.realpath('w%s%s' % (base,
1131-
ext)))
1132+
if isdefined(self.inputs.modulate) and self.inputs.modulate:
1133+
outputs['warped_files'].append(os.path.realpath('mw%s%s' % (base,
1134+
ext)))
1135+
else:
1136+
outputs['warped_files'].append(os.path.realpath('w%s%s' % (base,
1137+
ext)))
11321138
return outputs
11331139

11341140

nipype/interfaces/spm/tests/test_auto_CreateWarped.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ def test_CreateWarped_inputs():
2121
matlab_cmd=dict(),
2222
mfile=dict(usedefault=True,
2323
),
24+
modulate=dict(field='crt_warped.jactransf',
25+
),
2426
paths=dict(),
2527
use_mcr=dict(),
2628
use_v8struct=dict(min_ver='8',

0 commit comments

Comments
 (0)