algorithms.segmentation.segmentation¶
Module: algorithms.segmentation.segmentation
¶
Inheritance diagram for nipy.algorithms.segmentation.segmentation
:
Class¶
Segmentation
¶
-
class
nipy.algorithms.segmentation.segmentation.
Segmentation
(data, mask=None, mu=None, sigma=None, ppm=None, prior=None, U=None, ngb_size=26, beta=0.1)[source]¶ Bases:
object
-
__init__
(data, mask=None, mu=None, sigma=None, ppm=None, prior=None, U=None, ngb_size=26, beta=0.1)[source]¶ Class for multichannel Markov random field image segmentation using the variational EM algorithm. For details regarding the underlying algorithm, see:
Roche et al, 2011. On the convergence of EM-like algorithms for image segmentation using Markov random fields. Medical Image Analysis (DOI: 10.1016/j.media.2011.05.002).
- Parameters
data : array-like
Input image array
mask : array-like or tuple of array
Input mask to restrict the segmentation
beta : float
Markov regularization parameter
mu : array-like
Initial class-specific means
sigma : array-like
Initial class-specific variances
-
Functions¶
-
nipy.algorithms.segmentation.segmentation.
binarize_ppm
(q)[source]¶ Assume input ppm is masked (ndim==2)
-
nipy.algorithms.segmentation.segmentation.
moment_matching
(dat, mu, sigma, glob_mu, glob_sigma)[source]¶ Moment matching strategy for parameter initialization to feed a segmentation algorithm.
- Parameters
data: array
Image data.
mu : array
Template class-specific intensity means
sigma : array
Template class-specific intensity variances
glob_mu : float
Template global intensity mean
glob_sigma : float
Template global intensity variance
- Returns
dat_mu: array
Guess of class-specific intensity means
dat_sigma: array
Guess of class-specific intensity variances