Package gov.nih.mipav.model.algorithms
Class AlgorithmExtractSurfaceCubes
java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.AlgorithmExtractSurfaceCubes
- All Implemented Interfaces:
ActionListener,WindowListener,Runnable,EventListener
Extracts a surface using Marching Cube Extraction. Triangle decimation can be invoked to reduce triangle count. The
decimation algorithm produces a continuous level of detail (clod) structure that can be used to optimize the the
visualization of the surface. The input to this algorithm is typically a mask image where 0 = background and 100 =
object (i.e. interior to a VOI). The mask image is then blurred slightly and the level (50) is extracted. A greyscale
image may also be input and a surface is extracted given a level. The steps are:
- Build mask image of VOI (i.e. all point interior to VOI are set to 100. All points exterior are = 0.
- Blur mask image if not grey-scale
- Extract level surface at 50 or user defined level
- Save surface ( ".sur")
- If decimate then decimate surface and save (".sur")
- Version:
- 0.1 June, 2001
- Author:
- Matthew J. McAuliffe, Ph.D., David H. Eberly, Ph.D. wrote all the extraction and decimation code found in the SurfaceExtraction, SurfaceDecimation and associated classes, with a little input from Matt with speed and memory optimizations
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intUse adjacency model to perform triangle consistency.private final booleanIf true then the input image is blurred slightly.private floatThe amount to blur to smooth surface.private final booleanIf true then the extracted surface is decimated into a continuous level of detail surface (clod).private final intIndicates level surface to be extracted.static final intExtract surface based on intensity level.static final intExtract surface from mask image.private ModelImageMask image to extract surface from.private final intIndicates mode - VOI, LEVELSET, or MASK.static final intDo not perform triangle consistency checking - all counter clockwise or all clockwise.static final intUse smoothing model to perform triangle consistency.private StringPath and name of extracted surface file. ".sur" will be appended if necessary.static final intExtract surface from VOI.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
ConstructorsConstructorDescriptionAlgorithmExtractSurfaceCubes(ModelImage image, int level, int mode, boolean decFlag, boolean blurFlag, float sigma, String fileName) Creates a new AlgorithmExtractSurfaceCubes object. -
Method Summary
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
-
VOI_MODE
public static final int VOI_MODEExtract surface from VOI.- See Also:
-
MASK_MODE
public static final int MASK_MODEExtract surface from mask image.- See Also:
-
LEVEL_MODE
public static final int LEVEL_MODEExtract surface based on intensity level.- See Also:
-
NONE_MODE
public static final int NONE_MODEDo not perform triangle consistency checking - all counter clockwise or all clockwise.- See Also:
-
ADJ_MODE
public static final int ADJ_MODEUse adjacency model to perform triangle consistency.- See Also:
-
SMOOTH_MODE
public static final int SMOOTH_MODEUse smoothing model to perform triangle consistency. Smooths normals.- See Also:
-
blurFlag
private final boolean blurFlagIf true then the input image is blurred slightly. -
blurSigma
private float blurSigmaThe amount to blur to smooth surface. -
decimateFlag
private final boolean decimateFlagIf true then the extracted surface is decimated into a continuous level of detail surface (clod). -
level
private final int levelIndicates level surface to be extracted. -
maskImage
Mask image to extract surface from. -
mode
private final int modeIndicates mode - VOI, LEVELSET, or MASK. -
surfaceFileName
Path and name of extracted surface file. ".sur" will be appended if necessary.
-
-
Constructor Details
-
AlgorithmExtractSurfaceCubes
public AlgorithmExtractSurfaceCubes(ModelImage image, int level, int mode, boolean decFlag, boolean blurFlag, float sigma, String fileName) Creates a new AlgorithmExtractSurfaceCubes object.- Parameters:
image- mask image or gray-scale where a level surface is to be extractedlevel- indicates level surface to be extractedmode- Indicates mode - VOI, LEVELSET, or MASK.decFlag- indicates whether or not the decimation into a CLOD should take place.blurFlag- if true then the input image is blurred slightlysigma- the amount to blur the imagefileName- path and name of extracted surface file. ".sur" will be appended if necessary.smoothFlag- whether the generated mesh should have smoothing applied to it
-
-
Method Details
-
finalize
public void finalize()Prepares this class for destruction.- Overrides:
finalizein classAlgorithmBase
-
runAlgorithm
public void runAlgorithm()Starts the program.- Specified by:
runAlgorithmin classAlgorithmBase
-
extractSurface
private void extractSurface()Extracts a surface, in the form of triangles, from an image. -
init
private void init()DOCUMENT ME!
-