makeMRIspatial {mritc}R Documentation

Obtain Spatial Features of a Mask of an MR Image

Description

Obtain various spatial features of an MR image, which are used in tissue classification.

Usage

   makeMRIspatial(mask, nnei, sub, bias)

Arguments

mask

three dimensional array. The voxels with value 1 are inside the mask; with value 0 are outside. We just focus on voxels inside the mask.

nnei

the number of neighbors. Right now only 6, 18, and 26 neighbors are supported. For a 3D image, besides defining 6 neighbors in the x, y, and z directions, one can add 12 diagonal neighbors in the x-y, x-z, and y-z planes, and another 8 on the 3D diagonals. This leads to a six neighbor structure, an eighteen neighbor structure, and a twenty-six neighbor structure.

sub

logical; if TRUE, a new mask which splits each voxel into eight subvoxels is generated, and then obtain the neighbors and blocks of subvoxels; otherwise obtain the neighbors and blocks at the voxel level. The default if FALSE.

bias

logical; if TRUE, the spatial parameters for biased field correction are calculated. The default if FALSE.

Value

A list containing the following components:

neighbors

a matrix, each row of which giving the neighbors of a voxel or subvoxel. The number of rows is equal to the number of (sub)voxels within the mask and the number of columns is the number of neighbors of each (sub)voxel. For the (sub)voxels on the boundaries, when one or more of their neighbors are missing, the missing are represented by the total number of (sub)voxels within the mask plus 1.

blocks

the (sub)voxels within each block are mutually independent given the (sub)voxels in other blocks.

sub

logical; the same as the input sub.

subvox

if sub is TRUE, it is a matrix, with each row giving the eight subvoxels of a voxel; otherwise it is equal to NULL.

weights

if bias is TRUE, it is a vector of weights of neighbors of every voxel for bias field correction; otherwise it is equal to NULL. The default is NULL.

weineighbors

if bias is TRUE, it is a vector of sum of weights of neighbors for bias field correction, one element per voxel; otherwise it is equal to NULL. The default is NULL.

References

Dai Feng, Dong Liang, and Luke Tierney (2013) An unified Bayesian hierarchical model for MRI tissue classification Statistics in Medicine

Dai Feng (2008) Bayesian Hidden Markov Normal Mixture Models with Application to MRI Tissue Classification Ph. D. Dissertation, The University of Iowa

Examples

  mask <- array(1, dim=c(2,2,2))
  spa <- makeMRIspatial(mask, nnei=6, sub=FALSE)
  spa <- makeMRIspatial(mask, nnei=6, sub=TRUE)
  spa <- makeMRIspatial(mask, nnei=26, sub=TRUE, bias=TRUE)

[Package mritc version 0.5-3 Index]