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:
ActionListener,WindowListener,Runnable,EventListener
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intDOCUMENT ME!private static final intDOCUMENT ME!private intDOCUMENT ME!private final intDOCUMENT ME!private StringDOCUMENT ME!private static final intDOCUMENT 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, threadStoppedFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionAlgorithmHeightFunction(ModelImage srcImg, int sampleSize, String fileName, int slice, int mesh) Sets up variables needed by algorithm to run. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidCalculates quad surface.private voidCalculates triangulated surface.voidfinalize()DOCUMENT ME!voidRuns 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, 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
-
QUAD
private static final int QUADDOCUMENT ME!- See Also:
-
TRIANGLE
private static final int TRIANGLEDOCUMENT ME!- See Also:
-
mesh
private final int meshDOCUMENT ME! -
sampleSize
private int sampleSizeDOCUMENT ME! -
slice
private final int sliceDOCUMENT ME! -
surfaceFileName
DOCUMENT ME!
-
-
Constructor Details
-
AlgorithmHeightFunction
public AlgorithmHeightFunction(ModelImage srcImg, int sampleSize, 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 Details
-
finalize
public void finalize()DOCUMENT ME!- Overrides:
finalizein classAlgorithmBase
-
runAlgorithm
public void runAlgorithm()Runs the algorithm; calls either calcQuadSurface or calcTriangleSurface, depending on the mesh parameter set in the constructor.- Specified by:
runAlgorithmin classAlgorithmBase
-
calcQuadSurface
private void calcQuadSurface()Calculates quad surface. -
calcTriSurface
private void calcTriSurface()Calculates triangulated surface.
-