Package gov.nih.mipav.model.algorithms
Class AlgorithmAutoCorrelation
java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.AlgorithmAutoCorrelation
- All Implemented Interfaces:
ActionListener,WindowListener,Runnable,EventListener
Reference: Digital Image Processing, Second Edition by Rafael C. Gonzalez and Richard C. Woods, Prentice-Hall, Inc.,
2002, pp. 205 - 208 and pp. 414-417. The autocorrelation coefficient = A(deltaX, deltaY)/A(0,0) where
A(deltaX,deltaY) = num/denom with num = sum from X = 0 to X = xDim - 1 - deltaX sum from Y = 0 to
Y = yDim - 1 - deltaY f(x,y)*f(x+deltaX,y+deltaY) denom = (xDim - deltaX)*(yDim - deltaY) Autocorrelation does
not subtract out the means while autocovariance does subtract out the means.
The autocorrelation coefficeints are fitted to a function of the form (1 - a0) + a0*exp(-(x**2 + y**2)/w**2) = (1 - a0) + a0*exp(a1*distSqr), where 1 >= a0 > 0, a1 invalid input: '<' 0.
-
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 autocorrelation.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
ConstructorsConstructorDescriptionAlgorithmAutoCorrelation(ModelImage destImg, ModelImage srcImg) Constructor for black and white image in which correlation coefficients are placed in a predetermined destination image.AlgorithmAutoCorrelation(ModelImage destImageR, ModelImage destImageG, ModelImage destImageB, ModelImage srcImg) Constructor for color image in which correlation coefficients are placed in predetermined destination images. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidThis function calculates the autocorrelation coefficients and places them in the destination image for black and white images.private voidThis function calculates the autocorrelation coefficients and places them in the destination image for color images.private voidThis function calculates the autocorrelation coefficients and places them in the destination image for black and white images.private voidThis function calculates the autocorrelation coefficients and places them in the destination image for color images.private voidThis function calculates the autocorrelation coefficients and places them in the destination image for black and white images.private voidThis function calculates the autocorrelation coefficients and places them in the destination image for color images.voidfinalize()Prepares this class for destruction.intgetFWHM()Returns the full width at half maximum of the autocorrelation.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 autocorrelation.
-
-
Constructor Details
-
AlgorithmAutoCorrelation
Constructor for black and white image in which correlation coefficients are placed in a predetermined destination image.- Parameters:
destImg- Image model where result image is stored.srcImg- Source image model.
-
AlgorithmAutoCorrelation
public AlgorithmAutoCorrelation(ModelImage destImageR, ModelImage destImageG, ModelImage destImageB, ModelImage srcImg) Constructor for color image in which correlation 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 autocorrelation.- Returns:
- fwhm
-
runAlgorithm
public void runAlgorithm()Starts the algorithm.- Specified by:
runAlgorithmin classAlgorithmBase
-
calcStoreInDest2D
private void calcStoreInDest2D()This function calculates the autocorrelation coefficients and places them in the destination image for black and white images. -
calcStoreInDest2DC
private void calcStoreInDest2DC()This function calculates the autocorrelation coefficients and places them in the destination image for color images. -
calcStoreInDest3D
private void calcStoreInDest3D()This function calculates the autocorrelation coefficients and places them in the destination image for black and white images. -
calcStoreInDest3DC
private void calcStoreInDest3DC()This function calculates the autocorrelation coefficients and places them in the destination image for color images. -
calcStoreInDest4D
private void calcStoreInDest4D()This function calculates the autocorrelation coefficients and places them in the destination image for black and white images. -
calcStoreInDest4DC
private void calcStoreInDest4DC()This function calculates the autocorrelation coefficients and places them in the destination image for color images.
-