Converts an AFNI file to an NIfTI file or nifti
using 3dDespike
afni_3dDespike(file, ignore_vols = 0, curve_order = NULL,
cut_values = c(2.5, 4), mask = TRUE, dilate = 4,
localedit = FALSE, method = c("OLD", "NEW"), opts = "",
retimg = TRUE, ...)
despike(...)| file | AFNI BRIK or HEAD file |
|---|---|
| ignore_vols | Number of volumes to ignore/delete |
| curve_order | the curve fit order |
| cut_values | a length 2 vector with the first being the threshold value of sigma for a spike and the second being the upper range of the allowed deviation from the curve: |
| mask | should a mask of high-intensity voxels be used ( |
| dilate | dilation factor of the mask |
| localedit | Change the editing process to the following: If a voxel |s| value is >= c2, then replace the voxel value with the average of the two nearest non-spike (|s| < c2) values; the first one previous and the first one after. Note that the first cut value is not used here. |
| method | should the NEW or OLD method be used for the L1 fit. NEW is faster |
| opts | Additional options to pass to |
| retimg | Should an image be returned? |
| ... | additional arguments to |
If retimg then object of class nifti. Otherwise,
the outfile argument is returned (or a temporary filename)