Class AlgorithmWaveletFuse
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.filters.AlgorithmWaveletFuse
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmWaveletFuse extends AlgorithmBase
MIT License Copyright (c) 2021 Hans Brouwer, Riyo Wanagiri Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Reference: Image Fusion Using Wavelet Transform by Aggariyo Wanagiri and Hans Brouwer, Delft University of Technology. This is a port of wavelet_fuse.py and part of util.py.
-
-
Field Summary
Fields Modifier and Type Field Description private ModelImage
fuseImage
private int
kernel_size
private int
max_depth
private PyWavelets.WAVELET_NAME[]
names
private int
numDestColors
private int
numXColors
private int
numYColors
private int[]
orders
private boolean
slow
-
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 AlgorithmWaveletFuse()
AlgorithmWaveletFuse(ModelImage destImg, ModelImage srcImg, ModelImage fuseImage, int kernel_size, PyWavelets.WAVELET_NAME[] names, int[] orders, int max_depth, boolean slow)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean[][][]
decision_map(double[][][] img1, double[][][] img2, int ks)
private double[][][]
fuse(double[][][] img1, double[][][] img2, int ks, boolean slow)
private boolean[][][]
majority_filter(boolean[][][] map, int ks)
void
runAlgorithm()
Actually runs the algorithm.private boolean[][][]
slow_decision_map(double[][][] img1, double[][][] img2, int ks)
private boolean[][][]
slow_majority_filter(boolean[][][] map, int ks)
private double[][]
truncateArray(double[][] imgBuf, int newXDim, int newYDim)
-
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
-
fuseImage
private ModelImage fuseImage
-
kernel_size
private int kernel_size
-
names
private PyWavelets.WAVELET_NAME[] names
-
orders
private int[] orders
-
max_depth
private int max_depth
-
slow
private boolean slow
-
numXColors
private int numXColors
-
numYColors
private int numYColors
-
numDestColors
private int numDestColors
-
-
Constructor Detail
-
AlgorithmWaveletFuse
public AlgorithmWaveletFuse()
-
AlgorithmWaveletFuse
public AlgorithmWaveletFuse(ModelImage destImg, ModelImage srcImg, ModelImage fuseImage, int kernel_size, PyWavelets.WAVELET_NAME[] names, int[] orders, int max_depth, boolean slow)
-
-
Method Detail
-
runAlgorithm
public void runAlgorithm()
Description copied from class:AlgorithmBase
Actually runs the algorithm. Implemented by inheriting algorithms.- Specified by:
runAlgorithm
in classAlgorithmBase
-
truncateArray
private double[][] truncateArray(double[][] imgBuf, int newXDim, int newYDim)
-
fuse
private double[][][] fuse(double[][][] img1, double[][][] img2, int ks, boolean slow)
-
majority_filter
private boolean[][][] majority_filter(boolean[][][] map, int ks)
-
slow_majority_filter
private boolean[][][] slow_majority_filter(boolean[][][] map, int ks)
-
decision_map
private boolean[][][] decision_map(double[][][] img1, double[][][] img2, int ks)
-
slow_decision_map
private boolean[][][] slow_decision_map(double[][][] img1, double[][][] img2, int ks)
-
-