Class AlgorithmFuzzMinDeAndChatterji
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.filters.AlgorithmFuzzMinDeAndChatterji
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmFuzzMinDeAndChatterji extends AlgorithmBase
This algorithm performs minimization of fuzziness, a reduction of the amount of fuzziness. This method is probably the first fuzzy approach to image enhancement and is also known in the literature as contrast intensification operator. The main idea is to reduce the amount of image fuzziness. The algorithm is as follows: 1.) Gray-level fuzzification (u(g) denotes the degree of brightness) u(g) = 0.5*(1 - (srcThreshold - g)/(srcThreshold - srcMin)) for srcMin = srcMax. gmin-
-
Field Summary
Fields Modifier and Type Field Description private boolean
autoThreshold
If true, ignore srcThreshold input and calculate best valueprivate double
enhancedThreshold
Enhanced image thresholdprivate boolean
entireImage
true means apply to entire image, false only region.private double
gmax
The new maximum level gmax >= srcMaxprivate double
gmin
The new minimum level gminprivate java.util.BitSet
mask
contains VOI.private double
p1
Black region exponent, 0private double
p2
White region exponent, 0private double
srcThreshold
Original image thresholdprivate double
theta1
Angular equivalence of black band, 0private double
theta2
Angular equivalence of white band, 0-
Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, srcImage, threadStopped
-
-
Constructor Summary
Constructors Constructor Description AlgorithmFuzzMinDeAndChatterji(ModelImage srcImg, double srcThreshold, boolean autoThreshold, double enhancedThreshold, double theta1, double theta2, double p1, double p2, double gmin, double gmax, boolean maskFlag)
Constructor for images in which changes are returned to the source image.AlgorithmFuzzMinDeAndChatterji(ModelImage destImg, ModelImage srcImg, double srcThreshold, boolean autoThreshold, double enhancedThreshold, double theta1, double theta2, double p1, double p2, double gmin, double gmax, boolean maskFlag)
Constructor for images in which changes are placed in a predetermined destination image.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
calcStoreInDest()
This function produces a new image that has had fuzzy minimization filteringprivate void
calcStoreInPlace()
Fuzzy minimization filtering of the source image.void
finalize()
Prepares this class for destruction.void
runAlgorithm()
Starts the algorithm.-
Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
actionPerformed, addListener, addProgressChangeListener, calculateImageSize, calculatePrincipleAxis, computeElapsedTime, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, delinkProgressToAlgorithmMulti, displayError, errorCleanUp, 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
-
entireImage
private boolean entireImage
true means apply to entire image, false only region.
-
srcThreshold
private double srcThreshold
Original image threshold
-
enhancedThreshold
private double enhancedThreshold
Enhanced image threshold
-
autoThreshold
private boolean autoThreshold
If true, ignore srcThreshold input and calculate best value
-
theta1
private double theta1
Angular equivalence of black band, 0-
theta2
private double theta2
Angular equivalence of white band, 0-
p1
private double p1
Black region exponent, 0-
p2
private double p2
White region exponent, 0-
gmin
private double gmin
The new minimum level gmin-
gmax
private double gmax
The new maximum level gmax >= srcMax
-
mask
private java.util.BitSet mask
contains VOI.
-
Constructor Detail
-
AlgorithmFuzzMinDeAndChatterji
public AlgorithmFuzzMinDeAndChatterji(ModelImage srcImg, double srcThreshold, boolean autoThreshold, double enhancedThreshold, double theta1, double theta2, double p1, double p2, double gmin, double gmax, boolean maskFlag)
Constructor for images in which changes are returned to the source image.- Parameters:
srcImg
- Source image model.srcThreshold
- original image thresholdautoThreshold
- If true, ignore srcThreshold and calculate best valueenhancedThreshold
- enhanced image thresholdtheta1
- angular equivalence of black bandtheta2
- angular equivalence of white bandp1
- black region exponentp2
- white region exponentgmin
- The new minimum level gmingmax
- The new maximum level gmax >= srcMaxmaskFlag
- Flag that indicates that the fuzzy minimization filtering will be performed for the whole image if equal to true.
-
AlgorithmFuzzMinDeAndChatterji
public AlgorithmFuzzMinDeAndChatterji(ModelImage destImg, ModelImage srcImg, double srcThreshold, boolean autoThreshold, double enhancedThreshold, double theta1, double theta2, double p1, double p2, double gmin, double gmax, boolean maskFlag)
Constructor for images in which changes are placed in a predetermined destination image.- Parameters:
destImg
- Image model where result image is stored.srcImg
- Source image model.srcThreshold
- original image thresholdautoThreshold
- If true, ignore srcThreshold and calculate best valueenhancedThreshold
- enhanced image thresholdtheta1
- angular equivalence of black bandtheta2
- angular equivalence of white bandp1
- black region exponentp2
- white region exponentgmin
- The new minimum level gmingmax
- The new maximum level gmax >= srcMaxmaskFlag
- Flag that indicates that the fuzzy minimization filtering will be performed for the whole image if equal to true.
-
-
Method Detail
-
finalize
public void finalize()
Prepares this class for destruction.- Overrides:
finalize
in classAlgorithmBase
-
runAlgorithm
public void runAlgorithm()
Starts the algorithm.- Specified by:
runAlgorithm
in classAlgorithmBase
-
calcStoreInPlace
private void calcStoreInPlace()
Fuzzy minimization filtering of the source image. Replaces the original image with the filtered image.
-
calcStoreInDest
private void calcStoreInDest()
This function produces a new image that has had fuzzy minimization filtering
-
-
-
-
-
-
-
-