@@ -2953,107 +2953,6 @@ def _list_outputs(self):
29532953 return  outputs 
29542954
29552955
2956- class  QwarpPlusMinusInputSpec (CommandLineInputSpec ):
2957-  source_file  =  File (
2958-  desc = 
2959-  'Source image (opposite phase encoding direction than base image).' ,
2960-  argstr = '-source %s' ,
2961-  mandatory = True ,
2962-  exists = True ,
2963-  copyfile = False )
2964-  base_file  =  File (
2965-  desc = 
2966-  'Base image (opposite phase encoding direction than source image).' ,
2967-  argstr = '-base %s' ,
2968-  mandatory = True ,
2969-  exists = True ,
2970-  copyfile = False )
2971-  pblur  =  traits .List (
2972-  traits .Float (),
2973-  desc = 'The fraction of the patch size that' 
2974-  'is used for the progressive blur by providing a ' 
2975-  'value between 0 and 0.25. If you provide TWO ' 
2976-  'values, the first fraction is used for ' 
2977-  'progressively blurring the base image and the ' 
2978-  'second for the source image.' ,
2979-  argstr = '-pblur %s' ,
2980-  minlen = 1 ,
2981-  maxlen = 2 )
2982-  blur  =  traits .List (
2983-  traits .Float (),
2984-  desc = "Gaussian blur the input images by (FWHM) voxels " 
2985-  "before doing the alignment (the output dataset " 
2986-  "will not be blurred). The default is 2.345 (for " 
2987-  "no good reason). Optionally, you can provide 2 " 
2988-  "values, and then the first one is applied to the " 
2989-  "base volume, the second to the source volume. A " 
2990-  "negative blur radius means to use 3D median " 
2991-  "filtering, rather than Gaussian blurring. This " 
2992-  "type of filtering will better preserve edges, " 
2993-  "which can be important in alignment." ,
2994-  argstr = '-blur %s' ,
2995-  minlen = 1 ,
2996-  maxlen = 2 )
2997-  noweight  =  traits .Bool (
2998-  desc = 'If you want a binary weight (the old default), use this option.' 
2999-  'That is, each voxel in the base volume automask will be' 
3000-  'weighted the same in the computation of the cost functional.' ,
3001-  argstr = '-noweight' )
3002-  minpatch  =  traits .Int (
3003-  desc = "Set the minimum patch size for warp searching to 'mm' voxels." ,
3004-  argstr = '-minpatch %d' )
3005-  nopadWARP  =  traits .Bool (
3006-  desc = 'If for some reason you require the warp volume to' 
3007-  'match the base volume, then use this option to have the output' 
3008-  'WARP dataset(s) truncated.' ,
3009-  argstr = '-nopadWARP' )
3010- 
3011- 
3012- class  QwarpPlusMinusOutputSpec (TraitedSpec ):
3013-  warped_source  =  File (desc = 'Undistorted source file.' , exists = True )
3014-  warped_base  =  File (desc = 'Undistorted base file.' , exists = True )
3015-  source_warp  =  File (
3016-  desc = "Field suceptibility correction warp (in 'mm') for source image." ,
3017-  exists = True )
3018-  base_warp  =  File (
3019-  desc = "Field suceptibility correction warp (in 'mm') for base image." ,
3020-  exists = True )
3021- 
3022- 
3023- class  QwarpPlusMinus (CommandLine ):
3024-  """A version of 3dQwarp for performing field susceptibility correction 
3025-  using two images with opposing phase encoding directions. 
3026- 
3027-  For complete details, see the `3dQwarp Documentation. 
3028-  <https://afni.nimh.nih.gov/pub/dist/doc/program_help/3dQwarp.html>`_ 
3029- 
3030-  Examples 
3031-  ======== 
3032- 
3033-  >>> from nipype.interfaces import afni 
3034-  >>> qwarp = afni.QwarpPlusMinus() 
3035-  >>> qwarp.inputs.source_file = 'sub-01_dir-LR_epi.nii.gz' 
3036-  >>> qwarp.inputs.nopadWARP = True 
3037-  >>> qwarp.inputs.base_file = 'sub-01_dir-RL_epi.nii.gz' 
3038-  >>> qwarp.cmdline 
3039-  '3dQwarp -prefix Qwarp.nii.gz -plusminus -base sub-01_dir-RL_epi.nii.gz -nopadWARP -source sub-01_dir-LR_epi.nii.gz' 
3040-  >>> res = warp.run() # doctest: +SKIP 
3041- 
3042-  """ 
3043-  _cmd  =  '3dQwarp -prefix Qwarp.nii.gz -plusminus' 
3044-  input_spec  =  QwarpPlusMinusInputSpec 
3045-  output_spec  =  QwarpPlusMinusOutputSpec 
3046- 
3047-  def  _list_outputs (self ):
3048-  outputs  =  self .output_spec ().get ()
3049-  outputs ['warped_source' ] =  os .path .abspath ("Qwarp_PLUS.nii.gz" )
3050-  outputs ['warped_base' ] =  os .path .abspath ("Qwarp_MINUS.nii.gz" )
3051-  outputs ['source_warp' ] =  os .path .abspath ("Qwarp_PLUS_WARP.nii.gz" )
3052-  outputs ['base_warp' ] =  os .path .abspath ("Qwarp_MINUS_WARP.nii.gz" )
3053- 
3054-  return  outputs 
3055- 
3056- 
30572956class  QwarpInputSpec (AFNICommandInputSpec ):
30582957 in_file  =  File (
30592958 desc = 
@@ -3722,3 +3621,54 @@ def _list_outputs(self):
37223621 def  _gen_filename (self , name ):
37233622 if  name  ==  'out_file' :
37243623 return  self ._gen_fname (self .inputs .source_file , suffix = '_QW' )
3624+ 
3625+ 
3626+ class  QwarpPlusMinusInputSpec (QwarpInputSpec ):
3627+  source_file  =  File (
3628+  desc = 'Source image (opposite phase encoding direction than base image)' ,
3629+  argstr = '-source %s' ,
3630+  exists = True ,
3631+  deprecated = '1.1.2' ,
3632+  new_name = 'in_file' ,
3633+  copyfile = False )
3634+  out_file  =  File (
3635+  argstr = '-prefix %s' ,
3636+  value = 'Qwarp.nii.gz' ,
3637+  position = 0 ,
3638+  usedefault = True ,
3639+  desc = "Output file" )
3640+  plusminus  =  traits .Bool (
3641+  True ,
3642+  usedefault = True ,
3643+  position = 1 ,
3644+  desc = 'Normally, the warp displacements dis(x) are defined to match' 
3645+  'base(x) to source(x+dis(x)). With this option, the match' 
3646+  'is between base(x-dis(x)) and source(x+dis(x)) -- the two' 
3647+  'images \' meet in the middle\' . For more info, view Qwarp` interface' ,
3648+  argstr = '-plusminus' ,
3649+  xor = ['duplo' , 'allsave' , 'iwarp' ])
3650+ 
3651+ 
3652+ class  QwarpPlusMinus (Qwarp ):
3653+  """A version of 3dQwarp for performing field susceptibility correction 
3654+  using two images with opposing phase encoding directions. 
3655+ 
3656+  For complete details, see the `3dQwarp Documentation. 
3657+  <https://afni.nimh.nih.gov/pub/dist/doc/program_help/3dQwarp.html>`_ 
3658+ 
3659+  Examples 
3660+  ======== 
3661+ 
3662+  >>> from nipype.interfaces import afni 
3663+  >>> qwarp = afni.QwarpPlusMinus() 
3664+  >>> qwarp.inputs.in_file = 'sub-01_dir-LR_epi.nii.gz' 
3665+  >>> qwarp.inputs.nopadWARP = True 
3666+  >>> qwarp.inputs.base_file = 'sub-01_dir-RL_epi.nii.gz' 
3667+  >>> qwarp.cmdline 
3668+  '3dQwarp -prefix Qwarp.nii.gz -plusminus -base sub-01_dir-RL_epi.nii.gz \  
3669+ 
3670+  >>> res = warp.run() # doctest: +SKIP 
3671+ 
3672+  """ 
3673+ 
3674+  input_spec  =  QwarpPlusMinusInputSpec 
0 commit comments