Skip to content

Commit 8d4c637

Browse files
committed
added skeleton AutoTcorrelate
1 parent 21f8686 commit 8d4c637

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

nipype/interfaces/afni/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
from .preprocess import (To3D, Refit, Resample, TStat, Automask, Volreg, Merge,
1212
ZCutUp, Calc, TShift, Warp, Detrend, Despike, Copy,
1313
Fourier, Allineate, Maskave, SkullStrip, TCat, Fim,
14-
TCorrelate, BrickStat, ROIStats)
14+
TCorrelate, BrickStat, ROIStats, AutoTcorrelate)

nipype/interfaces/afni/preprocess.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,38 @@ class Resample(AFNICommand):
308308
_cmd = '3dresample'
309309
input_spec = ResampleInputSpec
310310
output_spec = ResampleOutputSpec
311+
312+
class AutoTcorrelateInputSpec(AFNIPrefixInputSpec):
313+
in_file = File(desc='timeseries x space (volume or surface) file',
314+
argstr='%s',
315+
position=-1,
316+
mandatory=True,
317+
exists=True)
311318

319+
out_file = File("%s_similarity_matrix", desc='output image file name',
320+
argstr='-prefix %s', name_source="in_file", usedefault=True)
321+
322+
class AutoTcorrelateOutputSpec(TraitedSpec):
323+
out_file = File(desc='similarity, eta2 or correlation matrix',
324+
exists=True)
325+
326+
class AutoTcorrelate(AFNIPrefixCommand):
327+
"""
328+
Examples
329+
========
330+
331+
>>> from nipype.interfaces import afni as afni
332+
>>> corr = afni.AutoTcorrelate()
333+
>>> corr.inputs.in_file = 'functional.nii'
334+
>>> corr.inputs.outputtype = "NIFTI"
335+
>>> corr.cmdline
336+
'3dAutoTcorrelation -prefix functional_similarity_matrix.nii functional.nii'
337+
>>> res = corr.run() # doctest: +SKIP
338+
"""
339+
input_spec = AutoTcorrelateInputSpec
340+
output_spec = AutoTcorrelateOutputSpec
341+
_cmd = '3dAutoTcorrelation'
342+
312343

313344
class TStatInputSpec(AFNIPrefixInputSpec):
314345
in_file = File(desc='input file to 3dTstat',

0 commit comments

Comments
 (0)