An array containing the noise with dimensions specified in dim and nscan.
Arguments
dim
A vector specifying the dimensions of the image.
sigma
The standard deviation of the noise.
nscan
The number of scans in the dataset.
method
Method specifying the type of spatial correlation. Default is "corr".
type
Type of distribution if method=="corr". Default is "gaussian"
rho
If method=="corr", the value of the autocorrelation coefficient.
FWHM
If method=="gammaRF" or method=="gaussRF", the full-width-half-maximum of the Gaussian kernel.
gamma.shape
If method=="gammaRF", the shape parameter of the Gamma distribution.
gamma.rate
If method=="gammaRF", the shape parameter of the Gamma distribution.
vee
If method=="corr" and type=="rician", the non-centrality parameter of the rician distribution.
template
An array representing the anatomical structure or mask with dimensions equal to dim.
verbose
Logical indicating if warnings should be printed.
Author
J. Durnez, B. Moerkerke, M. Welvaert
Details
The function generates spatially correlated noise. When method=="corr", AR(1) voxelwise correlations are introduced.
If method=="gaussRF" of method=="gammaRF", respectively a Gaussian Random Field or a Gamma Random Field is created. The result is a noise array with specified dimensions and desired standard deviation.
The generation of the random fields is based on the function Sim.3D.GRF from J.L. Marchini in the package AnalyzeFMRI.