atropos | R Documentation |
A finite mixture modeling (FMM) segmentation approach with possibilities for
specifying prior constraints. These prior constraints include the
specification of a prior label image, prior probability images (one for each
class), and/or an MRF prior to enforce spatial smoothing of the labels.
Similar algorithms include FAST and SPM. atropos can also perform
multivariate segmentation if you pass a list of images in: e.g.
a=c(img1,img2)
.
atropos(
a,
x,
i = "KMeans[3]",
m = "[0.2,1x1]",
c = "[5,0]",
priorweight = 0.25,
verbose = FALSE,
use_random_seed = FALSE,
...
)
a |
One or more scalar images to segment. If priors are not used, the intensities of the first image are used to order the classes in the segmentation output, from lowest to highest intensity. Otherwise the order of the classes is dictated by the order of the prior images. |
x |
mask image. |
i |
initialization usually |
m |
mrf parameters as a string, usually |
c |
convergence parameters, |
priorweight |
usually 0 (priors used for initialization only), 0.25 or 0.5. |
verbose |
boolean |
use_random_seed |
Initialize internal random number generator with a random seed.
Otherwise, initialize with a constant seed number. If this is |
... |
more parameters, see Atropos help in ANTs |
0 – Success
1 – Failure
Shrinidhi KL, B Avants
img <- antsImageRead(getANTsRData("r16"), 2)
img <- resampleImage(img, c(64, 64), 1, 0)
mask <- getMask(img)
segs1 <- atropos(
a = img, m = "[0.2,1x1]",
c = "[2,0]", i = "kmeans[3]", x = mask
)
# Use probabilities from k-means seg as priors
segs2 <- atropos(
a = img, m = "[0.2,1x1]",
c = "[2,0]", i = segs1$probabilityimages, x = mask
)
feats <- list(img, iMath(img, "Laplacian"), iMath(img, "Grad"))
segs3 <- atropos(
a = feats, m = "[0.2,1x1]",
c = "[2,0]", i = segs1$probabilityimages, x = mask
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.