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

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

public class AlgorithmBoundaryAttenuation
extends AlgorithmBase

Attenuate around the boundary of an object defined by a VOI in an image volume.

Author:
Evan McCreedy

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
AlgorithmBoundaryAttenuation(ModelImage srcImg, int numErosions, float maxAttenuation)
          Set up the algorithm.
 
Method Summary
 void finalize()
          Clean up memory used by the algorithm.
 ModelImage getResultImage()
          Return the attenuated image.
 void runAlgorithm()
          Start the algorithm.
 
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

AlgorithmBoundaryAttenuation

public AlgorithmBoundaryAttenuation(ModelImage srcImg,
                                    int numErosions,
                                    float maxAttenuation)
Set up the algorithm. Extract a mask to use in the attenuation using VOIs within the image and set up the kernel.

Parameters:
srcImg - the image to attenuate (must have a VOI in it to define the area to attenuate)
numErosions - the number of erosions to do
maxAttenuation - the maximum amount to reduce the object intensity by (0,1)
Method Detail

finalize

public void finalize()
Clean up memory used by the algorithm.

Overrides:
finalize in class AlgorithmBase

getResultImage

public ModelImage getResultImage()
Return the attenuated image.

Returns:
the attenuated image

runAlgorithm

public void runAlgorithm()
Start the algorithm.

Specified by:
runAlgorithm in class AlgorithmBase