gov.nih.mipav.model.algorithms.filters
Class AlgorithmMorphologicalFilter

java.lang.Object
  extended by java.lang.Thread
      extended by gov.nih.mipav.model.algorithms.AlgorithmBase
          extended by gov.nih.mipav.model.algorithms.filters.AlgorithmMorphologicalFilter
All Implemented Interfaces:
ActionListener, WindowListener, Runnable, EventListener

public class AlgorithmMorphologicalFilter
extends AlgorithmBase

Performs morphological filtering on black and white images. This is a shading correction routine, that is, it corrects for non-uniform illumination and non-uniform camera sensitivity. A morphological filtered pixel = the original pixel - the morphological smoothed pixel + a constant to restore the original average image brightness. A morphological smoothed pixel is given by the min(max(max(min(original pixel)))), where the sizes[] array contains the dimensions of the region examined for the minimum and the maximum. Reference: 1.) "Shading Correction: Compensation for Illumination and Sensor Inhomogeneities" by Ian T. Young, July 19, 2000. www.ph.tn.tudelft.nl/People/albert/papers/YoungShading.pdf

Version:
0.1 Feb 17, 2005
Author:
William Gandler

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, srcImage, threadStopped
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AlgorithmMorphologicalFilter(ModelImage srcImg, int[] sizes, boolean maskFlag, boolean img25D)
          Constructs a Morphological filter object.
AlgorithmMorphologicalFilter(ModelImage destImg, ModelImage srcImg, int[] sizes, boolean maskFlag, boolean img25D)
          Constructs a Morphological filter object.
 
Method Summary
 void finalize()
          Prepares this class for destruction.
 void runAlgorithm()
          Starts the program.
 
Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
actionPerformed, addListener, addProgressChangeListener, calculatePrincipleAxis, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, displayError, errorCleanUp, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, generateProgressValues, getDestImage, getElapsedTime, getMask, getMaxProgressValue, getMinProgressValue, getNumberOfThreads, getProgress, getProgressChangeListener, getProgressChangeListeners, getProgressModulus, getProgressStep, getProgressValues, isCompleted, isImage25D, isMultiThreadingEnabled, isRunningInSeparateThread, isThreadStopped, linkProgressToAlgorithm, makeProgress, notifyListeners, removeListener, removeProgressChangeListener, run, setCompleted, setImage25D, setMask, setMaxProgressValue, setMinProgressValue, setMultiThreadingEnabled, setNumberOfThreads, setProgress, setProgressModulus, setProgressStep, setProgressValues, setProgressValues, setRunningInSeparateThread, setStartTime, setThreadStopped, startMethod, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AlgorithmMorphologicalFilter

public AlgorithmMorphologicalFilter(ModelImage srcImg,
                                    int[] sizes,
                                    boolean maskFlag,
                                    boolean img25D)
Constructs a Morphological filter object.

Parameters:
srcImg - source image model
sizes - Filter size in each dimension
maskFlag - Flag that indicates that the Morphological filter will be calculated for the whole image if equal to true
img25D - Flag, if true, indicates that each slice of the 3D volume should be processed independently. 2D images disregard this flag.

AlgorithmMorphologicalFilter

public AlgorithmMorphologicalFilter(ModelImage destImg,
                                    ModelImage srcImg,
                                    int[] sizes,
                                    boolean maskFlag,
                                    boolean img25D)
Constructs a Morphological filter object.

Parameters:
destImg - image model where result image is to stored
srcImg - source image model
sizes - Filter size in each dimension
maskFlag - Flag that indicates that the Morphological filter will be calculated for the whole image if equal to true
img25D - Flag, if true, indicates that each slice of the 3D volume should be processed independently. 2D images disregard this flag.
Method Detail

finalize

public void finalize()
Prepares this class for destruction.

Overrides:
finalize in class AlgorithmBase

runAlgorithm

public void runAlgorithm()
Starts the program.

Specified by:
runAlgorithm in class AlgorithmBase