Class OpenCLAlgorithmFFT
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.OpenCLAlgorithmBase
-
- gov.nih.mipav.model.algorithms.filters.OpenCL.filters.OpenCLAlgorithmFFT
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class OpenCLAlgorithmFFT extends OpenCLAlgorithmBase
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
complexInverse
static int
FORWARD
Forward FFTprivate float[]
imagData
Imaginary data.private boolean
image25D
If true process each slice one at a time in 3D image.static int
INVERSE
Inverse FFTprivate boolean
logMagDisplay
If true display log10 of 1 + magnitude.private float[]
realData
Real data.static int
SLICE_XY
Constants for xy plane, yz plane and zx plane.static int
SLICE_YZ
static int
SLICE_ZX
(package private) long
startTime
private int
transformDir
Transform direction.private boolean
unequalDim
If true allow unequal FFT dimensions.-
Fields inherited from class gov.nih.mipav.model.algorithms.OpenCLAlgorithmBase
cl, color, colorMask, contextLibrary, depth, device, entireImage, height, m_iDeviceType, m_kGL, openCLTypeLibrary, time, width
-
Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, srcImage, threadStopped
-
-
Constructor Summary
Constructors Constructor Description OpenCLAlgorithmFFT(ModelImage srcImg, int transformDir, boolean logMagDisplay, boolean unequalDim, boolean image25D, boolean complexInverse)
OpenCLAlgorithmFFT(ModelImage destImg, ModelImage srcImg, int transformDir, boolean logMagDisplay, boolean unequalDim, boolean image25D, boolean complexInverse)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
calcFFT(float[] input, boolean isComplex)
private void
calcFFT25D(float[][] input, boolean isComplex)
void
finalize()
Prepare this class for destruction.float[]
getImaginaryData()
Returns reference to imaginary data array.float[]
getRealData()
Returns reference to real data array.void
runAlgorithm()
Starts the program.void
saveImage(float[] data)
void
saveImage(float[] data, int slice)
void
saveImageFFT(float[] data)
void
saveImageFFT(float[] data, int slice)
-
Methods inherited from class gov.nih.mipav.model.algorithms.OpenCLAlgorithmBase
checkError, getInt, getInts, getLong, getLongs, getMaxMemoryUsed, getString, getString, initCL, isOCLAvailable, readKernelFile, roundUp, saveImage, saveImage, setBlue, setGreen, setRed, setTime
-
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
-
INVERSE
public static final int INVERSE
Inverse FFT- See Also:
- Constant Field Values
-
FORWARD
public static final int FORWARD
Forward FFT- See Also:
- Constant Field Values
-
SLICE_XY
public static final int SLICE_XY
Constants for xy plane, yz plane and zx plane.- See Also:
- Constant Field Values
-
SLICE_YZ
public static final int SLICE_YZ
- See Also:
- Constant Field Values
-
SLICE_ZX
public static final int SLICE_ZX
- See Also:
- Constant Field Values
-
imagData
private float[] imagData
Imaginary data.
-
image25D
private boolean image25D
If true process each slice one at a time in 3D image.
-
logMagDisplay
private final boolean logMagDisplay
If true display log10 of 1 + magnitude.
-
realData
private float[] realData
Real data.
-
transformDir
private final int transformDir
Transform direction.
-
unequalDim
private boolean unequalDim
If true allow unequal FFT dimensions.
-
complexInverse
private boolean complexInverse
-
startTime
long startTime
-
-
Constructor Detail
-
OpenCLAlgorithmFFT
public OpenCLAlgorithmFFT(ModelImage srcImg, int transformDir, boolean logMagDisplay, boolean unequalDim, boolean image25D, boolean complexInverse)
-
OpenCLAlgorithmFFT
public OpenCLAlgorithmFFT(ModelImage destImg, ModelImage srcImg, int transformDir, boolean logMagDisplay, boolean unequalDim, boolean image25D, boolean complexInverse)
-
-
Method Detail
-
finalize
public void finalize()
Prepare this class for destruction.- Overrides:
finalize
in classOpenCLAlgorithmBase
-
getImaginaryData
public float[] getImaginaryData()
Returns reference to imaginary data array.- Returns:
- the reference the the imaginary data array
-
getRealData
public float[] getRealData()
Returns reference to real data array.- Returns:
- the reference the the real data array
-
runAlgorithm
public void runAlgorithm()
Starts the program.- Specified by:
runAlgorithm
in classAlgorithmBase
-
saveImage
public void saveImage(float[] data)
-
saveImage
public void saveImage(float[] data, int slice)
-
saveImageFFT
public void saveImageFFT(float[] data)
-
saveImageFFT
public void saveImageFFT(float[] data, int slice)
-
calcFFT
private void calcFFT(float[] input, boolean isComplex)
-
calcFFT25D
private void calcFFT25D(float[][] input, boolean isComplex)
-
-