public class MLGaussianEstimator extends Object implements StartPointEstimator
Gaussian, on n-dimensional image data. It uses plain
maximum-likelohood estimator for a normal distribution.
The problem dimensionality is specified at construction by nDims
parameter.
The domain span size is simply set to be 1 + 2 x ceil(sigma) in
all dimensions.
Parameters estimation returned by
initializeFit(Localizable, Observation) is based on
maximum-likelihood esimtation, which requires the background of the image
(out of peaks) to be close to 0. Returned parameters are ordered as follow:
0. A 1 → ndims x₀ᵢ ndims+1 b = 1 / σ²
EllipticGaussianOrtho| Constructor and Description |
|---|
MLGaussianEstimator(double typicalSigma,
int nDims)
Instantiates a new elliptic gaussian estimator.
|
| Modifier and Type | Method and Description |
|---|---|
long[] |
getDomainSpan()
Returns the domain size that will be sampled around each peak for curve
fitting.
|
double[] |
initializeFit(Localizable point,
Observation data)
Returns a new double array containing an starting point estimate for a
specific curve fitting problem.
|
String |
toString() |
public MLGaussianEstimator(double typicalSigma,
int nDims)
typicalSigma - the typical sigma of the peak to estimate (one element
per dimension).public long[] getDomainSpan()
StartPointEstimator
Domain size is provided as a long[] array, one element per
dimension. The size must be understood a radius span: the actual
rectangle size is 2 x span[d] + 1. For instance, if in a 2D
problem a value of [2, 2] is provided, the actual rectangle
that will be sampled will be 5 x 5
getDomainSpan in interface StartPointEstimatorpublic double[] initializeFit(Localizable point, Observation data)
StartPointEstimator
This same data object, specified as an Observation object,
will later be used by the FunctionFitter,
so convoluted implementations can and may modify
it in a clever way to optimize the subsequent fitting step.
It is important that this method instantiates a new double array, for its
elements will be evolved by the FunctionFitter, but the reference
to the array will be shared for the specified peak.
Since the estimates are returned in a double array, each element has a
meaning only in the view of a particular curve fitting problem, and will
be applicable only to a specific FunctionFitter.
initializeFit in interface StartPointEstimatorpoint - the coarse localization of the peak whose parameters are to be
estimated.data - the image data around the peak to estimate, given as an
Observation object.Copyright © 2015–2022 ImgLib2. All rights reserved.