Class AlgorithmSobel
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.filters.AlgorithmSobel
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.awt.event.WindowListener,java.lang.Runnable,java.util.EventListener
public class AlgorithmSobel extends AlgorithmBase
-
-
Field Summary
Fields Modifier and Type Field Description private intkernelSize5 x 5 Sobel template found in Feature Extraction & Image Processing for Computer Vision Third Edition by Mark S.-
Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, srcImage, threadStopped
-
-
Constructor Summary
Constructors Constructor Description AlgorithmSobel(ModelImage destImg, ModelImage srcImg, boolean image25D, int kernelSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrun2D()voidrun3D()voidrunAlgorithm()Actually runs the algorithm.-
Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
actionPerformed, addListener, addProgressChangeListener, calculateImageSize, calculatePrincipleAxis, computeElapsedTime, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, delinkProgressToAlgorithmMulti, displayError, errorCleanUp, finalize, 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
-
kernelSize
private int kernelSize
5 x 5 Sobel template found in Feature Extraction & Image Processing for Computer Vision Third Edition by Mark S. Nixon and Alberto S. Aguado Section 4.2.1.4. Sobel edge-detection operator pp. 146-153. Formulas for deriving 7 x 7 Sobel template also found there. smoothx_win = (winsize - 1)!/((winsize - 1 - x_win)! * x_win!) Pascal(k, n) = n!/((n-k)! * k!) if ((k >= 0) && (k <= n)) 0 otherwise diffx_win = Pascal(x_win, winsize-2) - Pascal(x_win - 1, winsize-2) Sobel x template = sum from xwin = 0 to winsize-1 sum from ywin = 0 to winsize-1 of smoothy_win * diffx_win Sobel y template = sum from xwin = 0 to winsize-1 sum from ywin = 0 to winsize-1 of smoothx_win * diffy_win
-
-
Constructor Detail
-
AlgorithmSobel
public AlgorithmSobel(ModelImage destImg, ModelImage srcImg, boolean image25D, int kernelSize)
-
-
Method Detail
-
runAlgorithm
public void runAlgorithm()
Description copied from class:AlgorithmBaseActually runs the algorithm. Implemented by inheriting algorithms.- Specified by:
runAlgorithmin classAlgorithmBase
-
run2D
public void run2D()
-
run3D
public void run3D()
-
-