ATROPOS(1)
β¨ ATROPOS(1) Β· User Commands β¨
πΈ NAME πΈ
Okay bestie, Atropos is part of the ANTS registration suite π¦
π DESCRIPTION π
π
COMMAND: Atropos π
So Atropos is a finite mixture modeling (FMM) segmentation approach β¨ and it's giving prior constraints energy. You can feed it a prior label image, prior probability images (one for each class), and/or an MRF prior to keep the labels spatially smooth π«Ά All segmentation images, including priors and masks, must be in the same voxel and physical space π¨ Similar algorithms are FAST and SPM. The reference is Avants BB, Tustison NJ, Wu J, Cook PA, Gee JC. An open source multivariate framework for n-tissue segmentation with evaluation on public data. Neuroinformatics. 2011 Dec;9(4):381-400. π
π OPTIONS: π
-d,--image-dimensionality 2/3/4β Ngl this one lets you force the image to be treated as a specific dimensionality π If you don't set it, Atropos tries to figure out the dimensionality from the first input image on its own.-a,--intensity-image [intensityImage,<adaptiveSmoothingWeight>]β This is how you hand Atropos one or more scalar images to segment with π If you have no prior info, the first scalar image on the command line is used to order the labels, so the class with the smallest intensity signature becomes class1through classN, which means the voxels with the biggest intensity values π The optional adaptive smoothing weight only matters when you're using prior label or probability images. It's a scalar between[0,1]that smooths each labeled region separately and blends the intensity at each voxel between the original value and its smoothed version π¦ The smoothness is controlled by the-b/--bsplineoption, so go check that one too π§-b,--bspline [<numberOfLevels=6>,<initialMeshResolution=1x1x...>,<splineOrder=3>]β If the adaptive smoothing weights are greater than0, the intensity images get smoothed when Atropos calculates the likelihood values. This accounts for subtle intensity differences across the same tissue regions πΈ-i,--initializationβ You have to pick one of these to initialize the FMM parameters, no skipping π ββοΈ If you don't have prior label or probability images, the move is to use kmeans, because it's usually faster than otsu and works with multivariate initialization too π Heads up though: kmeans uses a Euclidean distance on the inter-cluster distances, so you might need to scale your extra input images appropriately β οΈ Random initialization is purely for intellectual curiosity π€ The prior weighting (in the range[0,1]) modulates how posterior probabilities get calculated, mixinglikelihood*mrfpriorwithlikelihood*mrfprior*priorβ¨ If you're specifying lots of prior probability images for a multi-label segmentation, there's a minimize usage option (see-m). With that option you can set a prior probability threshold, so only the pixels above it get stored in memory π§
-i, --initialization Random[numberOfClasses]
Otsu[numberOfTissueClasses]
KMeans[numberOfTissueClasses,<clusterCenters(in ascending order and for first intensity image only)>]
PriorProbabilityImages[numberOfTissueClasses,fileSeriesFormat(index=1 to numberOfClasses) or vectorImage,priorWeighting,<priorProbabilityThreshold>]
PriorLabelImage[numberOfTissueClasses,labelImage,priorWeighting]
-s,--partial-volume-label-set label1xlabel2xlabel3β Partial volume estimation is the move when you want to model mixtures of classes inside a single voxel π Atropos currently lets you model two class mixtures per partial volume class. You give it a set of class labels for each partial volume class you want. Say you're doing a classic 3-tissue segmentation (csf, gm, wm) with kmeans initialization, and you also want to model partial voluming between csf/gm and gm/wm. You'd use-i kmeans[3]and-s 1x2 -s 2x3π§ In that example you'd end up with 3 tissue classes and 2 partial volume classes. You can also optionally limit partial volume handling to MRF considerations only, so the output is just the three tissues π--use-partial-volume-likelihoods 1/(0)true/(false)β You decide whether or not to use partial volume likelihoods π¦ If you do, the partial volume class is treated as separate from the tissue classes. If you don't, the MRF handles partial volume by itself, and partial volume voxels aren't treated as separate classes π«Ά-p,--posterior-formulationβ There are a bunch of posterior probability formulations, plus different update options to play with π To get the theoretical convergence properties, a proper formulation of the well-known iterated conditional modes (ICM) uses an asynchronous update step that's modulated by an annealing temperature π₯ If you setAnnealingTemperature > 1in the posterior formulation, you get a traditional code set for a proper ICM update. Otherwise, a synchronous update step happens at every iteration πΈ The annealing temperature,T, turnsposteriorProbabilityintoposteriorProbability^(1/T)over the course of optimization. The formulation options are below β¨
Socrates[<useMixtureModelProportions=1>,<initialAnnealingTemperature=1>,<annealingRate=1>,<minimumTemperature=0.1>]
Plato[<useMixtureModelProportions=1>,<initialAnnealingTemperature=1>,<annealingRate=1>,<minimumTemperature=0.1>]
Aristotle[<useMixtureModelProportions=1>,<initialAnnealingTemperature=1>,<annealingRate=1>,<minimumTemperature=0.1>]
Sigmoid[<useMixtureModelProportions=1>,<initialAnnealingTemperature=1>,<annealingRate=1>,<minimumTemperature=0.1>]]
And here's how each one computes things:
Socrates: posteriorProbability = (spatialPrior)^priorWeight*(likelihood*mrfPrior)^(1-priorWeight)
Plato: posteriorProbability = 1.0
Aristotle: posteriorProbability = 1.0
Sigmoid: posteriorProbability = 1.0
-x,--mask-image maskImageFilenameβ The image mask is required π¨ It defines the region that the Atropos algorithm labels π-c,--convergence numberOfIterationsβ Convergence is checked by calculating the mean maximum posterior probability over the region of interest at each iteration β¨ When that value goes up or down by less than the specified threshold compared to the previous iteration, or when the max number of iterations gets exceeded, the program terminates π
-c, --convergence numberOfIterations [<numberOfIterations=5>,<convergenceThreshold=0.001>]
-k,--likelihood-modelβ Atropos has both parametric and non-parametric options π The Gaussian parametric option is the one everyone uses (SPM and FAST do this too), where the mean and standard deviation of each class's Gaussian get calculated every iteration π§ Other groups go non-parametric, like option 2 here. The advice is to stick with options 1 or 2, since they're pretty standard and the default parameters work fine π«Ά
-k, --likelihood-model Gaussian
HistogramParzenWindows[<sigma=1.0>,<numberOfBins=32>]
ManifoldParzenWindows[<pointSetSigma=1.0>,<evaluationKNeighborhood=50>,<CovarianceKNeighborhood=0>,<kernelSigma=0>]
JointShapeAndOrientationProbability[<shapeSigma=1.0>,<numberOfShapeBins=64>, <orientationSigma=1.0>, <numberOfOrientationBins=32>]
LogEuclideanGaussian
-m,--mrf [<smoothingFactor=0.3>,<radius=1x1x...>]β Markov random field (MRF) theory is the framework that enforces spatially contextual constraints on the segmentation π¦ The default smoothing factor of0.3gives a moderate amount of smoothing π Bump it up for more smoothing, turn it down for less πΈ The radius sets the MRF neighborhood. There are different update schemes, but only asynchronous updating has theoretical convergence properties π₯
-m, --mrf [<mrfCoefficientImage>,<radius=1x1x...>]
-g,--icm [<useAsynchronousUpdate=1>,<maximumNumberOfICMIterations=1>,<icmCodeImage=''>]β Asynchronous updating needs an ICM code image, which is a label image (labels in the range{1,..,MaximumICMCode}) built so that no MRF neighborhood has duplicate ICM code labels π§ To update the voxel class labels, you loop through the code labels, and for each code label you loop through the image and update the voxels whose class label matches that ICM code label π You can print out the ICM code image by giving an ITK-compatible image filename β¨-r,--use-random-seed 0/(1)β Sets the internal random number generator up with a random seed π² Otherwise it starts from a constant seed number π-o,--output [classifiedImage,<posteriorProbabilityImageFileNameFormat>]β The main output is a labeled image where every voxel in the masked region gets a label from1, 2, ..., Nπ You can also output the posterior probability images, in the same format as the prior probability images, likeposterior%02d.nii.gz(C-style file name formatting) π-u,--minimize-memory-usage (0)/1β Memory usage isn't minimized by default π§ If you need to save memory, the various probability and distance images get calculated on the fly instead of being stored in memory at every iteration. Also, if you're using prior probability images, only the non-negligible pixel values get stored in memory π<VALUES>: 0-w,--winsorize-outliersβ To take the sting out of outliers when calculating the weighted mean and weighted covariance, you can remove them using the options below π«Ά
-w, --winsorize-outliers
BoxPlot[<lowerPercentile=0.25>,<upperPercentile=0.75>,<whiskerLength=1.5>]
GrubbsRosner[<significanceLevel=0.05>,<winsorizingLevel=0.10>]
-e,--use-euclidean-distance (0)/1β This is where part 1 ends, bestie, there's more of this page coming up next π¦π
Okay so once you've got your prior label or probability images, Atropos spreads those labels across the whole masked region, which means every single voxel in the mask ends up labeled π«Ά It does this with a signed distance transform of the label, and the geometry is giving precision β¨
Or you can use the fast marching filter instead π§ This one is a whole mood because it respects the distance along the shape of the mask, so it's the move for super sinuous stuff like the sulci and gyri of the cortex π§
Default: 0.
-l,--label-propagationwhichLabel[lambda=0.0,<boundaryProbability=1.0>]β okay, so each prior label has its own propagation settings, and you can tweak them with lambda and the boundary probability π The boundary probability is a value in the range[0,1]for how likely the label is on the boundary. It ramps up linearly to a max of1.0inside the labeled region π₯ Lambda controls how fast the probability fades outside the labeled region, starting from that boundary probability, following this formula:
boundaryProbability*exp( -lambda * distance )
Lambda is the main character of the decay π
-v,--verbose(0)/1β verbose output, aka the chatty mode π£οΈ The(0)/1notation means the default is0and you can switch it to1π-hβ print the help menu, short version π--helpβ print the full help menu πΈ Values:1.
And that's a wrap on ATROPOS(1) π¦ This was written for Atropos 2.6.4+dfsg, the December 2025 drop, and honestly the whole page is giving main character energy ππ
π¦ where this page comes from
- ubuntu resolute: ants 2.6.4+dfsg-1 Β· BSD-3-Clause
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms