Skip to content

Commit 629ea11

Browse files
author
bpinsard
committed
fix label output file
1 parent e8f8a7f commit 629ea11

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

nipype/interfaces/spm/preprocess.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,8 +1116,8 @@ class VBMSegmentInputSpec(SPMCommandInputSpec):
11161116
4, usedefault=True, field='estwrite.opts.warpreg',
11171117
desc='Controls balance between parameters and data')
11181118

1119-
spatial_normalization = traits.Enum(
1120-
'low','high',usedefault=True,)
1119+
spatial_normalization = traits.Enum('high',
1120+
'low',usedefault=True,)
11211121
dartel_template = File(
11221122
exists=True,
11231123
field='estwrite.extopts.dartelwarp.normhigh.darteltpm')
@@ -1210,7 +1210,7 @@ class VBMSegmentOuputSpec(TraitedSpec):
12101210

12111211
pve_label_native_images = OutputMultiPath(File(exists=True))
12121212
pve_label_normalized_images = OutputMultiPath(File(exists=True))
1213-
pve_label_normalized_images = OutputMultiPath(File(exists=True))
1213+
pve_label_registered_images = OutputMultiPath(File(exists=True))
12141214

12151215
forward_deformation_field = OutputMultiPath(File(exists=True))
12161216
inverse_deformation_field = OutputMultiPath(File(exists=True))
@@ -1277,9 +1277,9 @@ def _list_outputs(self):
12771277

12781278

12791279
if self.inputs.pve_label_native:
1280-
outputs['pve_label_native_images'].append(os.path.join(pth,"p0%s_affine.nii"%(base)))
1280+
outputs['pve_label_native_images'].append(os.path.join(pth,"p0%s.nii"%(base)))
12811281
if self.inputs.pve_label_normalized:
1282-
outputs['pve_label_normalized_images'].append(os.path.join(pth,"w%sp0%s_affine.nii"%(dartel_px,base)))
1282+
outputs['pve_label_normalized_images'].append(os.path.join(pth,"w%sp0%s.nii"%(dartel_px,base)))
12831283
if self.inputs.pve_label_dartel==1:
12841284
outputs['pve_label_registered_images'].append(os.path.join(pth,"rp0%s.nii"%( base)))
12851285
elif self.inputs.pve_label_dartel==2:
@@ -1289,7 +1289,7 @@ def _list_outputs(self):
12891289
if self.inputs.bias_corrected_native:
12901290
outputs['bias_corrected_images'].append(os.path.join(pth,"m%s.nii"%(base)))
12911291
if self.inputs.bias_corrected_normalized:
1292-
outputs['normalized_bias_corrected_images'].append(os.path.join(pth,"wm%s%s_affine.nii"%(dartel_px, base)))
1292+
outputs['normalized_bias_corrected_images'].append(os.path.join(pth,"wm%s.nii"%(base)))
12931293

12941294
if self.inputs.deformation_field[0]:
12951295
outputs['forward_deformation_field'].append(os.path.join(pth,"y_%s%s.nii"%(dartel_px,base)))
@@ -1316,7 +1316,9 @@ def _format_arg(self, opt, spec, val):
13161316

13171317
def _parse_inputs(self):
13181318
if self.inputs.spatial_normalization == 'low':
1319-
return super(VBMSegment, self)._parse_inputs(skip=('spatial_normalization', 'dartel_template'))
1319+
einputs = super(VBMSegment, self)._parse_inputs(skip=('spatial_normalization', 'dartel_template'))
1320+
einputs[0]['estwrite']['extopts']['dartelwarp']={'normlow':1}
1321+
return einputs
13201322
else:
13211323
return super(VBMSegment, self)._parse_inputs(skip=('spatial_normalization'))
13221324

0 commit comments

Comments
 (0)