ants.segmentation.functional_lung_segmentation
- functional_lung_segmentation(image, mask=None, number_of_iterations=2, number_of_atropos_iterations=5, mrf_parameters='[0.7,2x2x2]', number_of_clusters=6, cluster_centers=None, bias_correction='n4', verbose=True)[source]
Ventilation-based segmentation of hyperpolarized gas lung MRI.
Lung segmentation into classes based on ventilation as described in this paper:
- Parameters:
image (
ANTs image) – Input proton-weighted MRI.mask (
ANTs image) – Mask image designating the region to segment. 0/1 = background/foreground.number_of_iterations (
int) – Number of Atropos <–> bias correction iterations (outer loop).number_of_atropos_iterations (
int) – Number of Atropos iterations (inner loop). If number_of_atropos_iterations = 0, this is equivalent to K-means with no MRF priors.mrf_parameters (
str) – Parameters for MRF in Atropos.number_of_clusters (
int) – Number of tissue classes.cluster_centers (
numpy.ndarrayortuple) – Initialization centers for k-means.bias_correction (
str) – Apply “n3”, “n4”, or no bias correction (default = “n4”).verbose (
bool) – Print progress to the screen.
- Returns:
Dictionary with segmentation image,probability images,andprocessed image.
Example
>>> import ants >>> image = ants.image_read(ants.get_data("mni")).resample_image((4,4,4)) >>> mask = image.get_mask() >>> seg = ants.functional_lung_segmentation(image, mask, verbose=True, number_of_iterations=1, number_of_clusters=2, number_of_atropos_iterations=1)