GaussSmoothArray         package:AnalyzeFMRI         R Documentation

_S_p_a_t_i_a_l_l_y _s_m_o_o_t_h _a_n _a_r_r_a_y _w_i_t_h _G_a_u_s_s_i_a_n _k_e_r_n_e_l.

_D_e_s_c_r_i_p_t_i_o_n:

     Applies a stationary Gaussian spatial smoothing kernel to a 3D or
     4D array.

_U_s_a_g_e:

     GaussSmoothArray(x, voxdim=c(1, 1, 1), ksize=5, sigma=diag(3, 3), mask=NULL, var.norm=FALSE)

_A_r_g_u_m_e_n_t_s:

       x: The array to be smoothed.

  voxdim: The dimensions of the _vol_ume _el_ements (voxel) that make
          up the array.

   ksize: The dimensions (in number of voxels) of the 3D discrete
          smoothing kernel used to smooth the array.

   sigma: The covariance matrix of the 3D Gaussian smoothing kernel.
          This matrix doesn't have to be non-singular; zero on the
          diagonal of sigma indicate no smoothing in that direction. 

    mask: A 3D 0-1 mask that delimits where the smoothing occurs.

var.norm: Logical flag indicating whether to normalize the variance of
          the smoothed array.

_V_a_l_u_e:

     The smoothed array is returned.

_A_u_t_h_o_r(_s):

     J. L. Msrchini

_S_e_e _A_l_s_o:

     'GaussSmoothKernel'

_E_x_a_m_p_l_e_s:

     d <- c(10, 10, 10, 20)
     mat <- array(rnorm(cumprod(d)[length(d)]), dim = d)
     mat[, , 6:10, ] <- mat[, , 6:10, ] + 3
     mask <- array(0, dim = d[1:3])
     mask[3:8, 3:8, 3:8] <- 1
     b <- GaussSmoothArray(mat, mask = mask, voxdim = c(1, 1, 1), ksize = 5, sigma = diag(1, 3))      

