Description Usage Arguments Details Value Author(s) Examples
Generate multivariate Gaussian artifacts for a multi-dimensional image-like data (array object).
1 |
grids |
A list of monotonically increasing coordinate grids. For
example, |
center |
The center of the artifact. Default value: the
origin. Example: |
std |
The standard deviation of the (unscaled) Gaussian
density is set to |
radius |
The radius of the (unscaled) artifact. Generated value outside of this radius is zero. Default to 10. |
maxval |
Generated Gaussian artifacts will be scaled so that the
maxium value equals |
minval |
Generated Gaussian artifacts will be set to zero if they
are less than |
xscale |
A scaling matrix for the shape of the artifact. Use this to generate elliptic artifacts. Default to the identity matrix. |
The unscaled artifacts is a multivariate Gaussian density centered at
center
with standard deviation std
. Its support is a
ball of radius radius
. A user specified xscale
matrix
can be used to stretch/rotate this ball.
An array defined on grids
which represents an artifact. It
can be added to an existing array with the same grids.
Xing Qiu
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## A3 is a 3x3 scaling matrix.
A3 <- matrix(c(1.5, 0.5, 0.0,
0.5, 1.5, 0.0,
0.0, 0.0, 1.0), nrow=3)
## From a DTI related simulation, 128x128x3 voxels, each 2x2x2mm large.
grid.x <- seq(1, 255, 2); grid.y <- seq(1, 255, 2); grid.z <- seq(1,5,2)
N.x <- length(grid.x); N.y <- length(grid.y); N.z <- length(grid.z)
grids <- list(grid.x, grid.y, grid.z)
##Sharp effects, 60 voxels, Max: 10.
Z1 <- artifacts(grids, center=c(50,80,3), xscale=A3, radius=4, maxval=10.0, minval=3)
## Diffused effects, 516 voxels. Max: 1.2.
Z2 <- artifacts(grids, center=c(50,80,3), maxval=1.2, radius=15)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.