Class AlgorithmReplaceValue
java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.utilities.AlgorithmReplaceValue
- All Implemented Interfaces:
ActionListener,WindowListener,Runnable,EventListener
Title: AlgorithmReplaceValue
Description: Replaces the "input" value with the specified "output" value
Copyright: Copyright (c) 2004
Company:
- Version:
- 1.0
- Author:
- not attributable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intDOCUMENT ME!private booleanprivate Vector<JDialogReplaceValue.Values> DOCUMENT ME!private doubleDOCUMENT 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
ConstructorsConstructorDescriptionAlgorithmReplaceValue(ModelImage destImage, ModelImage srcImage, Vector<JDialogReplaceValue.Values> input, double output, boolean entireImage) Default contructor. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidReplace the values and store into a new image.private voidReplace the values in place.Gets the result image.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
-
colorFactor
private int colorFactorDOCUMENT ME! -
inputRanges
DOCUMENT ME! -
outputVal
private double outputValDOCUMENT ME! -
entireImage
private boolean entireImage
-
-
Constructor Details
-
AlgorithmReplaceValue
public AlgorithmReplaceValue(ModelImage destImage, ModelImage srcImage, Vector<JDialogReplaceValue.Values> input, double output, boolean entireImage) Default contructor.- Parameters:
destImage- ModelImage destination imagesrcImage- ModelImage source imageinput- double input value to replaceoutput- double value to replace with
-
-
Method Details
-
getResultImage
Gets the result image.- Returns:
- ModelImage result image
-
runAlgorithm
public void runAlgorithm()Actually runs the algorithm.- Specified by:
runAlgorithmin classAlgorithmBase
-
calcStoreInDest
private void calcStoreInDest()Replace the values and store into a new image. -
calcStoreInPlace
private void calcStoreInPlace()Replace the values in place.
-