From 635b4cb7eea81c325a34f933a56a82fcd018d865 Mon Sep 17 00:00:00 2001 From: Felix Schlegel Date: Sun, 7 Jul 2019 14:43:31 +0200 Subject: [PATCH] Added interface for fslorient Pasted it above 'Reorient2Std'. --- nipype/interfaces/fsl/utils.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/nipype/interfaces/fsl/utils.py b/nipype/interfaces/fsl/utils.py index f4ef73c0e9..ab019b6548 100644 --- a/nipype/interfaces/fsl/utils.py +++ b/nipype/interfaces/fsl/utils.py @@ -1700,7 +1700,28 @@ def _gen_filename(self, name): return self._list_outputs()['out_file'] return None + +class FslOrientInputSpec(FSLCommandInputSpec): + in_file = File(exists=True, desc='input file', argstr='%s', position=2, mandatory=True) + main_option = traits.Str(desc='main option', argstr='-%s', position=0, mandatory=True) + code = traits.Int(argstr='%d', desc='code for setsformcode', position=1) + + +class FslOrientOutputSpec(TraitedSpec): + out_file = File(desc = "out file", exists = True) + + +class FslOrient(FSLCommand): + _cmd = 'fslorient' + input_spec = FslOrientInputSpec + output_spec = FslOrientOutputSpec + def _list_outputs(self): + outputs = self.output_spec().get() + outputs['out_file'] = os.path.abspath(self.inputs.in_file) + return outputs + + class Reorient2StdInputSpec(FSLCommandInputSpec): in_file = File(exists=True, mandatory=True, argstr="%s") out_file = File(genfile=True, hash_files=False, argstr="%s")