From bc336518c93b0631856a298ec15c41d98effc3f8 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 24 Jun 2013 18:23:02 -0400 Subject: [PATCH 1/7] Function Automask raises error due to string '-apply_prefix ' generated in the 3dAutomask command --- nipype/interfaces/afni/preprocess.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index 7a4bad0375..b5134fefb1 100755 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -508,12 +508,12 @@ class AutomaskInputSpec(AFNICommandInputSpec): argstr="-erode %s") mask_suffix = traits.Str( - desc="out_file suffix", depracated=0.8, new_name="out_file") + desc="out_file suffix", deprecated=0.8, new_name="out_file") apply_suffix = traits.Str( - desc="out_file suffix", depracated=0.8, new_name="brain_file") - apply_mask = File(desc="output file from 3dAutomask", - argstr='-apply_prefix %s', - name_source="in_file", depracated=0.8, new_name="brain_file") + desc="out_file suffix", deprecated=0.8, new_name="brain_file") + #apply_mask = File(desc="output file from 3dAutomask", + #argstr='-apply_prefix %s', + #name_source="in_file", deprecated=0.8, new_name="brain_file") class AutomaskOutputSpec(TraitedSpec): @@ -580,12 +580,12 @@ def _gen_filename(self, name): return super(Automask, self)._gen_filename(name) return Undefined - def _list_outputs(self): - outputs = super(Automask, self)._list_outputs() - if isdefined(self.inputs.apply_mask): - outputs['brain_file'] = os.path.abspath( - self._gen_filename('apply_mask')) - return outputs + #def _list_outputs(self): + #outputs = super(Automask, self)._list_outputs() + #if isdefined(self.inputs.apply_mask): + #outputs['brain_file'] = os.path.abspath( + #self._gen_filename('apply_mask')) + #return outputs class VolregInputSpec(AFNICommandInputSpec): From 12841c23e9742b8b516a59e7f4ae7200b41d6848 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 27 Jun 2013 10:38:41 -0400 Subject: [PATCH 2/7] Added the option for resampling with isotropic voxels as available in FLIRT but not wrapped in NiPype --- nipype/interfaces/fsl/preprocess.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nipype/interfaces/fsl/preprocess.py b/nipype/interfaces/fsl/preprocess.py index bdc154d652..50a5d686dc 100644 --- a/nipype/interfaces/fsl/preprocess.py +++ b/nipype/interfaces/fsl/preprocess.py @@ -403,6 +403,8 @@ class FLIRTInputSpec(FSLCommandInputSpec): in_matrix_file = File(argstr='-init %s', desc='input 4x4 affine matrix') apply_xfm = traits.Bool(argstr='-applyxfm', requires=['in_matrix_file'], desc='apply transformation supplied by in_matrix_file') + apply_isoxfm = traits.Float(argstr='-applyisoxfm %f', + desc='as applyxfm but forces isotropic resampling') datatype = traits.Enum('char', 'short', 'int', 'float', 'double', argstr='-datatype %s', desc='force output data type') From c5c11e92041701addfe488a98af549a5f78e898f Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 3 Jul 2013 12:20:57 -0400 Subject: [PATCH 3/7] Postpone FSL Flirt apply_isoxfm for a different PR --- nipype/interfaces/fsl/preprocess.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/nipype/interfaces/fsl/preprocess.py b/nipype/interfaces/fsl/preprocess.py index 50a5d686dc..bdc154d652 100644 --- a/nipype/interfaces/fsl/preprocess.py +++ b/nipype/interfaces/fsl/preprocess.py @@ -403,8 +403,6 @@ class FLIRTInputSpec(FSLCommandInputSpec): in_matrix_file = File(argstr='-init %s', desc='input 4x4 affine matrix') apply_xfm = traits.Bool(argstr='-applyxfm', requires=['in_matrix_file'], desc='apply transformation supplied by in_matrix_file') - apply_isoxfm = traits.Float(argstr='-applyisoxfm %f', - desc='as applyxfm but forces isotropic resampling') datatype = traits.Enum('char', 'short', 'int', 'float', 'double', argstr='-datatype %s', desc='force output data type') From 356cd841e2a782a34fb1b7fcbd9eab9181e991ed Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 8 Jul 2013 16:14:21 -0400 Subject: [PATCH 4/7] Add missing option apply_isoxfm to FSL Flirt wrapper --- nipype/interfaces/fsl/preprocess.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nipype/interfaces/fsl/preprocess.py b/nipype/interfaces/fsl/preprocess.py index bdc154d652..50a5d686dc 100644 --- a/nipype/interfaces/fsl/preprocess.py +++ b/nipype/interfaces/fsl/preprocess.py @@ -403,6 +403,8 @@ class FLIRTInputSpec(FSLCommandInputSpec): in_matrix_file = File(argstr='-init %s', desc='input 4x4 affine matrix') apply_xfm = traits.Bool(argstr='-applyxfm', requires=['in_matrix_file'], desc='apply transformation supplied by in_matrix_file') + apply_isoxfm = traits.Float(argstr='-applyisoxfm %f', + desc='as applyxfm but forces isotropic resampling') datatype = traits.Enum('char', 'short', 'int', 'float', 'double', argstr='-datatype %s', desc='force output data type') From ba03bdd613fafb967785d17ab82497a6019031ff Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 8 Jul 2013 16:18:09 -0400 Subject: [PATCH 5/7] Solve merge issue --- nipype/interfaces/afni/preprocess.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index a757fd0c84..00dbc1bc7a 100755 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -507,18 +507,6 @@ class AutomaskInputSpec(AFNICommandInputSpec): erode = traits.Int(desc='erode the mask inwards', argstr="-erode %s") -<<<<<<< HEAD - mask_suffix = traits.Str( - desc="out_file suffix", deprecated=0.8, new_name="out_file") - apply_suffix = traits.Str( - desc="out_file suffix", deprecated=0.8, new_name="brain_file") - #apply_mask = File(desc="output file from 3dAutomask", - #argstr='-apply_prefix %s', - #name_source="in_file", deprecated=0.8, new_name="brain_file") - -======= ->>>>>>> upstream/master - class AutomaskOutputSpec(TraitedSpec): out_file = File(desc='mask file', exists=True) @@ -550,6 +538,7 @@ class Automask(AFNICommand): input_spec = AutomaskInputSpec output_spec = AutomaskOutputSpec + class VolregInputSpec(AFNICommandInputSpec): in_file = File(desc='input file to 3dvolreg', From 8b051fed344e6c4182c83c0169abe714e1d65380 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 8 Jul 2013 16:19:23 -0400 Subject: [PATCH 6/7] Solve Merge issue --- nipype/interfaces/afni/preprocess.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index 00dbc1bc7a..901dab5ffa 100755 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -507,6 +507,7 @@ class AutomaskInputSpec(AFNICommandInputSpec): erode = traits.Int(desc='erode the mask inwards', argstr="-erode %s") + class AutomaskOutputSpec(TraitedSpec): out_file = File(desc='mask file', exists=True) From 2ce233a8bf84612bbb76dccdeba4309f935e6e11 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 9 Jul 2013 11:01:48 -0400 Subject: [PATCH 7/7] Added XOR condition between apply_isoxfm and apply_xfm --- nipype/interfaces/fsl/preprocess.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/fsl/preprocess.py b/nipype/interfaces/fsl/preprocess.py index 50a5d686dc..c13cc83218 100644 --- a/nipype/interfaces/fsl/preprocess.py +++ b/nipype/interfaces/fsl/preprocess.py @@ -403,7 +403,7 @@ class FLIRTInputSpec(FSLCommandInputSpec): in_matrix_file = File(argstr='-init %s', desc='input 4x4 affine matrix') apply_xfm = traits.Bool(argstr='-applyxfm', requires=['in_matrix_file'], desc='apply transformation supplied by in_matrix_file') - apply_isoxfm = traits.Float(argstr='-applyisoxfm %f', + apply_isoxfm = traits.Float(argstr='-applyisoxfm %f', xor=['apply_xfm'], desc='as applyxfm but forces isotropic resampling') datatype = traits.Enum('char', 'short', 'int', 'float', 'double', argstr='-datatype %s',