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:
ActionListener,WindowListener,Runnable,EventListener
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate doubleprivate static final intprivate static final intprivate static final intprivate intprivate static final intprivate intprivate doubleprivate intprivate static final intprivate static final intprivate static final intCopyright (c) 2009, Yue Wu All rights reserved.private static final intFields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, srcImage, threadStoppedFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionAlgorithmActiveContoursWithoutEdges(ModelImage destImg, ModelImage srcImg, int maskType, int numIter, double mu, int method) -
Method Summary
Modifier and TypeMethodDescriptionprivate booleancheckstop(double[][] old, double[][] neww, double dt) private booleancheckstop(double[] old, double[] neww, double dt) private double[]Heaviside(double[] z) private double[]kappa(double[] I, int xDim) private voidreinitialization(double[] D, double dt, int xDim) voidActually 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, windowOpenedMethods 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, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield
-
Field Details
-
user
private static final int userCopyright (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:
-
small
private static final int small- See Also:
-
medium
private static final int medium- See Also:
-
large
private static final int large- See Also:
-
holes
private static final int holes- See Also:
-
holes_small
private static final int holes_small- See Also:
-
maskType
private int maskType -
numIter
private int numIter -
mu
private double mu -
chan
private static final int chan- See Also:
-
vector
private static final int vector- See Also:
-
twophase
private static final int twophase- See Also:
-
method
private int method -
epsilon
private double epsilon
-
-
Constructor Details
-
AlgorithmActiveContoursWithoutEdges
public AlgorithmActiveContoursWithoutEdges(ModelImage destImg, ModelImage srcImg, int maskType, int numIter, double mu, int method)
-
-
Method Details
-
runAlgorithm
public void runAlgorithm()Description copied from class:AlgorithmBaseActually runs the algorithm. Implemented by inheriting algorithms.- Specified by:
runAlgorithmin 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)
-