Package gov.nih.mipav.model.algorithms
Class AlgorithmStandardDeviationThreshold
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.AlgorithmStandardDeviationThreshold
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.awt.event.WindowListener,java.lang.Runnable,java.util.EventListener
public class AlgorithmStandardDeviationThreshold extends AlgorithmBase
The Standard Deviation Threshold works by first having an active VOI in which the standard deviation and other statistics are calculated. The dialog allows the user to enter the number of standard deviations and the values outside the range for the thersholding process. The theresholding can be done on the whole image or alternatively, on other VOIS that are not active that might be on the image. The destination can either be a new image or paint in existing image except if the src image is a color image.- Author:
- pandyan
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.BitSetbitsetbitset for src imageprivate booleaninverseThresholdflags for destination, threshold, inverse, and color imageprivate booleanisColorImageflags for destination, threshold, inverse, and color imageprivate intlengthdimensions and lengthprivate java.util.BitSetmaskbitset of vois maskprivate floatmaxIntensitymax intensities for thresholdprivate floatmaxIntensityBmax intensities for thresholdprivate floatmaxIntensityGmax intensities for thresholdprivate floatmaxIntensityRmax intensities for thresholdprivate floatminIntensitymin intensities for thresholdprivate floatminIntensityBmin intensities for thresholdprivate floatminIntensityGmin intensities for thresholdprivate floatminIntensityRmin intensities for thresholdprivate booleannewImageDestinationflags for destination, threshold, inverse, and color imageprivate intnumPixelsnum pixels in thresholdprivate intnumPixelsBnum pixels in thresholdprivate intnumPixelsGnum pixels in thresholdprivate intnumPixelsRnum pixels in thresholdprivate ModelImageresultImagesrc image, result imageprivate ModelImagesrcImagesrc image, result imageprivate floatsumIntensitiestotal volume in thresholdprivate floatsumIntensitiesBtotal volume in thresholdprivate floatsumIntensitiesGtotal volume in thresholdprivate floatsumIntensitiesRtotal volume in thresholdprivate floattotalAreatotal volume in thresholdprivate floattotalAreaBtotal volume in thresholdprivate floattotalAreaGtotal volume in thresholdprivate floattotalAreaRtotal volume in thresholdprivate floattotalVolumetotal volume in thresholdprivate floattotalVolumeBtotal volume in thresholdprivate floattotalVolumeGtotal volume in thresholdprivate floattotalVolumeRtotal volume in thresholdprivate floatvaluesOutsidevalues outside intensities for thresholdprivate floatvaluesOutsideBvalues outside intensities for thresholdprivate floatvaluesOutsideGvalues outside intensities for thresholdprivate floatvaluesOutsideRvalues outside intensities for thresholdprivate booleanwholeImageThresholdflags for destination, threshold, inverse, and color imageprivate intxDimdimensions and lengthprivate floatxResresolutionsprivate intyDimdimensions and lengthprivate floatyResresolutionsprivate intzDimdimensions and lengthprivate floatzResresolutions-
Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, threadStopped
-
-
Constructor Summary
Constructors Constructor Description AlgorithmStandardDeviationThreshold(ModelImage srcImage, float minIntensity, float maxIntensity, float valuesOutside, boolean newImageDestination, boolean wholeImageThreshold, boolean inverseThreshold)constructor for grey scale imageAlgorithmStandardDeviationThreshold(ModelImage srcImage, float minIntensityR, float minIntensityG, float minIntensityB, float maxIntensityR, float maxIntensityG, float maxIntensityB, float valuesOutsideR, float valuesOutsideG, float valuesOutsideB, boolean newImageDestination, boolean wholeImageThreshold, boolean inverseThreshold)constructor for color image
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetNumPixels()getNumPixelsintgetNumPixelsB()getNumPixelsBintgetNumPixelsG()getNumPixelsGintgetNumPixelsR()getNumPixelsRModelImagegetResultImage()getResultImagefloatgetSumIntensities()get sum intensitiesfloatgetSumIntensitiesB()get sum intensities BfloatgetSumIntensitiesG()get sum intensities GfloatgetSumIntensitiesR()get sum intensities RfloatgetTotalArea()getTotalAreafloatgetTotalAreaB()getTotalAreaBfloatgetTotalAreaG()getTotalAreaGfloatgetTotalAreaR()getTotalAreaRfloatgetTotalVolume()getTotalVolumefloatgetTotalVolumeB()getTotalVolumeBfloatgetTotalVolumeG()getTotalVolumeGfloatgetTotalVolumeR()getTotalVolumeRvoidrunAlgorithm()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
-
maxIntensity
private float maxIntensity
max intensities for threshold
-
maxIntensityR
private float maxIntensityR
max intensities for threshold
-
maxIntensityG
private float maxIntensityG
max intensities for threshold
-
maxIntensityB
private float maxIntensityB
max intensities for threshold
-
minIntensity
private float minIntensity
min intensities for threshold
-
minIntensityR
private float minIntensityR
min intensities for threshold
-
minIntensityG
private float minIntensityG
min intensities for threshold
-
minIntensityB
private float minIntensityB
min intensities for threshold
-
srcImage
private ModelImage srcImage
src image, result image
-
resultImage
private ModelImage resultImage
src image, result image
-
valuesOutside
private float valuesOutside
values outside intensities for threshold
-
valuesOutsideR
private float valuesOutsideR
values outside intensities for threshold
-
valuesOutsideG
private float valuesOutsideG
values outside intensities for threshold
-
valuesOutsideB
private float valuesOutsideB
values outside intensities for threshold
-
xDim
private int xDim
dimensions and length
-
yDim
private int yDim
dimensions and length
-
zDim
private int zDim
dimensions and length
-
length
private int length
dimensions and length
-
numPixels
private int numPixels
num pixels in threshold
-
numPixelsR
private int numPixelsR
num pixels in threshold
-
numPixelsG
private int numPixelsG
num pixels in threshold
-
numPixelsB
private int numPixelsB
num pixels in threshold
-
totalVolume
private float totalVolume
total volume in threshold
-
totalArea
private float totalArea
total volume in threshold
-
totalVolumeR
private float totalVolumeR
total volume in threshold
-
totalVolumeG
private float totalVolumeG
total volume in threshold
-
totalVolumeB
private float totalVolumeB
total volume in threshold
-
totalAreaR
private float totalAreaR
total volume in threshold
-
totalAreaG
private float totalAreaG
total volume in threshold
-
totalAreaB
private float totalAreaB
total volume in threshold
-
sumIntensities
private float sumIntensities
total volume in threshold
-
sumIntensitiesR
private float sumIntensitiesR
total volume in threshold
-
sumIntensitiesG
private float sumIntensitiesG
total volume in threshold
-
sumIntensitiesB
private float sumIntensitiesB
total volume in threshold
-
xRes
private float xRes
resolutions
-
yRes
private float yRes
resolutions
-
zRes
private float zRes
resolutions
-
bitset
private java.util.BitSet bitset
bitset for src image
-
newImageDestination
private boolean newImageDestination
flags for destination, threshold, inverse, and color image
-
wholeImageThreshold
private boolean wholeImageThreshold
flags for destination, threshold, inverse, and color image
-
inverseThreshold
private boolean inverseThreshold
flags for destination, threshold, inverse, and color image
-
isColorImage
private boolean isColorImage
flags for destination, threshold, inverse, and color image
-
mask
private java.util.BitSet mask
bitset of vois mask
-
-
Constructor Detail
-
AlgorithmStandardDeviationThreshold
public AlgorithmStandardDeviationThreshold(ModelImage srcImage, float minIntensity, float maxIntensity, float valuesOutside, boolean newImageDestination, boolean wholeImageThreshold, boolean inverseThreshold)
constructor for grey scale image- Parameters:
srcImage-minIntensity-maxIntensity-valuesOutside-newImageDestination-wholeImageThreshold-inverseThreshold-
-
AlgorithmStandardDeviationThreshold
public AlgorithmStandardDeviationThreshold(ModelImage srcImage, float minIntensityR, float minIntensityG, float minIntensityB, float maxIntensityR, float maxIntensityG, float maxIntensityB, float valuesOutsideR, float valuesOutsideG, float valuesOutsideB, boolean newImageDestination, boolean wholeImageThreshold, boolean inverseThreshold)
constructor for color image- Parameters:
srcImage-minIntensityR-minIntensityG-minIntensityB-maxIntensityR-maxIntensityG-maxIntensityB-valuesOutsideR-valuesOutsideG-valuesOutsideB-newImageDestination-wholeImageThreshold-inverseThreshold-
-
-
Method Detail
-
runAlgorithm
public void runAlgorithm()
run algorithm- Specified by:
runAlgorithmin classAlgorithmBase
-
getResultImage
public ModelImage getResultImage()
getResultImage- Returns:
-
getTotalArea
public float getTotalArea()
getTotalArea- Returns:
-
getTotalVolume
public float getTotalVolume()
getTotalVolume- Returns:
-
getNumPixels
public int getNumPixels()
getNumPixels- Returns:
-
getNumPixelsB
public int getNumPixelsB()
getNumPixelsB- Returns:
-
getNumPixelsG
public int getNumPixelsG()
getNumPixelsG- Returns:
-
getNumPixelsR
public int getNumPixelsR()
getNumPixelsR- Returns:
-
getTotalAreaB
public float getTotalAreaB()
getTotalAreaB- Returns:
-
getTotalAreaG
public float getTotalAreaG()
getTotalAreaG- Returns:
-
getTotalAreaR
public float getTotalAreaR()
getTotalAreaR- Returns:
-
getTotalVolumeB
public float getTotalVolumeB()
getTotalVolumeB- Returns:
-
getTotalVolumeG
public float getTotalVolumeG()
getTotalVolumeG- Returns:
-
getTotalVolumeR
public float getTotalVolumeR()
getTotalVolumeR- Returns:
-
getSumIntensities
public float getSumIntensities()
get sum intensities- Returns:
-
getSumIntensitiesB
public float getSumIntensitiesB()
get sum intensities B- Returns:
-
getSumIntensitiesG
public float getSumIntensitiesG()
get sum intensities G- Returns:
-
getSumIntensitiesR
public float getSumIntensitiesR()
get sum intensities R- Returns:
-
-