smoothIRSolid: Smooth object generated by function 'estimateIRsolid'

View source: R/estimateIR.R

smoothIRSolidR Documentation

Smooth object generated by function estimateIRsolid

Description

Adaptive smoothing of Rx and Sx maps over WM and GM areas.

Usage

smoothIRSolid(IRmixedobj, kstar = 24, patchsize = 1, alpha = 0.025,
                   mscbw = 5, bysegment=TRUE, partial=TRUE, verbose=TRUE)

Arguments

IRmixedobj

object of class IRmixed generated by function estimateIRsolid

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

TRUE: restrict smoothing to segments from segmentation, FALSE: restrict smoothing to solid mask.

partial

TRUE: ignore information concerning parameter fx when smoothing.

verbose

logical: Monitor process.

Details

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.

Value

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.

Author(s)

Karsten Tabelow tabelow@wias-berlin.de
J\"org Polzehl polzehl@wias-berlin.de

See Also

estimateIRfluid, estimateIRsolid, estimateIRsolidfixed,estimateIR

Examples

##---- 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
  }

qMRI documentation built on Sept. 18, 2023, 9:08 a.m.