smoothIRSolid | R Documentation |
estimateIRsolid
Adaptive smoothing of Rx and Sx maps over WM and GM areas.
smoothIRSolid(IRmixedobj, kstar = 24, patchsize = 1, alpha = 0.025,
mscbw = 5, bysegment=TRUE, partial=TRUE, verbose=TRUE)
IRmixedobj |
object of class |
kstar |
number of steps for AWS algorithm |
patchsize |
patchsize in paws |
alpha |
significance level for decisions in aws algorithm (suggestion: between 1e-5 and 0.025) |
mscbw |
bandwidth for 3D median smoother used to stabilize the covariance estimates. |
bysegment |
|
partial |
|
verbose |
logical: Monitor process. |
This uses a vectorized version of the AWS algorithm that emloys inverse covariance estimates of the estimated parameters. Local smoothing is done for Rx and Sx maps in ergs which can be assumed to be locally smooth within tissue. No smoothing for fx maps since they may vary.
an object of class "IRmixed"
, but with components Sx and Rx replaced. The object carries an additional component bi
containing an array of sum of weights characterizing the amount of smoothing.
Karsten Tabelow tabelow@wias-berlin.de
J\"org Polzehl polzehl@wias-berlin.de
estimateIRfluid
, estimateIRsolid
, estimateIRsolidfixed
,estimateIR
##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (ergs, segm, kstar = 24, ladjust = 1)
{
mask <- segm > 1
nvoxel <- sum(mask)
bpars <- array(0, c(2, nvoxel))
icovbpars <- array(0, c(2, 2, nvoxel))
bpars[1, ] <- ergs$Rx[mask]
bpars[2, ] <- ergs$Sx[mask]
ICovx <- ergs$ICovx
dim(ICovx) <- c(3, 3, prod(dim(mask)))
icovbpars <- ICovx[-1, -1, mask]
z <- vpawscov2(bpars, kstar, icovbpars/ladjust, segm > 1)
ergs$Rx[mask] <- z$theta[1, ]
ergs$Sx[mask] <- z$theta[2, ]
bi <- array(0, dim(mask))
bi[mask] <- z$bi
ergs$bi <- bi
ergs
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.