Skip to content

Commit 4032ee1

Browse files
committed
add qwarp
1 parent 6c23846 commit 4032ee1

File tree

2 files changed

+67
-1
lines changed

2 files changed

+67
-1
lines changed

nipype/interfaces/afni/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
Maskave, Means, OutlierCount,
1616
QualityIndex, ROIStats, Retroicor,
1717
Seg, SkullStrip, TCorr1D, TCorrMap, TCorrelate,
18-
TShift, Volreg, Warp)
18+
TShift, Volreg, Warp, Qwarp)
1919
from .svm import (SVMTest, SVMTrain)
2020
from .utils import (AFNItoNIFTI, Autobox, BrickStat, Calc, Copy,
2121
Eval, FWHMx,

nipype/interfaces/afni/preprocess.py

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2347,3 +2347,69 @@ class Warp(AFNICommand):
23472347
_cmd = '3dWarp'
23482348
input_spec = WarpInputSpec
23492349
output_spec = AFNICommandOutputSpec
2350+
2351+
2352+
class QwarpInputSpec(CommandLineInputSpec):
2353+
source_file = File(
2354+
desc='',
2355+
argstr='-source %s',
2356+
mandatory=True,
2357+
exists=True,
2358+
copyfile=False)
2359+
base_file = File(
2360+
desc='',
2361+
argstr='-base %s',
2362+
mandatory=True,
2363+
exists=True,
2364+
copyfile=False)
2365+
plusminus = traits.Bool(
2366+
desc='',
2367+
argstr='-plusminus')
2368+
pmNAMES = traits.List(traits.Str(),
2369+
desc='',
2370+
argstr='-pmNAMES %')
2371+
pblur = traits.List(traits.Float(),
2372+
desc='',
2373+
argstr='-pblur %s')
2374+
blur = traits.List(traits.Float(),
2375+
desc='',
2376+
argstr='-blur %s')
2377+
noweight = traits.Bool(
2378+
desc='',
2379+
argstr='-noweight')
2380+
minpatch = traits.Int(
2381+
desc='',
2382+
argstr='-minpatch %d')
2383+
nopadWARP = traits.Bool(
2384+
desc='',
2385+
argstr='-nopadWARP')
2386+
2387+
2388+
class QwarpOutputSpec(TraitedSpec):
2389+
warped_source = File(
2390+
desc='',
2391+
exists=True)
2392+
warped_base = File(
2393+
desc='',
2394+
exists=True)
2395+
source_warp = File(
2396+
desc='',
2397+
exists=True)
2398+
base_warp = File(
2399+
desc='',
2400+
exists=True)
2401+
2402+
2403+
class Qwarp(CommandLine):
2404+
_cmd = '3dQwarp -prefix Qwarp.nii.gz'
2405+
input_spec = QwarpInputSpec
2406+
output_spec = QwarpOutputSpec
2407+
2408+
def _list_outputs(self):
2409+
outputs = self.output_spec().get()
2410+
outputs['warped_source'] = os.path.abspath("Qwarp_PLUS.nii.gz")
2411+
outputs['warped_base'] = os.path.abspath("Qwarp_MINUS.nii.gz")
2412+
outputs['source_warp'] = os.path.abspath("Qwarp_PLUS_WARP.nii.gz")
2413+
outputs['base_warp'] = os.path.abspath("Qwarp_MINUS_WARP.nii.gz")
2414+
2415+
return outputs

0 commit comments

Comments
 (0)