Class AlgorithmMask
java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.utilities.AlgorithmMask
- All Implemented Interfaces:
ActionListener,WindowListener,Runnable,EventListener
Allow the user to fill a VOI or fill everything outside the VOI with a specific fill value.
- Version:
- 0.1 Feb 11, 1998
- 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 floatSet the mask areas to this value.private floatDOCUMENT ME!private floatDOCUMENT ME!private floatprivate floatDOCUMENT ME!private booleanif true then fill inside the 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
ConstructorsConstructorDescriptionAlgorithmMask(ModelImage srcImg, float fill, boolean polarity, boolean useVOI) Creates a new AlgorithmMask object.AlgorithmMask(ModelImage srcImg, float fill, float fillI, boolean polarity, boolean useVOI) Creates a new AlgorithmMask object.AlgorithmMask(ModelImage srcImg, float fillR, float fillG, float fillB, boolean polarity, boolean useVOI) Creates a new AlgorithmMask object.AlgorithmMask(ModelImage destImg, ModelImage srcImg, float fill, boolean polarity, boolean useVOI) Creates a new AlgorithmMask object.AlgorithmMask(ModelImage destImg, ModelImage srcImg, float fill, float fillI, boolean polarity, boolean useVOI) Creates a new AlgorithmMask object.AlgorithmMask(ModelImage destImg, ModelImage srcImg, float fillR, float fillG, float fillB, boolean polarity, boolean useVOI) Creates a new AlgorithmMask object.AlgorithmMask(ModelImage srcImg, Color _fillColor, boolean polarity, boolean useVOI) Creates a new AlgorithmMask object. -
Method Summary
Modifier and TypeMethodDescriptionvoidcalcInPlace25D(BitSet mask, float fillValue, int tSlice) Fills VOI of the source image with fill value.voidcalcInPlace25D(BitSet mask, float fillValue, int tSlice, Vector<Integer> intensityLockVector, boolean showProgressBar) Fills VOI of the source image with fill value.voidcalcInPlace25DC(BitSet mask, Color fillColor, int tSlice, String rgbString, Vector<Integer> intensityLockVector, boolean showProgressBar) Fills VOI of the color source image with fill color.voidcalcInPlace25DCMask(BitSet mask, Color fillColor, int tSlice) Fills VOI of the color source image with fill color.voidcalcInPlace25DMask(BitSet mask, float fillValue, int tSlice) Fills VOI of the source image with fill value.voidcalcInPlace25DMask(BitSet mask, float fillValue, int tSlice, Vector<Integer> intensityLockVector) Fills VOI of the source image with fill value.private voidFills VOI of source image with fill value.private voidFills VOI of source image with fill value.private voidFills VOI of source image with fill value.private voidFills VOI of the source image with fill value.private voidFills VOI of the source image with fill value.private voidFills VOI of the source image with fill value.private voidFills VOI of the source image with fill value.private voidFills VOI of the source image with fill value.private voidFills VOI of the source image with fill value.private voidFills new image/VOI with new fill value;private voidFills new image/VOI with new fill value;private voidFills new image/VOI with new fill value;private voidFills new image/VOI with new fill value;private voidFills new image/VOI with new fill value;private voidFills new image/VOI with new fill value;private voidFills new image/VOI with new fill value;private voidFills new image/VOI with new fill value;private voidFills new image/VOI with new fill value;voidfinalize()Prepares this class for destruction.voidStarts the program.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
-
imageFill
private float imageFillSet the mask areas to this value. -
imageFillB
private float imageFillBDOCUMENT ME! -
imageFillG
private float imageFillGDOCUMENT ME! -
imageFillR
private float imageFillRDOCUMENT ME! -
imageFillI
private float imageFillI -
polarity
private boolean polarityif true then fill inside the VOI. If false then fill outside
-
-
Constructor Details
-
AlgorithmMask
Creates a new AlgorithmMask object.- Parameters:
srcImg- source image modelfill- value used to fill a regionpolarity- flag indicating fill location, true = fill inside; false fill outsideuseVOI- use the VOI to define the mask area else it will use the painted area to define the mask.
-
AlgorithmMask
Creates a new AlgorithmMask object.- Parameters:
srcImg- source image model_fillColor- color used to fill a regionpolarity- flag indicating fill location, true = fill inside; false fill outsideuseVOI- use the VOI to define the mask area else it will use the painted area to define the mask.
-
AlgorithmMask
public AlgorithmMask(ModelImage destImg, ModelImage srcImg, float fill, boolean polarity, boolean useVOI) Creates a new AlgorithmMask object.- Parameters:
destImg- image model where result image is to storedsrcImg- source image modelfill- value used to fill a regionpolarity- flag indicating fill location, true = fill inside; false fill outsideuseVOI- use the VOI to define the mask area else it will use the painted area to define the mask.
-
AlgorithmMask
public AlgorithmMask(ModelImage srcImg, float fillR, float fillG, float fillB, boolean polarity, boolean useVOI) Creates a new AlgorithmMask object.- Parameters:
srcImg- source image modelfillR- red value used to fill a regionfillG- green value used to fill a regionfillB- blue value used to fill a regionpolarity- flag indicating fill location, true = fill inside; false fill outsideuseVOI- use the VOI to define the mask area else it will use the painted area to define the mask.
-
AlgorithmMask
public AlgorithmMask(ModelImage destImg, ModelImage srcImg, float fillR, float fillG, float fillB, boolean polarity, boolean useVOI) Creates a new AlgorithmMask object.- Parameters:
destImg- image model where result image is to storedsrcImg- source image modelfillR- red value used to fill a regionfillG- green value used to fill a regionfillB- blue value used to fill a regionpolarity- flag indicating fill location, true = fill inside; false fill outsideuseVOI- use the VOI to define the mask area else it will use the painted area to define the mask.
-
AlgorithmMask
Creates a new AlgorithmMask object.- Parameters:
srcImg- source image modelfill- real value used to fill a regionfillI- imaginary value used to fill a regionpolarity- flag indicating fill location, true = fill inside; false fill outsideuseVOI- use the VOI to define the mask area else it will use the painted area to define the mask.
-
AlgorithmMask
public AlgorithmMask(ModelImage destImg, ModelImage srcImg, float fill, float fillI, boolean polarity, boolean useVOI) Creates a new AlgorithmMask object.- Parameters:
destImg- image model where result image is to storedsrcImg- source image modelfill- real value used to fill a regionfillI- imaginary value used to fill a regionpolarity- flag indicating fill location, true = fill inside; false fill outsideuseVOI- use the VOI to define the mask area else it will use the painted area to define the mask.
-
-
Method Details
-
calcInPlace25D
Fills VOI of the source image with fill value.- Parameters:
mask- DOCUMENT ME!fillValue- value to be placed in the image where the mask is truetSlice- indicates which volume should be painted (tSlice = 4th dimension)
-
calcInPlace25D
public void calcInPlace25D(BitSet mask, float fillValue, int tSlice, Vector<Integer> intensityLockVector, boolean showProgressBar) Fills VOI of the source image with fill value.- Parameters:
mask- DOCUMENT ME!fillValue- value to be placed in the image where the mask is truetSlice- indicates which volume should be painted (tSlice = 4th dimension)intensityLockVector- Vector containing Integer objects that represent the intensity values that are not mutable
-
calcInPlace25DC
public void calcInPlace25DC(BitSet mask, Color fillColor, int tSlice, String rgbString, Vector<Integer> intensityLockVector, boolean showProgressBar) Fills VOI of the color source image with fill color.- Parameters:
mask- DOCUMENT ME!fillColor- color to be placed in the image where the mask is truetSlice- indicates which volume should be painted (tSlice = 4th dimension)
-
calcInPlace25DCMask
Fills VOI of the color source image with fill color.- Parameters:
mask- DOCUMENT ME!fillColor- color to be placed in the image where the mask is truetSlice- indicates which volume should be painted (tSlice = 4th dimension)
-
calcInPlace25DMask
Fills VOI of the source image with fill value.- Parameters:
mask- DOCUMENT ME!fillValue- value to be placed in the image where the mask is truetSlice- indicates which volume should be painted (tSlice = 4th dimension)
-
calcInPlace25DMask
public void calcInPlace25DMask(BitSet mask, float fillValue, int tSlice, Vector<Integer> intensityLockVector) Fills VOI of the source image with fill value.- Parameters:
mask- DOCUMENT ME!fillValue- value to be placed in the image where the mask is truetSlice- indicates which volume should be painted (tSlice = 4th dimension)intensityLockVector- DOCUMENT ME!
-
finalize
public void finalize()Prepares this class for destruction.- Overrides:
finalizein classAlgorithmBase
-
runAlgorithm
public void runAlgorithm()Starts the program.- Specified by:
runAlgorithmin classAlgorithmBase
-
calcInPlace2D
private void calcInPlace2D()Fills VOI of source image with fill value. -
calcInPlace2DComplex
private void calcInPlace2DComplex()Fills VOI of source image with fill value. -
calcInPlace2DRGB
private void calcInPlace2DRGB()Fills VOI of source image with fill value. -
calcInPlace3D
private void calcInPlace3D()Fills VOI of the source image with fill value. -
calcInPlace3DComplex
private void calcInPlace3DComplex()Fills VOI of the source image with fill value. -
calcInPlace3DRGB
private void calcInPlace3DRGB()Fills VOI of the source image with fill value. -
calcInPlace4D
private void calcInPlace4D()Fills VOI of the source image with fill value. -
calcInPlace4DComplex
private void calcInPlace4DComplex()Fills VOI of the source image with fill value. -
calcInPlace4DRGB
private void calcInPlace4DRGB()Fills VOI of the source image with fill value. -
calcStoreInDest2D
private void calcStoreInDest2D()Fills new image/VOI with new fill value; -
calcStoreInDest2DComplex
private void calcStoreInDest2DComplex()Fills new image/VOI with new fill value; -
calcStoreInDest2DRGB
private void calcStoreInDest2DRGB()Fills new image/VOI with new fill value; -
calcStoreInDest3D
private void calcStoreInDest3D()Fills new image/VOI with new fill value; -
calcStoreInDest3DComplex
private void calcStoreInDest3DComplex()Fills new image/VOI with new fill value; -
calcStoreInDest3DRGB
private void calcStoreInDest3DRGB()Fills new image/VOI with new fill value; -
calcStoreInDest4D
private void calcStoreInDest4D()Fills new image/VOI with new fill value; -
calcStoreInDest4DComplex
private void calcStoreInDest4DComplex()Fills new image/VOI with new fill value; -
calcStoreInDest4DRGB
private void calcStoreInDest4DRGB()Fills new image/VOI with new fill value;
-