extract-methods {dti} | R Documentation |
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
## S4 method for signature 'dtiData'
extract(x,
what=c("data","gradient","btb","s0","sb","siq"),
xind=TRUE, yind=TRUE, zind=TRUE)
## S4 method for signature '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))
## S4 method for signature 'dwiMixtensor'
extract(x, what=c("w0","andir", "order", "ev", "mix", "s0",
"mask", "fa", "eorder", "bic", "aic"), xind=TRUE, yind=TRUE, zind=TRUE)
## S4 method for signature 'dtiIndices'
extract(x, what=c("fa", "andir", "ga", "md", "bary"),
xind=TRUE, yind=TRUE, zind=TRUE)
## S4 method for signature 'dwiQball'
extract(x, what=c("sphcoef", "s0", "mask", "bic", "aic",
"outlier"), xind=TRUE, yind=TRUE, zind=TRUE)
## S4 method for signature 'dtiData'
x[i, j, k, drop=FALSE]
## S4 method for signature 'dtiTensor'
x[i, j, k, drop=FALSE]
## S4 method for signature 'dtiIndices'
x[i, j, k, drop=FALSE]
## S4 method for signature 'dkiTensor'
x[i, j, k, drop=FALSE]
## S4 method for signature 'dkiIndices'
x[i, j, k, drop=FALSE]
## S4 method for signature 'dwiQball'
x[i, j, k, drop=FALSE]
Arguments
x |
Object of class |
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.
Methods
The generic extract function "["
does what it is expected to do: it extracts parts of
the object specified by i
, j
, and k
.
- x = "ANY"
Returns a warning for
extract
. Generic funtion for"["
returns an object of same class with data clipped to the indices specified in argumentsi
,j
andk
.- x = "dtiData"
Extraction of squared gradient matrix
"btb"
or of S0"s0"
, Sb"sb"
, Si/mean(SO)"siq"
or all images"data"
restricted to the cube defined by argumentsi
,j
andk
.- x = "dtiIndices"
Returns an array containing the specified statistics, i.e. fractional anisotropy
"fa"
, geodesic anisotropy"ga"
, mean diffusivity"md"
, main direction of anisotropy"andir"
and/or shape parameters"bary"
, as specified in argumentwhat
. Information is extracted for voxel within the cube defined byxind
,yind
, andzind
.- x = "dtiTensor"
Returns a list with component names corresponding to
what
containing the specified statistics, i.e. fractional anisotropy"fa"
, geodesic anisotropy"ga"
, mean diffusivity"md"
, eigenvalues"evalues"
, main direction of anisotropy"andir"
, the tensor"tensor"
the estimated S0 image"s0"
, the values of the model selection criteia BIC"bic"
or AIC"aic"
and/or the mask used to restrict computations"mask"
, as specified in argumentwhat
. Information is extracted for voxel within the cube defined by argumentsxind
,yind
andzind
.- x = "dwiMixtensor"
Returns a list with component names corresponding to
what
containing the specified statistics. Possible values forwhat
are"w0"
(size of isotropic department),"order"
(estimated number of mixture components),"eorder"
effective order),"ev"
(eigenvalues),"mix"
(mixture weights),"andir"
(main directions of diffusion),"fa"
(FA index),"s0"
(the estimated S0 image), the values of the model selection criteia BIC"bic"
or AIC"aic"
andmask
(the mask used to restrict computations). Information is extracted for voxel within the cube defined by argumentsxind
,yind
andzind
.- x = "dwiQball"
Returns an array containing the specified statistics, the estimated coefficients with respect to the selected spherical harmonics basis
"sphcoef"
, the estimated S0 image"s0"
, the values of the model selection criteia BIC"bic"
or AIC"aic"
and/or the mask used to restrict computations"mask"
, as specified in argumentwhat
. Information is extracted for voxel within the cube defined by argumentsxind
,yind
andzind
.
Author(s)
Karsten Tabelow tabelow@wias-berlin.de
J\"org Polzehl polzehl@wias-berlin.de
See Also
dtiData
,
dtiTensor
,
dtiIndices
dwiMixtensor
,
dwiQball