Skip to content

Commit 539fdb9

Browse files
authored
Merge pull request #2135 from nih-fmrif/afni_workshop
Afni workshop
2 parents 02b5b84 + 1254589 commit 539fdb9

17 files changed

+1309
-26
lines changed

nipype/interfaces/afni/__init__.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,21 @@
88
"""
99

1010
from .base import Info
11-
from .preprocess import (Allineate, Automask, AutoTcorrelate,
11+
from .preprocess import (AlignEpiAnatPy, Allineate, Automask,
12+
AutoTcorrelate, AutoTLRC,
1213
Bandpass, BlurInMask, BlurToFWHM,
1314
ClipLevel, DegreeCentrality, Despike,
1415
Detrend, ECM, Fim, Fourier, Hist, LFCD,
1516
Maskave, Means, OutlierCount,
1617
QualityIndex, ROIStats, Retroicor,
1718
Seg, SkullStrip, TCorr1D, TCorrMap, TCorrelate,
19+
TNorm,
1820
TShift, Volreg, Warp, QwarpPlusMinus, Qwarp)
1921
from .svm import (SVMTest, SVMTrain)
20-
from .utils import (AFNItoNIFTI, Autobox, Axialize, BrickStat, Calc, Cat, Copy,
22+
from .utils import (ABoverlap, AFNItoNIFTI, Autobox, Axialize, BrickStat,
23+
Bucket, Calc, Cat, CatMatvec, Copy, Dot,
2124
Edge3, Eval, FWHMx, MaskTool, Merge, Notes, NwarpApply,
22-
Refit, Resample, TCat, TStat, To3D, Unifize, ZCutUp, GCOR,
25+
OneDToolPy,
26+
Refit, Resample, TCat, TCatSubBrick, TStat, To3D, Unifize, ZCutUp, GCOR,
2327
Zcat, Zeropad)
2428
from .model import (Deconvolve, Remlfit)

nipype/interfaces/afni/base.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import os
1010
from sys import platform
11+
from distutils import spawn
1112

1213
from ... import logging
1314
from ...utils.filemanip import split_filename, fname_presuffix
@@ -144,7 +145,6 @@ class AFNICommandOutputSpec(TraitedSpec):
144145
out_file = File(desc='output file',
145146
exists=True)
146147

147-
148148
class AFNICommand(AFNICommandBase):
149149
"""Shared options for several AFNI commands """
150150
input_spec = AFNICommandInputSpec
@@ -283,3 +283,23 @@ def no_afni():
283283
if Info.version() is None:
284284
return True
285285
return False
286+
287+
288+
class AFNIPythonCommandInputSpec(CommandLineInputSpec):
289+
outputtype = traits.Enum('AFNI', list(Info.ftypes.keys()),
290+
desc='AFNI output filetype')
291+
py27_path = traits.Either('python2', File(exists=True),
292+
usedefault=True,
293+
default='python2')
294+
295+
class AFNIPythonCommand(AFNICommand):
296+
@property
297+
def cmd(self):
298+
if spawn.find_executable(super(AFNIPythonCommand, self).cmd) is not None:
299+
return spawn.find_executable(super(AFNIPythonCommand, self).cmd)
300+
else:
301+
return super(AFNIPythonCommand, self).cmd
302+
303+
@property
304+
def cmdline(self):
305+
return "{} {}".format(self.inputs.py27_path, super(AFNIPythonCommand, self).cmdline)

0 commit comments

Comments
 (0)