|
21 | 21 | from ...external.six import string_types
|
22 | 22 | from ...utils.filemanip import (load_json, save_json, split_filename)
|
23 | 23 |
|
| 24 | +class BlurToFWHMInputSpec(AFNICommandInputSpec): |
| 25 | + in_file = File(desc='The dataset that will be smoothed', argstr='-input %s', mandatory=True, exists=True) |
| 26 | + |
| 27 | + automask = traits.Bool(desc='Create an automask from the input dataset.', argstr='-automask', exists=True) |
| 28 | + fwhm = traits.Float(desc='Blur until the 3D FWHM reaches this value (in mm)', argstr='-FWHM %f') |
| 29 | + fwhmxy = traits.Float(desc='Blur until the 2D (x,y)-plane FWHM reaches this value (in mm)', argstr='-FWHMxy %f') |
| 30 | + blurmaster = File(desc='The dataset whose smoothness controls the process.', argstr='-blurmaster %s', exists=True) |
| 31 | + mask = File(desc='Mask dataset, if desired. Voxels NOT in mask will be set to zero in output.', argstr='-blurmaster %s', exists=True) |
| 32 | + |
| 33 | + |
| 34 | +class BlurToFWHM(AFNICommand): |
| 35 | + """Blurs a 'master' dataset until it reaches a specified FWHM smoothness (approximately). |
| 36 | +
|
| 37 | + For complete details, see the `to3d Documentation |
| 38 | + <https://afni.nimh.nih.gov/pub/dist/doc/program_help/3dBlurToFWHM.html>`_ |
| 39 | +
|
| 40 | + Examples |
| 41 | + ======== |
| 42 | +
|
| 43 | + >>> from nipype.interfaces import afni |
| 44 | + >>> blur = afni.BlurToFWHM() |
| 45 | + >>> blur.inputs.in_file = 'epi.nii' |
| 46 | + >>> blur.inputs.fwhm = 2.5 |
| 47 | + >>> blur.cmdline #doctest: +ELLIPSIS |
| 48 | + '3dBlurToFWHM -FWHM 2.500000 -input .../nipype/nipype/testing/data/epi.nii -prefix epi_afni' |
| 49 | +
|
| 50 | + """ |
| 51 | + |
| 52 | + _cmd = '3dBlurToFWHM' |
| 53 | + input_spec = BlurToFWHMInputSpec |
| 54 | + output_spec = AFNICommandOutputSpec |
24 | 55 |
|
25 | 56 | class To3DInputSpec(AFNICommandInputSpec):
|
26 | 57 | out_file = File(name_template="%s", desc='output image file name',
|
|
0 commit comments