Package gov.nih.mipav.model.algorithms
Class AlgorithmActiveContoursWithoutEdges
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.AlgorithmActiveContoursWithoutEdges
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmActiveContoursWithoutEdges extends AlgorithmBase
-
-
Field Summary
Fields Modifier and Type Field Description private static int
chan
private double
epsilon
private static int
holes
private static int
holes_small
private static int
large
private int
maskType
private static int
medium
private int
method
private double
mu
private int
numIter
private static int
small
private static int
twophase
private static int
user
Copyright (c) 2009, Yue Wu All rights reserved.private static int
vector
-
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 AlgorithmActiveContoursWithoutEdges(ModelImage destImg, ModelImage srcImg, int maskType, int numIter, double mu, int method)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
checkstop(double[][] old, double[][] neww, double dt)
private boolean
checkstop(double[] old, double[] neww, double dt)
private double[]
Heaviside(double[] z)
private double[]
kappa(double[] I, int xDim)
private void
reinitialization(double[] D, double dt, int xDim)
void
runAlgorithm()
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
-
user
private static final int user
Copyright (c) 2009, Yue Wu All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. % Active contour with Chen-Vese Method % for image segementation % % Implemented by Yue Wu (yue.wu@tufts.edu) % Tufts University % Feb 2009 % http://sites.google.com/site/rexstribeofimageprocessing/ % % all rights reserved % Last update 02/26/2009 % Description: This code implements the paper: "Active Contours Without % Edges" by Chan and Vese for method 'chen', the paper:"Active Contours Without % Edges for vector image" by Chan and Vese for method 'vector', and the paper % "A Multiphase Level Set Framework for Image Segmentation Using the % Mumford and Shah Model" by Chan and Vese. This is a port to Java of the MATLAB code in chenvese.m and supporting MATLAB files written by Yue Wu. References: 1.) Active Contours Without Edges by Tony F. Chan and Luminita A. Vese, IEEE Transactions on Image Processing, Vol. 10, No. 2, February, 2001, pp. 266- 277. 2.) Active Contours Without Edges for Vector-Valued Images by Tony F. Chan, B. Yezrielev, and Luminita A. Vese, Journal of Visual Communication and Image Representation, 11, 2000, pp. 130-141. 3.) A Multiphase Level Set Framework for Image Segmentation Using the Mumford and Shah Model by Tony F. Chan and Luminita A. Vese, International Journal of Computer Vision, 50(3), 2002, pp. 271-293.- See Also:
- Constant Field Values
-
small
private static final int small
- See Also:
- Constant Field Values
-
medium
private static final int medium
- See Also:
- Constant Field Values
-
large
private static final int large
- See Also:
- Constant Field Values
-
holes
private static final int holes
- See Also:
- Constant Field Values
-
holes_small
private static final int holes_small
- See Also:
- Constant Field Values
-
maskType
private int maskType
-
numIter
private int numIter
-
mu
private double mu
-
chan
private static final int chan
- See Also:
- Constant Field Values
-
vector
private static final int vector
- See Also:
- Constant Field Values
-
twophase
private static final int twophase
- See Also:
- Constant Field Values
-
method
private int method
-
epsilon
private double epsilon
-
-
Constructor Detail
-
AlgorithmActiveContoursWithoutEdges
public AlgorithmActiveContoursWithoutEdges(ModelImage destImg, ModelImage srcImg, int maskType, int numIter, double mu, int method)
-
-
Method Detail
-
runAlgorithm
public void runAlgorithm()
Description copied from class:AlgorithmBase
Actually runs the algorithm. Implemented by inheriting algorithms.- Specified by:
runAlgorithm
in classAlgorithmBase
-
reinitialization
private void reinitialization(double[] D, double dt, int xDim)
-
checkstop
private boolean checkstop(double[][] old, double[][] neww, double dt)
-
checkstop
private boolean checkstop(double[] old, double[] neww, double dt)
-
Heaviside
private double[] Heaviside(double[] z)
-
kappa
private double[] kappa(double[] I, int xDim)
-
-