Learn R Programming

mritc (version 0.3-2)

makeMRIspatial: 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)

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 d
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.

Value

  • A list containing the following components:
  • neighborsa 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.
  • blocksthe (sub)voxels within each block are mutually independent given the (sub)voxels in other blocks.
  • sublogical; the same as the input sub.
  • subvoxif sub is TRUE, it is a matrix, with each row giving the eight subvoxels of a voxel; otherwise it is equal to NULL.

References

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

Examples

Run this code
mask <- array(1, dim=c(2,2,2))
  spa <- makeMRIspatial(mask, nnei=6, sub=FALSE)
  spa <- makeMRIspatial(mask, nnei=6, sub=TRUE)

Run the code above in your browser using DataLab