Learn R Programming

dti (version 1.2-0.1)

extract-methods: Methods for Function `extract' and `[' in Package `dti'

Description

The methods extract and/or compute specified statistics from object of class "dtiData", "dtiTensor", and "dtiIndices". This can be restricted to a subset of voxel.

Usage

## S3 method for class 'dtiData':
extract(x, 
    what=c("data","gradient","btb","s0","sb","siq"), 
    xind=TRUE, yind=TRUE, zind=TRUE)
  ## S3 method for class 'dtiTensor':
extract(x, what=c("tensor", "fa", "ga", "md", "evalues", 
      "andir", "s0", "mask", "bic", "aic", "outlier"),
    xind=TRUE, yind=TRUE, zind=TRUE, mc.cores = setCores(, reprt = FALSE))
  ## S3 method for class 'dwiMixtensor':
extract(x, what=c("andir", "order", "ev", "mix", "s0", 
      "mask", "fa", "eorder", "bic", "aic"), xind=TRUE, yind=TRUE, zind=TRUE)
  ## S3 method for class 'dtiIndices':
extract(x, what=c("fa", "andir", "ga", "md", "bary"), 
    xind=TRUE, yind=TRUE, zind=TRUE)
  ## S3 method for class 'dwiQball':
extract(x, what=c("sphcoef", "s0", "mask", "bic", "aic", 
      "outlier"), xind=TRUE, yind=TRUE, zind=TRUE)
  ## S3 method for class 'dtiData':
[(x, i, j, k, drop=FALSE)
  ## S3 method for class 'dtiTensor':
[(x, i, j, k, drop=FALSE)
  ## S3 method for class 'dtiIndices':
[(x, i, j, k, drop=FALSE)
  ## S3 method for class 'dkiTensor':
[(x, i, j, k, drop=FALSE)
  ## S3 method for class 'dkiIndices':
[(x, i, j, k, drop=FALSE)
  ## S3 method for class 'dwiQball':
[(x, i, j, k, drop=FALSE)

Arguments

x
Object of class dti
i
vector of x-coordinates, defaults to whole range.
j
vector of y-coordinates, defaults to whole range.
k
vector of z-coordinates, defaults to whole range.
xind
vector of x-coordinates, defaults to whole range.
yind
vector of y-coordinates, defaults to whole range.
zind
vector of z-coordinates, defaults to whole range.
what
Statistic to extract. See Methods Section for details.
drop
unused.
mc.cores
Number of cores to use. Defaults to number of threads specified for openMP, see documentation of package awsMethods. Our experience suggests to use 4-6 cores if available.

Value

  • For function extract a list with components carrying the names of the options specified in argument what. For code{"["} the cutted object.

See Also

dtiData, dtiTensor, dtiIndices dwiMixtensor, dwiQball