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:
ActionListener,WindowListener,Runnable,EventListener
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BitSetbitset for src imageprivate booleanflags for destination, threshold, inverse, and color imageprivate booleanflags for destination, threshold, inverse, and color imageprivate intdimensions and lengthprivate BitSetbitset of vois maskprivate floatmax intensities for thresholdprivate floatmax intensities for thresholdprivate floatmax intensities for thresholdprivate floatmax intensities for thresholdprivate floatmin intensities for thresholdprivate floatmin intensities for thresholdprivate floatmin intensities for thresholdprivate floatmin intensities for thresholdprivate booleanflags for destination, threshold, inverse, and color imageprivate intnum pixels in thresholdprivate intnum pixels in thresholdprivate intnum pixels in thresholdprivate intnum pixels in thresholdprivate ModelImagesrc image, result imageprivate ModelImagesrc image, result imageprivate floattotal volume in thresholdprivate floattotal volume in thresholdprivate floattotal volume in thresholdprivate floattotal volume in thresholdprivate floattotal volume in thresholdprivate floattotal volume in thresholdprivate floattotal volume in thresholdprivate floattotal volume in thresholdprivate floattotal volume in thresholdprivate floattotal volume in thresholdprivate floattotal volume in thresholdprivate floattotal volume in thresholdprivate floatvalues outside intensities for thresholdprivate floatvalues outside intensities for thresholdprivate floatvalues outside intensities for thresholdprivate floatvalues outside intensities for thresholdprivate booleanflags for destination, threshold, inverse, and color imageprivate intdimensions and lengthprivate floatresolutionsprivate intdimensions and lengthprivate floatresolutionsprivate intdimensions and lengthprivate floatresolutionsFields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, threadStoppedFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionAlgorithmStandardDeviationThreshold(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
Modifier and TypeMethodDescriptionintgetNumPixelsintgetNumPixelsBintgetNumPixelsGintgetNumPixelsRgetResultImagefloatget sum intensitiesfloatget sum intensities Bfloatget sum intensities Gfloatget sum intensities RfloatgetTotalAreafloatgetTotalAreaBfloatgetTotalAreaGfloatgetTotalAreaRfloatgetTotalVolumefloatgetTotalVolumeBfloatgetTotalVolumeGfloatgetTotalVolumeRvoidrun algorithmMethods 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
-
maxIntensity
private float maxIntensitymax intensities for threshold -
maxIntensityR
private float maxIntensityRmax intensities for threshold -
maxIntensityG
private float maxIntensityGmax intensities for threshold -
maxIntensityB
private float maxIntensityBmax intensities for threshold -
minIntensity
private float minIntensitymin intensities for threshold -
minIntensityR
private float minIntensityRmin intensities for threshold -
minIntensityG
private float minIntensityGmin intensities for threshold -
minIntensityB
private float minIntensityBmin intensities for threshold -
srcImage
src image, result image -
resultImage
src image, result image -
valuesOutside
private float valuesOutsidevalues outside intensities for threshold -
valuesOutsideR
private float valuesOutsideRvalues outside intensities for threshold -
valuesOutsideG
private float valuesOutsideGvalues outside intensities for threshold -
valuesOutsideB
private float valuesOutsideBvalues outside intensities for threshold -
xDim
private int xDimdimensions and length -
yDim
private int yDimdimensions and length -
zDim
private int zDimdimensions and length -
length
private int lengthdimensions and length -
numPixels
private int numPixelsnum pixels in threshold -
numPixelsR
private int numPixelsRnum pixels in threshold -
numPixelsG
private int numPixelsGnum pixels in threshold -
numPixelsB
private int numPixelsBnum pixels in threshold -
totalVolume
private float totalVolumetotal volume in threshold -
totalArea
private float totalAreatotal volume in threshold -
totalVolumeR
private float totalVolumeRtotal volume in threshold -
totalVolumeG
private float totalVolumeGtotal volume in threshold -
totalVolumeB
private float totalVolumeBtotal volume in threshold -
totalAreaR
private float totalAreaRtotal volume in threshold -
totalAreaG
private float totalAreaGtotal volume in threshold -
totalAreaB
private float totalAreaBtotal volume in threshold -
sumIntensities
private float sumIntensitiestotal volume in threshold -
sumIntensitiesR
private float sumIntensitiesRtotal volume in threshold -
sumIntensitiesG
private float sumIntensitiesGtotal volume in threshold -
sumIntensitiesB
private float sumIntensitiesBtotal volume in threshold -
xRes
private float xResresolutions -
yRes
private float yResresolutions -
zRes
private float zResresolutions -
bitset
bitset for src image -
newImageDestination
private boolean newImageDestinationflags for destination, threshold, inverse, and color image -
wholeImageThreshold
private boolean wholeImageThresholdflags for destination, threshold, inverse, and color image -
inverseThreshold
private boolean inverseThresholdflags for destination, threshold, inverse, and color image -
isColorImage
private boolean isColorImageflags for destination, threshold, inverse, and color image -
mask
bitset of vois mask
-
-
Constructor Details
-
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 Details
-
runAlgorithm
public void runAlgorithm()run algorithm- Specified by:
runAlgorithmin classAlgorithmBase
-
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:
-