Lung segmentation into classes based on ventilation as described in this paper:

functionalLungSegmentation(
  image,
  mask,
  numberOfIterations = 2,
  numberOfAtroposIterations = 5,
  mrfParameters = "[0.7,2x2x2]",
  numberOfClusters = 6,
  clusterCenters = NA,
  biasCorrection = "n4",
  verbose = TRUE
)

Arguments

image

input proton-weighted MRI.

mask

mask image designating the region to segment. 0/1 = background/foreground.

numberOfIterations

number of Atropos <–> bias correction iterations (outer loop).

numberOfAtroposIterations

number of Atropos iterations (inner loop). If numberOfAtroposIterations = 0, this is equivalent to K-means with no MRF priors.

mrfParameters

parameters for MRF in Atropos.

numberOfClusters

number of tissue classes (default = 4)

clusterCenters

initialization centers for k-means

biasCorrection

apply n3, n4, or no bias correction (default = "n4").

verbose

print progress to the screen.

Value

segmentation image, probability images, and processed input image.

Author

Tustison NJ

Examples

if (FALSE) { # \dontrun{

library(ANTsR)

image <- antsImageRead("lung.nii.gz")
mask <- antsImageRead("mask.nii.gz")
output <- functionalLungSegmentation(image, mask)
antsImageWrite(output$segmentationImage, "outputSegmentation.nii.gz")
} # }