Skip to content

Commit d83cfb9

Browse files
committed
Added 1dmatrix_save parameter option to 3dvolreg interface.
1 parent 278b216 commit d83cfb9

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

nipype/interfaces/afni/preprocess.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ class AutoTcorrelate(AFNICommand):
367367
output_spec = AFNICommandOutputSpec
368368
_cmd = '3dAutoTcorrelate'
369369

370-
def _overload_extension(self, value, name=None):
370+
def _overload_extension(self, value):
371371
path, base, ext = split_filename(value)
372372
if ext.lower() not in [".1d", ".nii.gz", ".nii"]:
373373
ext = ext + ".1D"
@@ -560,7 +560,6 @@ class VolregInputSpec(AFNICommandInputSpec):
560560
copyfile=False)
561561
out_file = File(name_template="%s_volreg", desc='output image file name',
562562
argstr='-prefix %s', name_source="in_file")
563-
564563
basefile = File(desc='base file for registration',
565564
argstr='-base %s',
566565
position=-6,
@@ -582,12 +581,18 @@ class VolregInputSpec(AFNICommandInputSpec):
582581
argstr='-tshift 0')
583582
copyorigin = traits.Bool(desc='copy base file origin coords to output',
584583
argstr='-twodup')
584+
oned_matrix_save = File(name_template='%s.aff12.1D',
585+
desc='Save the matrix transformation',
586+
argstr='-1Dmatrix_save %s',
587+
keep_extension=True,
588+
name_source="in_file")
585589

586590

587591
class VolregOutputSpec(TraitedSpec):
588592
out_file = File(desc='registered file', exists=True)
589593
md1d_file = File(desc='max displacement info file', exists=True)
590594
oned_file = File(desc='movement parameters info file', exists=True)
595+
oned_matrix_save = File(desc='matrix transformation from base to input', exists=True)
591596

592597

593598
class Volreg(AFNICommand):
@@ -1924,7 +1929,7 @@ class AFNItoNIFTI(AFNICommand):
19241929
input_spec = AFNItoNIFTIInputSpec
19251930
output_spec = AFNICommandOutputSpec
19261931

1927-
def _overload_extension(self, value, name=None):
1932+
def _overload_extension(self, value):
19281933
path, base, ext = split_filename(value)
19291934
if ext.lower() not in [".1d", ".nii.gz", ".1D"]:
19301935
ext = ext + ".nii"

0 commit comments

Comments
 (0)