Skip to content

Commit a3b778b

Browse files
committed
added hash_file protocol and dummy test file
1 parent e8ef396 commit a3b778b

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

nipype/interfaces/afni/preprocess.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1251,12 +1251,13 @@ class AFNItoNIFTIInputSpec(AFNICommandInputSpec):
12511251
exists=True)
12521252
out_file = File("%s.nii", desc='output image file name',
12531253
argstr='-prefix %s', name_source="in_file", usedefault=True)
1254+
hash_files = False
12541255

12551256
class AFNItoNIFTI(AFNICommand):
12561257
"""Changes AFNI format files to NIFTI format using 3dAFNItoNIFTI
12571258
12581259
see AFNI Documentation: <http://afni.nimh.nih.gov/pub/dist/doc/program_help/3dAFNItoNIFTI.html>
1259-
Also can take in 2dimensional or 3dimensional data, which then undergoes numpy.squeeze()
1260+
this can also convert 2D or 1D data, which you can numpy.squeeze() to remove extra dimensions
12601261
12611262
Examples
12621263
========
@@ -1273,3 +1274,12 @@ class AFNItoNIFTI(AFNICommand):
12731274
_cmd = '3dAFNItoNIFTI'
12741275
input_spec = AFNItoNIFTIInputSpec
12751276
output_spec = AFNICommandOutputSpec
1277+
1278+
def _overload_extension(self, value):
1279+
path, base, ext = split_filename(value)
1280+
if ext.lower() not in [".1d", ".nii.gz", ".1D"]:
1281+
ext = ext + ".nii"
1282+
return os.path.join(path, base + ext)
1283+
1284+
def _gen_filename(self, name):
1285+
return os.path.abspath(super(AFNItoNIFTI, self)._gen_filename(name))

nipype/testing/data/afni_output.3D

Whitespace-only changes.

0 commit comments

Comments
 (0)