public class MLEllipticGaussianEstimator extends Object implements StartPointEstimator
EllipticGaussianOrtho
, ellipse axes must be parallel to image axes)
functions on n-dimensional image data. It uses plain maximum-likelihood
estimator for a normal distribution.
The problem dimensionality is specified at construction by the length of the typical sigma array.
The domain span size is simply set to be
1 + 2 x ceil(typical_sigma)
in each dimension.
Parameters estimation returned by
initializeFit(Localizable, Observation)
is based on
maximum-likelihood estimator for a normal distribution, which requires the
background of the image (out of peaks) to be close to 0. Returned parameters
are ordered as follow:
0 → ndims-1 x₀ᵢ ndims. A ndims+1 → 2 × ndims bᵢ = 1 / σᵢ²
EllipticGaussianOrtho
Constructor and Description |
---|
MLEllipticGaussianEstimator(double[] typicalSigmas)
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 MLEllipticGaussianEstimator(double[] typicalSigmas)
typicalSigmas
- the typical sigmas 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 StartPointEstimator
public 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 StartPointEstimator
point
- 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.