Class AlgorithmAutoCovariance

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.awt.event.WindowListener, java.lang.Runnable, java.util.EventListener

    public class AlgorithmAutoCovariance
    extends AlgorithmBase
    let deli(x,y) = (i(x,y) - )/ where the angle brackets are used to denote a spatial average. Then the two-dimensional autocovariance function, g(e,n) is defined as g(e,n) = which for a M by P discrete data set is calculated as g(e,n) = (num/denom) - 1 where num = (1/(M - e)(P - n))sum from j = 1 to M-e sum from k = 1 to P-n for: i(j,k)*i(j+e,k+n) denom = [(1/(2(M-e)(P-n))) sum from j = 1 to M sum from k = 1 to P of i(j,k) + i(j+e,k+n)]**2 Note that while some medical literature refers to this as a autocorrelation, it is actually an autocovariance since means are subtracted. 3 articles in which this formula are used: 1.) "Two-photon image correlation spectroscopy and image cross-correlation spectroscopy" by P. W. Wiseman, J.A. Squier, M.H. Ellisman, and K.R. Wilson, Journal of Microscopy, Vol. 200. Pt. 1, October 2000, pp. 14-25. 2.) "Quantitation of Membrane Receptor Distributions by Image Correlation Spectroscopy: Concept and Application" by Nils O. Petersen, Pia L. Hoddelius, Paul W. Wiseman, Olle Seger, and Karl-Eric Magnusson, Biophysical Journal, Volume 65, September, 1993, pp. 1135-1146. 3.) "Image cross-correlation spectroscopy: A new experimental bipohysical approach to measurement of slow diffusion of fluorescent molecules" by Mamta Srivastava & Nils O. Petersen, Methods in Cell Science, Vol 18, March, 1996, pp. 47-54.

    The autocovariance fits to a function of the form a0 + a1*exp(-(x**2 + y**2)/w**2) = a0 + a1*exp(a2*distSqr), where a2 < 0. The fitting is performed to determine the full width at half maximum of the autocovariance. For color images the full width at half maximum is considered to be the minimum of the red, green, and blue values.

    • Field Detail

      • destImageB

        private ModelImage destImageB
        DOCUMENT ME!
      • destImageG

        private ModelImage destImageG
        DOCUMENT ME!
      • destImageR

        private ModelImage destImageR
        DOCUMENT ME!
      • fwhm

        private int fwhm
        full width at half maximum of the autocovariance.
      • fwhmB

        private int fwhmB
        DOCUMENT ME!
      • fwhmG

        private int fwhmG
        DOCUMENT ME!
      • fwhmR

        private int fwhmR
        DOCUMENT ME!
    • Constructor Detail

      • AlgorithmAutoCovariance

        public AlgorithmAutoCovariance​(ModelImage destImg,
                                       ModelImage srcImg)
        Constructor for black and white image in which covariance coefficients are placed in a predetermined destination image.
        Parameters:
        destImg - Image model where result image is stored.
        srcImg - Source image model.
      • AlgorithmAutoCovariance

        public AlgorithmAutoCovariance​(ModelImage destImageR,
                                       ModelImage destImageG,
                                       ModelImage destImageB,
                                       ModelImage srcImg)
        Constructor for color image in which covariance coefficients are placed in predetermined destination images.
        Parameters:
        destImageR - Image model where red result is stored.
        destImageG - Image model where green result is stored.
        destImageB - Image model where blue result is stored.
        srcImg - Source image model.
    • Method Detail

      • finalize

        public void finalize()
        Prepares this class for destruction.
        Overrides:
        finalize in class AlgorithmBase
      • getFWHM

        public int getFWHM()
        returns the full width at half maximum of the autocovariance.
        Returns:
        fwhm
      • getFWHMB

        public int getFWHMB()
        returns the full width at half maximum of the blue autocovariance.
        Returns:
        fwhmB
      • getFWHMG

        public int getFWHMG()
        returns the full width at half maximum of the green autocovariance.
        Returns:
        fwhmG
      • getFWHMR

        public int getFWHMR()
        returns the full width at half maximum of the red autocovariance.
        Returns:
        fwhmR
      • calcStoreInDest2D

        private void calcStoreInDest2D()
        This function calculates the autocovariance coefficients and places them in the destination image for black and white images.
      • calcStoreInDest2DC

        private void calcStoreInDest2DC()
        This function calculates the autocovariance coefficients and places them in the destination images for color images.
      • calcStoreInDest3D

        private void calcStoreInDest3D()
        This function calculates the autocovariance coefficients and places them in the destination image for black and white images.
      • calcStoreInDest3DC

        private void calcStoreInDest3DC()
        This function calculates the autocovariance coefficients and places them in the destination images for color images.
      • calcStoreInDest4D

        private void calcStoreInDest4D()
        This function calculates the autocovariance coefficients and places them in the destination image for black and white images.
      • calcStoreInDest4DC

        private void calcStoreInDest4DC()
        This function calculates the autocovariance coefficients and places them in the destination images for color images.