From 0931fda459f5feb4dad74a31f5d622c8a4cc20d4 Mon Sep 17 00:00:00 2001 From: manuegrx <47973414+manuegrx@users.noreply.github.com> Date: Tue, 10 Oct 2023 09:57:34 +0200 Subject: [PATCH 1/2] [fix] MRTrix3 change inputs position for MRTransform --- nipype/interfaces/mrtrix3/utils.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/nipype/interfaces/mrtrix3/utils.py b/nipype/interfaces/mrtrix3/utils.py index 2ec7eba909..6909f380be 100644 --- a/nipype/interfaces/mrtrix3/utils.py +++ b/nipype/interfaces/mrtrix3/utils.py @@ -822,13 +822,11 @@ class MRTransformInputSpec(MRTrix3BaseInputSpec): ) invert = traits.Bool( argstr="-inverse", - position=1, desc="Invert the specified transform before using it", ) linear_transform = File( exists=True, argstr="-linear %s", - position=1, desc=( "Specify a linear transform to apply, in the form of a 3x4 or 4x4 ascii file. " "Note the standard reverse convention is used, " @@ -838,38 +836,32 @@ class MRTransformInputSpec(MRTrix3BaseInputSpec): ) replace_transform = traits.Bool( argstr="-replace", - position=1, desc="replace the current transform by that specified, rather than applying it to the current transform", ) transformation_file = File( exists=True, argstr="-transform %s", - position=1, desc="The transform to apply, in the form of a 4x4 ascii file.", ) template_image = File( exists=True, argstr="-template %s", - position=1, desc="Reslice the input image to match the specified template image.", ) reference_image = File( exists=True, argstr="-reference %s", - position=1, desc="in case the transform supplied maps from the input image onto a reference image, use this option to specify the reference. Note that this implicitly sets the -replace option.", ) flip_x = traits.Bool( argstr="-flipx", - position=1, desc="assume the transform is supplied assuming a coordinate system with the x-axis reversed relative to the MRtrix convention (i.e. x increases from right to left). This is required to handle transform matrices produced by FSL's FLIRT command. This is only used in conjunction with the -reference option.", ) quiet = traits.Bool( argstr="-quiet", - position=1, desc="Do not display information messages or progress status.", ) - debug = traits.Bool(argstr="-debug", position=1, desc="Display debugging messages.") + debug = traits.Bool(argstr="-debug", desc="Display debugging messages.") class MRTransformOutputSpec(TraitedSpec): From 0d0d3ff1283d45cdf9d84e6de10a400078021537 Mon Sep 17 00:00:00 2001 From: manuegrx <47973414+manuegrx@users.noreply.github.com> Date: Tue, 10 Oct 2023 10:21:20 +0200 Subject: [PATCH 2/2] add test create by check-before-commit --- nipype/interfaces/mrtrix3/tests/test_auto_MRTransform.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_MRTransform.py b/nipype/interfaces/mrtrix3/tests/test_auto_MRTransform.py index b50ee2c67f..e0337da2a9 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_MRTransform.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_MRTransform.py @@ -12,7 +12,6 @@ def test_MRTransform_inputs(): ), debug=dict( argstr="-debug", - position=1, ), environ=dict( nohash=True, @@ -20,7 +19,6 @@ def test_MRTransform_inputs(): ), flip_x=dict( argstr="-flipx", - position=1, ), grad_file=dict( argstr="-grad %s", @@ -45,12 +43,10 @@ def test_MRTransform_inputs(): ), invert=dict( argstr="-inverse", - position=1, ), linear_transform=dict( argstr="-linear %s", extensions=None, - position=1, ), nthreads=dict( argstr="-nthreads %d", @@ -71,26 +67,21 @@ def test_MRTransform_inputs(): ), quiet=dict( argstr="-quiet", - position=1, ), reference_image=dict( argstr="-reference %s", extensions=None, - position=1, ), replace_transform=dict( argstr="-replace", - position=1, ), template_image=dict( argstr="-template %s", extensions=None, - position=1, ), transformation_file=dict( argstr="-transform %s", extensions=None, - position=1, ), ) inputs = MRTransform.input_spec()