Package gov.nih.mipav.model.algorithms
Class AlgorithmIndependentComponents
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.AlgorithmIndependentComponents
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmIndependentComponents extends AlgorithmBase
This algorithm operates on 2D and 3D black and white and color images. Requirements: 1.) The independent components must be statistically independent. 2.) The independent components must have all nongaussian distributions or one gaussian distribution and all the other distributions nongaussian or the independent components have time dependencies. 3.) For simplicity, assume the unknown mixture matrix is square. In other words, the number of mixtures equals the number of independent components. If the number of independent components is smaller than the number of mixtures, use principal component analysis to reduce the number of mixtures to the number of principal components. Reducing the number of dimensions can reduce noise and prevent overlearning. Filtering the data in the Fourier domain is allowed before performing independent component analysis since applying the Fourier transform to the data does not change the mixing matrix. References: 1.) Independent Component Analysis by Aapo Hyvarinen, Juha Karhunen, and Erkki Oja, John-Wiley & Sons, Inc., 2001. 2.) Independent Component Analysis A Tutorial Introduction by James V. Stone, Massachusetts Institute of Technology, 2004. 3.) Independent Component Analysis Principles and Practice Edited by Stephen Roberts and Richard Everson, Cambridge University Press, 2001. From the text: "Another very useful thing to do is to reduce the dimension of the data by principal component analysis. This reduces noise and prevents overlearning. It may also solve the problems with data that has a smaller number of independent components than mixtures." Software was tested with images obtained from the site at http://www.lx.it.pt/~lbalmeida/ica/seethrough/index.html, "See-through" data sets for nonlinear source separation by Luis B. Almeida. In the paper "Separating a Real-Life Nonlinear Image Mixture" by Luis B. Almeida, the following average linear and nonlinear separation SNR results are given in decibels for sets 4 thru 8: Set number linear source 1 linear source 2 nonlinear source1 nonlinear source2 4 9.0 8.7 13.8 13.1 5 5.2 10.5 9.3 13.9 6 13.4 6.6 14.2 6.4 7 4.5 11.2 6.2 11.2 8 5.8 3.4 6.0 3.7 My results: set 4: symmetric orthogonalization tanh a1 = 1.0 source1 3.96 dB source2 8.56 dB set 5: symmetric orthogonalization tanh a1 = 1.0 source1 5.93 dB source2 4.05 dB symmetric orthogonalization exp source1 9.76 dB source2 9.86 dB symmetric orthogonalization cubic source1 5.84 dB source2 3.99 dB maximum likelihood estimation exp source1 5.64 dB source2 3.89 dB source1 5.36 dB source2 3.89 dB set 6: symmetric orthogonalization tanh a1 = 1.0 source1 15.5 dB source2 11.8 dB maximum likelihood estimation tanh a1 = 1.0 source1 15.5 dB source2 11.8 dB set 7: symmetric orthogonalization tanh a1 = 1.0 source1 9.93 dB source2 14.8 dB maximum likelihood estimation tanh a1 = 1.0 source1 10.1 dB source2 14.8 dB set 8: symmetric orthogonalization tanh a1 = 1.0 source1 11.5 dB source2 6.91 dB source1 11.3 dB source2 10.9 dB maximum likelihood estimation tanh a1 = 1.0 source1 11.4 dB source2 6.79 dB source1 11.4 dB source2 6.79 dB source1 11.4 dB source2 6.79 dB maximum likelihood estimation exp source1 11.4 dB source2 6.79 dB
-
-
Field Summary
Fields Modifier and Type Field Description private double
a1
private boolean
blueRequested
static int
CUBIC_FUNCTION
static int
DEFLATIONARY_ORTHOGONALIZATION
private ModelImage[]
destImage
DOCUMENT ME!private double
endTolerance
static int
EXP_FUNCTION
private boolean
greenRequested
private boolean
haveColor
DOCUMENT ME!private int
icAlgorithm
private int
icNumber
number of independent components to be retained.static int
MAXIMUM_LIKELIHOOD_ESTIMATION
private int
maxIterations
private int
nonlinearFunction
private int
nPlanes
number of image planes present.private boolean
redRequested
private boolean
selfTest
private ModelImage
srcImage
DOCUMENT ME!private ModelImage[]
srcImageArray
static int
SYMMETRIC_ORTHOGONALIZATION
static int
TANH_FUNCTION
-
Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, threadStopped
-
-
Constructor Summary
Constructors Constructor Description AlgorithmIndependentComponents(ModelImage[] destImg, ModelImage[] srcImgArray, int icNumber, int icAlgorithm, int nonlinearFunction, double a1, double endTolerance, int maxIterations, boolean redRequested, boolean greenRequested, boolean blueRequested)
Creates a new AlgorithmIndependentComponents object.AlgorithmIndependentComponents(ModelImage[] destImg, ModelImage srcImg, int icNumber, int icAlgorithm, int nonlinearFunction, double a1, double endTolerance, int maxIterations, boolean redRequested, boolean greenRequested, boolean blueReuqested)
Creates a new AlgorithmIndependentComponents object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finalize()
Prepares this class for destruction.private void
iComponent()
DOCUMENT ME!void
runAlgorithm()
Start algorithm.void
updateFileInfo(ModelImage image, ModelImage resultImage)
Copy important file information to resultant image structure.-
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, windowOpened
-
Methods 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, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
destImage
private ModelImage[] destImage
DOCUMENT ME!
-
haveColor
private boolean haveColor
DOCUMENT ME!
-
nPlanes
private int nPlanes
number of image planes present.
-
icNumber
private int icNumber
number of independent components to be retained. For SYMMETRIC_ORTHOGONALIZATION and MAXIMUM_LIKELIHOOD_ESTIMATION icNumber = nPlanes = colorsRequested * number of source images for color = number of source images for black and white icNumber can only be varied from 1 to nPlanes with DEFLATIONARY_ORTHOGONALIZATION
-
srcImageArray
private ModelImage[] srcImageArray
-
srcImage
private ModelImage srcImage
DOCUMENT ME!
-
nonlinearFunction
private int nonlinearFunction
-
a1
private double a1
-
endTolerance
private double endTolerance
-
icAlgorithm
private int icAlgorithm
-
SYMMETRIC_ORTHOGONALIZATION
public static final int SYMMETRIC_ORTHOGONALIZATION
- See Also:
- Constant Field Values
-
DEFLATIONARY_ORTHOGONALIZATION
public static final int DEFLATIONARY_ORTHOGONALIZATION
- See Also:
- Constant Field Values
-
MAXIMUM_LIKELIHOOD_ESTIMATION
public static final int MAXIMUM_LIKELIHOOD_ESTIMATION
- See Also:
- Constant Field Values
-
TANH_FUNCTION
public static final int TANH_FUNCTION
- See Also:
- Constant Field Values
-
EXP_FUNCTION
public static final int EXP_FUNCTION
- See Also:
- Constant Field Values
-
CUBIC_FUNCTION
public static final int CUBIC_FUNCTION
- See Also:
- Constant Field Values
-
maxIterations
private int maxIterations
-
redRequested
private boolean redRequested
-
greenRequested
private boolean greenRequested
-
blueRequested
private boolean blueRequested
-
selfTest
private boolean selfTest
-
-
Constructor Detail
-
AlgorithmIndependentComponents
public AlgorithmIndependentComponents(ModelImage[] destImg, ModelImage srcImg, int icNumber, int icAlgorithm, int nonlinearFunction, double a1, double endTolerance, int maxIterations, boolean redRequested, boolean greenRequested, boolean blueReuqested)
Creates a new AlgorithmIndependentComponents object.- Parameters:
destImg
- image model where result image is to storedsrcImg
- source image modelicNumber
- icNumber is the number of independent component images to retainicAlgorithm
-nonlinearFunction
-a1
-endTolerance
-maxIterations
-
-
AlgorithmIndependentComponents
public AlgorithmIndependentComponents(ModelImage[] destImg, ModelImage[] srcImgArray, int icNumber, int icAlgorithm, int nonlinearFunction, double a1, double endTolerance, int maxIterations, boolean redRequested, boolean greenRequested, boolean blueRequested)
Creates a new AlgorithmIndependentComponents object.- Parameters:
destImg
- image model where result image is to storedsrcImg
- source image modelicNumber
- icNumber is the number of independent component images to retainicAlgorithm
-nonlinearFunction
-a1
-endTolerance
-maxIterations
-redRequested
-greenRequested
-blueRequested
-
-
-
Method Detail
-
finalize
public void finalize()
Prepares this class for destruction.- Overrides:
finalize
in classAlgorithmBase
-
runAlgorithm
public void runAlgorithm()
Start algorithm.- Specified by:
runAlgorithm
in classAlgorithmBase
-
updateFileInfo
public void updateFileInfo(ModelImage image, ModelImage resultImage)
Copy important file information to resultant image structure.- Parameters:
image
- Source image.resultImage
- Resultant image.
-
iComponent
private void iComponent()
DOCUMENT ME!
-
-