Package gov.nih.mipav.model.algorithms
Class AlgorithmVOILogicalOperations
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.AlgorithmVOILogicalOperations
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmVOILogicalOperations extends AlgorithmBase
Algorithm class for performing logical operations on VOIs- Author:
- pandyan
-
-
Field Summary
Fields Modifier and Type Field Description static int
ADD
operation constantsprivate AlgorithmMorphology2D
alg2D
private AlgorithmMorphology3D
alg3D
protected ModelImage
clonedImage
Model Imagesprotected boolean
doVoiImage
flag indicating whether output should be VOI image or mask imageprotected ModelImage
finalMaskImage
Model Imagesprivate int
kernel
private int
max
private int
min
protected int
operation
operation typestatic int
OR
operation constantsprotected ViewVOIVector
selectedVOIset
Vector of all VOIs that will have calculations performed.protected ModelImage
tempMaskImage
Model Imagesstatic int
XOR
operation constants-
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 AlgorithmVOILogicalOperations(ModelImage clonedImage, ViewVOIVector selectedVOIset, int operation, boolean doVoiImage)
constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ModelImage
getFinalMaskImage()
returns the mask imagevoid
runAlgorithm()
run 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, 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
-
selectedVOIset
protected ViewVOIVector selectedVOIset
Vector of all VOIs that will have calculations performed.
-
clonedImage
protected ModelImage clonedImage
Model Images
-
finalMaskImage
protected ModelImage finalMaskImage
Model Images
-
tempMaskImage
protected ModelImage tempMaskImage
Model Images
-
operation
protected int operation
operation type
-
ADD
public static final int ADD
operation constants- See Also:
- Constant Field Values
-
OR
public static final int OR
operation constants- See Also:
- Constant Field Values
-
XOR
public static final int XOR
operation constants- See Also:
- Constant Field Values
-
doVoiImage
protected boolean doVoiImage
flag indicating whether output should be VOI image or mask image
-
alg2D
private AlgorithmMorphology2D alg2D
-
alg3D
private AlgorithmMorphology3D alg3D
-
min
private int min
-
max
private int max
-
kernel
private int kernel
-
-
Constructor Detail
-
AlgorithmVOILogicalOperations
public AlgorithmVOILogicalOperations(ModelImage clonedImage, ViewVOIVector selectedVOIset, int operation, boolean doVoiImage)
constructor- Parameters:
img
-clonedImage
-selectedVOIset
-operation
-doVoiImage
-
-
-
Method Detail
-
runAlgorithm
public void runAlgorithm()
run algorithm- Specified by:
runAlgorithm
in classAlgorithmBase
-
getFinalMaskImage
public ModelImage getFinalMaskImage()
returns the mask image- Returns:
-
-