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.BitSet
bitset
bitset for src imageprivate boolean
inverseThreshold
flags for destination, threshold, inverse, and color imageprivate boolean
isColorImage
flags for destination, threshold, inverse, and color imageprivate int
length
dimensions and lengthprivate java.util.BitSet
mask
bitset of vois maskprivate float
maxIntensity
max intensities for thresholdprivate float
maxIntensityB
max intensities for thresholdprivate float
maxIntensityG
max intensities for thresholdprivate float
maxIntensityR
max intensities for thresholdprivate float
minIntensity
min intensities for thresholdprivate float
minIntensityB
min intensities for thresholdprivate float
minIntensityG
min intensities for thresholdprivate float
minIntensityR
min intensities for thresholdprivate boolean
newImageDestination
flags for destination, threshold, inverse, and color imageprivate int
numPixels
num pixels in thresholdprivate int
numPixelsB
num pixels in thresholdprivate int
numPixelsG
num pixels in thresholdprivate int
numPixelsR
num pixels in thresholdprivate ModelImage
resultImage
src image, result imageprivate ModelImage
srcImage
src image, result imageprivate float
sumIntensities
total volume in thresholdprivate float
sumIntensitiesB
total volume in thresholdprivate float
sumIntensitiesG
total volume in thresholdprivate float
sumIntensitiesR
total volume in thresholdprivate float
totalArea
total volume in thresholdprivate float
totalAreaB
total volume in thresholdprivate float
totalAreaG
total volume in thresholdprivate float
totalAreaR
total volume in thresholdprivate float
totalVolume
total volume in thresholdprivate float
totalVolumeB
total volume in thresholdprivate float
totalVolumeG
total volume in thresholdprivate float
totalVolumeR
total volume in thresholdprivate float
valuesOutside
values outside intensities for thresholdprivate float
valuesOutsideB
values outside intensities for thresholdprivate float
valuesOutsideG
values outside intensities for thresholdprivate float
valuesOutsideR
values outside intensities for thresholdprivate boolean
wholeImageThreshold
flags for destination, threshold, inverse, and color imageprivate int
xDim
dimensions and lengthprivate float
xRes
resolutionsprivate int
yDim
dimensions and lengthprivate float
yRes
resolutionsprivate int
zDim
dimensions and lengthprivate float
zRes
resolutions-
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 int
getNumPixels()
getNumPixelsint
getNumPixelsB()
getNumPixelsBint
getNumPixelsG()
getNumPixelsGint
getNumPixelsR()
getNumPixelsRModelImage
getResultImage()
getResultImagefloat
getSumIntensities()
get sum intensitiesfloat
getSumIntensitiesB()
get sum intensities Bfloat
getSumIntensitiesG()
get sum intensities Gfloat
getSumIntensitiesR()
get sum intensities Rfloat
getTotalArea()
getTotalAreafloat
getTotalAreaB()
getTotalAreaBfloat
getTotalAreaG()
getTotalAreaGfloat
getTotalAreaR()
getTotalAreaRfloat
getTotalVolume()
getTotalVolumefloat
getTotalVolumeB()
getTotalVolumeBfloat
getTotalVolumeG()
getTotalVolumeGfloat
getTotalVolumeR()
getTotalVolumeRvoid
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
-
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:
runAlgorithm
in 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:
-
-