Package gov.nih.mipav.model.algorithms
Class AlgorithmContrastEnhancementUsingExposureFusion
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.AlgorithmContrastEnhancementUsingExposureFusion
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmContrastEnhancementUsingExposureFusion extends AlgorithmBase
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
AlgorithmContrastEnhancementUsingExposureFusion.kFitting
-
Field Summary
Fields Modifier and Type Field Description private double
a
private double
b
int
BORDER_CONSTANT
int
BORDER_DEFAULT
int
BORDER_REFLECT
int
BORDER_REFLECT_101
int
BORDER_REPLICATE
int
BORDER_WRAP
private double
k
private double
mu
-
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 AlgorithmContrastEnhancementUsingExposureFusion()
AlgorithmContrastEnhancementUsingExposureFusion(ModelImage destImg, ModelImage srcImg, double mu, double k, double a, double b)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private double[][]
applyK(double[][] I, double k, double a, double b)
private double[][][]
applyKColor(double[][][] I, double k, double a, double b)
private void
computeTextureWeights(double[][] W_h, double[][] W_v, double[][] fin, int sigma, double sharpness)
double[][]
copyMakeBorder(double[][] src, int top, int bottom, int left, int right, int borderType, double borderValue)
private double[][]
filter2Same(double[][] img, double[][] win)
private double
log2(double input)
private double[][]
maxEntropyEnhance(ModelImage IImage, boolean[][] isBad)
private double[][][]
maxEntropyEnhanceColor(ModelImage IImage, boolean[][] isBad)
void
runAlgorithm()
Actually runs the algorithm.private double[][]
solveLinearEquation(double[][] IN, double[][] wx, double[][] wy, double lambda)
private double[][]
tsmooth(double[][] I, double lambda, int sigma, double sharpness)
-
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
-
mu
private double mu
-
k
private double k
-
a
private double a
-
b
private double b
-
BORDER_CONSTANT
public final int BORDER_CONSTANT
- See Also:
- Constant Field Values
-
BORDER_REPLICATE
public final int BORDER_REPLICATE
- See Also:
- Constant Field Values
-
BORDER_REFLECT
public final int BORDER_REFLECT
- See Also:
- Constant Field Values
-
BORDER_WRAP
public final int BORDER_WRAP
- See Also:
- Constant Field Values
-
BORDER_REFLECT_101
public final int BORDER_REFLECT_101
- See Also:
- Constant Field Values
-
BORDER_DEFAULT
public final int BORDER_DEFAULT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AlgorithmContrastEnhancementUsingExposureFusion
public AlgorithmContrastEnhancementUsingExposureFusion()
-
AlgorithmContrastEnhancementUsingExposureFusion
public AlgorithmContrastEnhancementUsingExposureFusion(ModelImage destImg, ModelImage srcImg, double mu, double k, double a, double b)
-
-
Method Detail
-
runAlgorithm
public void runAlgorithm()
Description copied from class:AlgorithmBase
Actually runs the algorithm. Implemented by inheriting algorithms.- Specified by:
runAlgorithm
in classAlgorithmBase
-
maxEntropyEnhance
private double[][] maxEntropyEnhance(ModelImage IImage, boolean[][] isBad)
-
maxEntropyEnhanceColor
private double[][][] maxEntropyEnhanceColor(ModelImage IImage, boolean[][] isBad)
-
applyK
private double[][] applyK(double[][] I, double k, double a, double b)
-
applyKColor
private double[][][] applyKColor(double[][][] I, double k, double a, double b)
-
log2
private double log2(double input)
-
tsmooth
private double[][] tsmooth(double[][] I, double lambda, int sigma, double sharpness)
-
computeTextureWeights
private void computeTextureWeights(double[][] W_h, double[][] W_v, double[][] fin, int sigma, double sharpness)
-
copyMakeBorder
public double[][] copyMakeBorder(double[][] src, int top, int bottom, int left, int right, int borderType, double borderValue)
-
filter2Same
private double[][] filter2Same(double[][] img, double[][] win)
-
solveLinearEquation
private double[][] solveLinearEquation(double[][] IN, double[][] wx, double[][] wy, double lambda)
-
-