Package gov.nih.mipav.model.algorithms
Class AlgorithmAutoCovariance
java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.AlgorithmAutoCovariance
- All Implemented Interfaces:
ActionListener,WindowListener,Runnable,EventListener
let deli(x,y) = (i(x,y) - invalid input: '<'i(x,y)>)/invalid input: '<'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) = invalid input: '<'deli(x,y)deli(x + e, y + 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 invalid input: '&' 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 invalid input: '<' 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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classDOCUMENT ME!Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ModelImageDOCUMENT ME!private ModelImageDOCUMENT ME!private ModelImageDOCUMENT ME!private intfull width at half maximum of the autocovariance.private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, srcImage, threadStoppedFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionAlgorithmAutoCovariance(ModelImage destImg, ModelImage srcImg) Constructor for black and white image in which covariance coefficients are placed in a predetermined destination image.AlgorithmAutoCovariance(ModelImage destImageR, ModelImage destImageG, ModelImage destImageB, ModelImage srcImg) Constructor for color image in which covariance coefficients are placed in predetermined destination images. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidThis function calculates the autocovariance coefficients and places them in the destination image for black and white images.private voidThis function calculates the autocovariance coefficients and places them in the destination images for color images.private voidThis function calculates the autocovariance coefficients and places them in the destination image for black and white images.private voidThis function calculates the autocovariance coefficients and places them in the destination images for color images.private voidThis function calculates the autocovariance coefficients and places them in the destination image for black and white images.private voidThis function calculates the autocovariance coefficients and places them in the destination images for color images.voidfinalize()Prepares this class for destruction.intgetFWHM()returns the full width at half maximum of the autocovariance.intgetFWHMB()returns the full width at half maximum of the blue autocovariance.intgetFWHMG()returns the full width at half maximum of the green autocovariance.intgetFWHMR()returns the full width at half maximum of the red autocovariance.voidStarts the algorithm.Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
actionPerformed, addListener, addProgressChangeListener, calculateImageSize, calculatePrincipleAxis, computeElapsedTime, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, delinkProgressToAlgorithmMulti, displayError, errorCleanUp, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, generateProgressValues, getDestImage, getElapsedTime, getMask, getMaxProgressValue, getMinProgressValue, getNumberOfThreads, getProgress, getProgressChangeListener, getProgressChangeListeners, getProgressModulus, getProgressStep, getProgressValues, getSrcImage, isCompleted, isImage25D, isMultiThreadingEnabled, isRunningInSeparateThread, isThreadStopped, linkProgressToAlgorithm, linkProgressToAlgorithm, makeProgress, notifyListeners, removeListener, removeProgressChangeListener, run, setCompleted, setImage25D, setMask, setMaxProgressValue, setMinProgressValue, setMultiThreadingEnabled, setNumberOfThreads, setProgress, setProgressModulus, setProgressStep, setProgressValues, setProgressValues, setRunningInSeparateThread, setSrcImage, setStartTime, setThreadStopped, startMethod, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpenedMethods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield
-
Field Details
-
destImageB
DOCUMENT ME! -
destImageG
DOCUMENT ME! -
destImageR
DOCUMENT ME! -
fwhm
private int fwhmfull width at half maximum of the autocovariance. -
fwhmB
private int fwhmBDOCUMENT ME! -
fwhmG
private int fwhmGDOCUMENT ME! -
fwhmR
private int fwhmRDOCUMENT ME!
-
-
Constructor Details
-
AlgorithmAutoCovariance
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 Details
-
finalize
public void finalize()Prepares this class for destruction.- Overrides:
finalizein classAlgorithmBase
-
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
-
runAlgorithm
public void runAlgorithm()Starts the algorithm.- Specified by:
runAlgorithmin classAlgorithmBase
-
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.
-