endrov.flowColocalization
Class ColocCoefficients

java.lang.Object
  extended by endrov.flowColocalization.ColocCoefficients

public class ColocCoefficients
extends java.lang.Object

Colocalization calculation. Assumes two images X and Y. Add all pixels, then retrieve the statistics.

Pixels<=0 are considered background when calculating Manders coefficient

Definitions: http://support.svi.nl/wiki/ColocalizationTheory Interesting pseuodo-code for improved numerical instability exists at: http://en.wikipedia.org/wiki/Pearson_product-moment_correlation_coefficient


Field Summary
 int n
           
 double sumX
           
 double sumXcoloc
           
 double sumXminusY2
           
 double sumXX
           
 double sumXY
           
 double sumY
           
 double sumYcoloc
           
 double sumYY
           
 
Constructor Summary
ColocCoefficients()
           
 
Method Summary
 void add(double[] arrX, double[] arrY)
          Compare several pixels
 void add(double x, double y)
          Compare one pixel
 void add(float[] arrX, float[] arrY)
          Compare several pixels
 void add(int[] arrX, int[] arrY)
          Compare several pixels
 void fromXML(org.jdom.Element e)
           
 double getCovXY()
          Covariance(X,Y)
 double getKX()
          kX=k1
 double getKY()
          kY=k2
 double getL2()
           
 double getMandersX()
          Mander coefficient X (=index 1)
 double getMandersY()
          Mander coefficient Y (=index 2)
 double getPearson()
          Pearsons coefficient
 double getPearsonMean0()
          Pearsons coefficient, assume mean=0
 double getVarX()
          Variance of X
 double getVarY()
          Variance of Y
static void main(java.lang.String[] args)
           
 void toXML(org.jdom.Element e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sumX

public double sumX

sumXX

public double sumXX

sumY

public double sumY

sumYY

public double sumYY

sumXY

public double sumXY

sumXminusY2

public double sumXminusY2

sumXcoloc

public double sumXcoloc

sumYcoloc

public double sumYcoloc

n

public int n
Constructor Detail

ColocCoefficients

public ColocCoefficients()
Method Detail

add

public void add(int[] arrX,
                int[] arrY)
Compare several pixels


add

public void add(double[] arrX,
                double[] arrY)
Compare several pixels


add

public void add(float[] arrX,
                float[] arrY)
Compare several pixels


add

public void add(double x,
                double y)
Compare one pixel


getVarX

public double getVarX()
Variance of X


getVarY

public double getVarY()
Variance of Y


getCovXY

public double getCovXY()
Covariance(X,Y)


getPearson

public double getPearson()
Pearsons coefficient


getPearsonMean0

public double getPearsonMean0()
Pearsons coefficient, assume mean=0


getKX

public double getKX()
kX=k1


getKY

public double getKY()
kY=k2


getMandersX

public double getMandersX()
Mander coefficient X (=index 1)


getMandersY

public double getMandersY()
Mander coefficient Y (=index 2)


getL2

public double getL2()

main

public static void main(java.lang.String[] args)

toXML

public void toXML(org.jdom.Element e)

fromXML

public void fromXML(org.jdom.Element e)
             throws org.jdom.DataConversionException
Throws:
org.jdom.DataConversionException