|
ImageScience 3.0.0 | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectimagescience.feature.Statistics
public class Statistics
Computes image statistics.
Field Summary | |
---|---|
static int |
ADEVIATION
The average absolute deviation from the mean of the values in the image. |
static int |
ELEMENTS
The number of elements in the image. |
static int |
KURTOSIS
The Fisher kurtosis or fourth-order moment about the mean of the values in the image. |
static int |
L1NORM
The L1-norm or sum of the magnitudes of the values in the image. |
static int |
L2NORM
The L2-norm or zero-mean standard deviation of the values in the image. |
static int |
MASS
The mass or sum of the values in the image. |
static int |
MAXIMUM
The maximum value in the image. |
static int |
MEAN
The mean of the values in the image. |
static int |
MEDIAN
The median of the values in the image. |
Messenger |
messenger
The object used for message displaying. |
static int |
MINIMUM
The minimum value in the image. |
static int |
MODE
The mode or most frequently occurring value in the image. |
Progressor |
progressor
The object used for progress displaying. |
static int |
SDEVIATION
The standard deviation from the mean of the values in the image. |
static int |
SKEWNESS
The Fisher skewness or third-order moment about the mean of the values in the image. |
static int |
VARIANCE
The variance or second-order moment about the mean of the values in the image. |
Constructor Summary | |
---|---|
Statistics()
Default constructor. |
Method Summary | |
---|---|
double |
get(int statistic)
Returns the value of the requested statistic. |
void |
run(Image image)
Computes the statistics of an image. |
void |
run(Image image,
Coordinates min,
Coordinates max)
Computes the statistics of an image in a rectangular region of interest. |
void |
run(Image image,
Coordinates min,
Coordinates max,
Image mask)
Computes the statistics of an image in a masked rectangular region of interest. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MINIMUM
public static final int MAXIMUM
public static final int MEAN
public static final int MEDIAN
public static final int ELEMENTS
public static final int MASS
public static final int VARIANCE
public static final int MODE
public static final int SDEVIATION
public static final int ADEVIATION
public static final int L1NORM
public static final int L2NORM
public static final int SKEWNESS
public static final int KURTOSIS
public final Messenger messenger
public final Progressor progressor
Constructor Detail |
---|
public Statistics()
Method Detail |
---|
public double get(int statistic)
statistic
- The statistic whose value is to be returned. Must be one of the static fields of this class.
run()
methods.
java.lang.IllegalArgumentException
- If statistic
is not one of the static fields of this class.public void run(Image image)
FloatImage
, the median and mode are not computed exactly but are estimated with an accuracy of +/- 0.0005 percent of the dynamic range of the image.
image
- The image whose statistics are to be computed.
java.lang.NullPointerException
- If image
is null
.public void run(Image image, Coordinates min, Coordinates max)
FloatImage
, the median and mode are not computed exactly, but are estimated with an accuracy of +/- 0.0005 percent of the dynamic range of the image.
image
- The image whose statistics are to be computed.min
- Contains for each dimension the minimum coordinate of the rectangular region of interest.max
- Contains for each dimension the maximum coordinate of the rectangular region of interest.
java.lang.IllegalArgumentException
- If the region of interest as determined by min
and max
does not fall entirely within the image, or if any of the min
coordinates is larger than its corresponding max
coordinate.
java.lang.NullPointerException
- If any of the parameters is null
.public void run(Image image, Coordinates min, Coordinates max, Image mask)
FloatImage
, the median and mode are not computed exactly, but are estimated with an accuracy of +/- 0.0005 percent of the dynamic range of the image.
image
- The image whose statistics are to be computed.min
- Contains for each dimension the minimum coordinate of the rectangular region of interest.max
- Contains for each dimension the maximum coordinate of the rectangular region of interest.mask
- The mask to be used within the region of interest determined by min
and max
. The method includes all image elements whose corresponding mask value is nonzero. The position of the (zeroth element of the) mask relative to the image is determined by min
. In principle, the size of the mask must be equal to the size determined by min
and max
. Alternatively, to be able to be more memory efficient, the size of the mask may be equal to 1 in any dimension. In that case, the mask is extended (not actually, but implicitly by the algorithm) by value repetition, so that it (again) spans the entire range given by the min
and the max
coordinate for that dimension (this explains the need for the otherwise superfluous max
coordinate).
java.lang.IllegalArgumentException
- If the region of interest as determined by min
and max
does not fall entirely within the image, if any of the min
coordinates is larger than its corresponding max
coordinate, or if the size of the mask in any dimension does not match the size determined by the min
and max
coordinate for that dimension or, alternatively, is not equal to 1.
java.lang.NullPointerException
- If any of the parameters is null
.
|
ImageScience 3.0.0 | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (C) Erik Meijering. Permission to use this software and corresponding documentation for educational, research, and not-for-profit purposes, without a fee and without a signed licensing agreement, is granted, subject to the following terms and conditions.
IT IS NOT ALLOWED TO REDISTRIBUTE, SELL, OR LEASE THIS SOFTWARE, OR DERIVATIVE WORKS THEREOF, WITHOUT PERMISSION IN WRITING FROM THE COPYRIGHT HOLDER. THE COPYRIGHT HOLDER IS FREE TO MAKE VERSIONS OF THE SOFTWARE AVAILABLE FOR A FEE OR COMMERCIALLY ONLY.
IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OF ANY KIND WHATSOEVER, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE EXPRESS OR IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE AND CORRESPONDING DOCUMENTATION IS PROVIDED "AS IS". THE COPYRIGHT HOLDER HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.