ants.segmentation.kelly_kapowski
- kelly_kapowski(s, g, w, its=45, r=0.025, m=1.5, gm_label=2, wm_label=3, **kwargs)[source]
Compute cortical thickness using the DiReCT algorithm.
Diffeomorphic registration-based cortical thickness based on probabilistic segmentation of an image. This is an optimization algorithm.
- Parameters:
s (
ANTsimage) – segmentation imageg (
ants.core.ANTsImage) – gray matter probability imagew (
ants.core.ANTsImage) – white matter probability imageits (
int) – convergence params - controls iterationsr (
scalar) – gradient descent update parameterm (
scalar) – gradient field smoothing parametergm_label (
int) – label for gray matter in the segmentation imagewm_label (
int) – label for white matter in the segmentation imagekwargs (
keyword arguments) – anything else, see KellyKapowski help in ANTs
- Return type:
ants.core.ANTsImage
Example
>>> import ants >>> img = ants.image_read( ants.get_ants_data('r16') ,2) >>> img = ants.resample_image(img, (64,64),1,0) >>> mask = ants.get_mask( img ) >>> segs = ants.kmeans_segmentation( img, k=3, kmask = mask) >>> thick = ants.kelly_kapowski(s=segs['segmentation'], g=segs['probabilityimages'][1], w=segs['probabilityimages'][2], its=45, r=0.5, m=1)