Class HistogramData
java.lang.Object
org.micromanager.display.HistogramData
Deprecated.
an improved API will be provided soon
This is a simple container class containing a histogram for one component
of an int-based image, and some related statistics. You can generate new
HistogramData objects yourself, or use DisplayManager.calculateHistogram()
and related methods to generate a HistogramData based off of an Image.
-
Constructor Summary
ConstructorsConstructorDescriptionHistogramData(int[] histogram, int numSamples, int minVal, int maxVal, int minIgnoringOutliers, int maxIgnoringOutliers, int mean, double stdDev, int bitDepth, int binSize) Deprecated.Deprecated Histogram constructor. -
Method Summary
Modifier and TypeMethodDescriptionintDeprecated.Retrieve the number of distinct intensities that fit within each bin of the histogram.intDeprecated.Retrieve the bit depth of the dataset.int[]Deprecated.Retrieve the histogram, an array of ints counting the number of samples whose intensities fall into each bin.intDeprecated.Retrieve the intensity of the brightest sample in the dataset once a fraction of all pixels have been discarded.intDeprecated.Retrieve the intensity of the brightest sample in the dataset used to generate the histogram.intgetMean()Deprecated.Retrieve the mean value of all samples in the dataset.intDeprecated.Retrieve the intensity of the dimmest sample in the dataset once a fraction of all pixels have been discarded.intDeprecated.Retrieve the intensity of the dimmest sample in the dataset used to generate the histogram.intDeprecated.Retrieve the number of samples used to construct the histogram.doubleDeprecated.Retrieve the standard deviation of all samples in the dataset, or -1 if standard deviation calculation was disabled or if a calculation error occurred while calculating the standard deviation.toString()Deprecated.
-
Constructor Details
-
HistogramData
public HistogramData(int[] histogram, int numSamples, int minVal, int maxVal, int minIgnoringOutliers, int maxIgnoringOutliers, int mean, double stdDev, int bitDepth, int binSize) Deprecated.Deprecated Histogram constructor.- Parameters:
histogram- An array of integers indicating how many pixels had intensities falling into the "bin" at the given index. The first bin always starts from an intensity of 0; the last bin ends with an intensity depending on the bitDepth parameter.numSamples- The number of pixels used to generate the histogram; should be equal to the sum of all values in the histogram.minVal- The lowest intensity found when generating the histogram.maxVal- The brightest intensity found when generating the histogram.minIgnoringOutliers- The lowest intensity when a fraction of the lowest samples are ignored. See the extremaPercentage parameter of DisplayManager.calculateHistogram().maxIgnoringOutliers- The highest intensity when a fraction of the lowest samples are ignored. See the extremaPercentage parameter of DisplayManager.calculateHistogram().mean- The average intensity of all samples.stdDev- The standard deviation of all samples, or -1 if this value was not calculated.bitDepth- The dynamic range of the histogram. The histogram will cover values from 0 to (2^bitDepth - 1), inclusive.binSize- How many distinct intensities are combined into a single bin in the histogram. For example, if the bit depth is 10 and there are 2^8 bins, then there are (2^10 / 2^8 = 4) intensities per bin.- Throws:
ArrayIndexOutOfBoundsException- if histogram is shorter than correct sizeNullPointerException- if histogram is null
-
-
Method Details
-
getHistogram
public int[] getHistogram()Deprecated.Retrieve the histogram, an array of ints counting the number of samples whose intensities fall into each bin.Note: the returned array is the internal data, not a copy. Calling code must not modify this array.
- Returns:
- Array with histogram data. Must not be modified.
-
getMinVal
public int getMinVal()Deprecated.Retrieve the intensity of the dimmest sample in the dataset used to generate the histogram. NOTE: if this HistogramData was generated by DisplayManager.calculateHistogram and the bin size is not 1, then this number will be the lowest intensity that goes into the first (lowest-intensity) bin that has at least one pixel in it; it is possible there is no pixel in the image with this intensity.- Returns:
- lowest intensity value in the dataset
-
getMaxVal
public int getMaxVal()Deprecated.Retrieve the intensity of the brightest sample in the dataset used to generate the histogram. NOTE: if this HistogramData was generated by DisplayManager.calculateHistogram and the bin size is not 1, then this number will be the highest intensity that goes into the last (highest-intensity) bin that has at least one pixel in it; it is possible there is no pixel in the image with this intensity.- Returns:
- highest intensity value in the dataset
-
getMinIgnoringOutliers
public int getMinIgnoringOutliers()Deprecated.Retrieve the intensity of the dimmest sample in the dataset once a fraction of all pixels have been discarded. See the extremaPercentage parameter to DisplayManager.calculateHistogram() for more information.- Returns:
- lowest intensity value in the dataset ignoring given fraction of outliers
-
getMaxIgnoringOutliers
public int getMaxIgnoringOutliers()Deprecated.Retrieve the intensity of the brightest sample in the dataset once a fraction of all pixels have been discarded. See the extremaPercentage parameter to DisplayManager.calculateHistogram() for more information.- Returns:
- highest intensity value in the dataset ignoring given fraction of outliers
-
getMean
public int getMean()Deprecated.Retrieve the mean value of all samples in the dataset.- Returns:
- mean intensity value in this dataset
-
getStdDev
public double getStdDev()Deprecated.Retrieve the standard deviation of all samples in the dataset, or -1 if standard deviation calculation was disabled or if a calculation error occurred while calculating the standard deviation.- Returns:
- standard deviation, or -1
-
getBitDepth
public int getBitDepth()Deprecated.Retrieve the bit depth of the dataset. The highest pixel intensity in the dataset can not be higher than 2^bitDepth.- Returns:
- bitdepth of the dataset
-
getBinSize
public int getBinSize()Deprecated.Retrieve the number of distinct intensities that fit within each bin of the histogram. For example, if this is 4, then the first bin will hold the number of samples whose intensities were 0, 1, 2, or 3.- Returns:
- Range of pixel intensities that fit into a single bin in the histogram.
-
getNumSamples
public int getNumSamples()Deprecated.Retrieve the number of samples used to construct the histogram.- Returns:
- Total number of bins in the histogram
-
toString
-