Skip to content

Commit 839e250

Browse files
committed
Support .gii outputs in SurfaceTransform
1 parent 32c0815 commit 839e250

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

nipype/interfaces/freesurfer/utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ class SurfaceTransformInputSpec(FSTraitedSpec):
363363
source_type = traits.Enum(filetypes, argstr='--sfmt %s',
364364
requires=['source_file'],
365365
desc="source file format")
366-
target_type = traits.Enum(filetypes, argstr='--tfmt %s',
366+
target_type = traits.Enum(filetypes + implicit_filetypes, argstr='--tfmt %s',
367367
desc="output format")
368368
reshape = traits.Bool(argstr="--reshape",
369369
desc="reshape output surface to conform with Nifti")
@@ -400,6 +400,11 @@ class SurfaceTransform(FSCommand):
400400
input_spec = SurfaceTransformInputSpec
401401
output_spec = SurfaceTransformOutputSpec
402402

403+
def _format_arg(self, name, spec, value):
404+
if name == "target_type" and value in implicit_filetypes:
405+
return ""
406+
return super(SurfaceTransform, self)._format_arg(name, spec, value)
407+
403408
def _list_outputs(self):
404409
outputs = self._outputs().get()
405410
outputs["out_file"] = self.inputs.out_file

0 commit comments

Comments
 (0)