substituteWaveletCoef {BHMSMAfMRI} | R Documentation |
Substitute 2D wavelet transform coefficients with user-given values
Description
substituteWaveletCoef
substitutes the wavelet coefficients stored wavelet object generated through 2D wavelet transform with user-given values and returns the modified wavelet object.
Usage
substituteWaveletCoef(grid, waveletobj, values)
Arguments
grid |
The number of voxels in one row (or, one column) of the brain slice of interest. Must be a power of 2. The total number of voxels is |
waveletobj |
A wavelet object of class |
values |
The values with which the wavelet coefficients are to be replaced. The order should be consistent with |
Details
The maximum value of grid
for this package is 512.
Value
A wavelet object of class imwd.object
with updated wavelet coefficients.
Author(s)
Nilotpal Sanyal, Marco Ferreira
Maintainer: Nilotpal Sanyal <nilotpal.sanyal@gmail.com>
See Also
Examples
set.seed(1)
n <- 3
grid <- 8
ntime <- 10
designmat <- cbind( rep(1,10), c(rep(c(1,0),5)) )
data <- array(dim=c(n,grid,grid,ntime),
rnorm(n*grid*grid*ntime))
glm.fit <- glmcoef(n, grid, data, designmat)
glmcoefstd <- glm.fit$GLMCoefStandardized[,,,1]
dwt = wavethresh::imwd(glmcoefstd[1,,],type="wavelet",
family="DaubLeAsymm",filter.number=6,bc="periodic")
dwt
values = rnorm(grid^2-1)
dwtnew = substituteWaveletCoef(grid,dwt,values)
dwtnew