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 intADDoperation constantsprivate AlgorithmMorphology2Dalg2Dprivate AlgorithmMorphology3Dalg3Dprotected ModelImageclonedImageModel Imagesprotected booleandoVoiImageflag indicating whether output should be VOI image or mask imageprotected ModelImagefinalMaskImageModel Imagesprivate intkernelprivate intmaxprivate intminprotected intoperationoperation typestatic intORoperation constantsprotected ViewVOIVectorselectedVOIsetVector of all VOIs that will have calculations performed.protected ModelImagetempMaskImageModel Imagesstatic intXORoperation 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 ModelImagegetFinalMaskImage()returns the mask imagevoidrunAlgorithm()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:
runAlgorithmin classAlgorithmBase
-
getFinalMaskImage
public ModelImage getFinalMaskImage()
returns the mask image- Returns:
-
-