Package gov.nih.mipav.model.algorithms
Class AlgorithmHeightFunction
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.AlgorithmHeightFunction
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmHeightFunction extends AlgorithmBase
The class generates a triangle or quad mesh of a 2D dataset (image) to be displayed in the surface viewer. If the image is 3D, takes the 2D current slice. The triangle mesh is like a relief map of the image; the higher intensities are peaks and the lower intensities are valleys.- Version:
- 0.1 Aug 1, 2001
- Author:
- Matthew J. McAuliffe, Ph.D.
-
-
Field Summary
Fields Modifier and Type Field Description private int
mesh
DOCUMENT ME!private static int
QUAD
DOCUMENT ME!private int
sampleSize
DOCUMENT ME!private int
slice
DOCUMENT ME!private java.lang.String
surfaceFileName
DOCUMENT ME!private static int
TRIANGLE
DOCUMENT ME!-
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 AlgorithmHeightFunction(ModelImage srcImg, int sampleSize, java.lang.String fileName, int slice, int mesh)
Sets up variables needed by algorithm to run.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
calcQuadSurface()
Calculates quad surface.private void
calcTriSurface()
Calculates triangulated surface.void
finalize()
DOCUMENT ME!void
runAlgorithm()
Runs the algorithm; calls either calcQuadSurface or calcTriangleSurface, depending on the mesh parameter set in the constructor.-
Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
actionPerformed, addListener, addProgressChangeListener, calculateImageSize, calculatePrincipleAxis, computeElapsedTime, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, delinkProgressToAlgorithmMulti, displayError, errorCleanUp, 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
-
QUAD
private static final int QUAD
DOCUMENT ME!- See Also:
- Constant Field Values
-
TRIANGLE
private static final int TRIANGLE
DOCUMENT ME!- See Also:
- Constant Field Values
-
mesh
private final int mesh
DOCUMENT ME!
-
sampleSize
private int sampleSize
DOCUMENT ME!
-
slice
private final int slice
DOCUMENT ME!
-
surfaceFileName
private java.lang.String surfaceFileName
DOCUMENT ME!
-
-
Constructor Detail
-
AlgorithmHeightFunction
public AlgorithmHeightFunction(ModelImage srcImg, int sampleSize, java.lang.String fileName, int slice, int mesh)
Sets up variables needed by algorithm to run.- Parameters:
srcImg
- Source image model.sampleSize
- Sample size to use when plotting surface.fileName
- File name to save surface to.slice
- Slice of 3D image to plot; 0 if 2D image.mesh
- Type of mesh; 0 = Quad mesh, 1 = Triangle mesh
-
-
Method Detail
-
finalize
public void finalize()
DOCUMENT ME!- Overrides:
finalize
in classAlgorithmBase
-
runAlgorithm
public void runAlgorithm()
Runs the algorithm; calls either calcQuadSurface or calcTriangleSurface, depending on the mesh parameter set in the constructor.- Specified by:
runAlgorithm
in classAlgorithmBase
-
calcQuadSurface
private void calcQuadSurface()
Calculates quad surface.
-
calcTriSurface
private void calcTriSurface()
Calculates triangulated surface.
-
-