public class FHT extends FloatProcessor
Modifier and Type | Field and Description |
---|---|
static int |
FLATTOP |
static int |
HAMMING |
static int |
HANN |
static int |
NO_WINDOW |
int |
originalBitDepth
Used by the FFT class.
|
java.awt.image.ColorModel |
originalColorModel
Used by the FFT class.
|
int |
originalHeight
Used by the FFT class.
|
int |
originalWidth
Used by the FFT class.
|
boolean |
quadrantSwapNeeded
Used by the FFT class.
|
ColorProcessor |
rgb
Used by the FFT class.
|
pixels8
antialiasedText, baseCM, BICUBIC, BILINEAR, BLACK, BLACK_AND_WHITE_LUT, BLUR_MORE, bLUT1, bLUT2, boldFont, CENTER_JUSTIFY, clipXMax, clipXMin, clipYMax, clipYMin, cm, cm2, CONVOLVE, cTable, cx, cy, defaultColorModel, drawingColor, FIND_EDGES, fmImage, font, fontMetrics, gLUT1, gLUT2, height, histogramMax, histogramMin, histogramSize, image, img, interpolate, interpolationMethod, inversionTested, invertedLut, ISODATA, ISODATA2, justification, LEFT_JUSTIFY, lineWidth, lutAnimation, lutUpdateMode, MAX, maxThreshold, MEDIAN_FILTER, MIN, minMaxSet, minThreshold, NEAREST_NEIGHBOR, newPixels, NO_LUT_UPDATE, NO_THRESHOLD, NONE, OVER_UNDER_LUT, raster, RED_LUT, RIGHT_JUSTIFY, rLUT1, rLUT2, roiHeight, roiWidth, roiX, roiY, sampleModel, snapshotHeight, snapshotWidth, source, width, xMax, xMin, yMax, yMin
Constructor and Description |
---|
FHT() |
FHT(ImageProcessor ip)
Constructs a FHT object from an ImageProcessor.
|
FHT(ImageProcessor ip,
boolean isFrequencyDomain) |
Modifier and Type | Method and Description |
---|---|
FHT |
conjugateMultiply(FHT fht)
Returns the image resulting from the point by point Hartley conjugate
multiplication of this image and the specified image.
|
void |
dfht3(float[] x,
int base,
boolean inverse,
int maxN)
Performs an optimized 1D FHT of an array or part of an array.
|
FHT |
divide(FHT fht)
Returns the image resulting from the point by point Hartley division
of this image by the specified image.
|
float[] |
fourier1D(float[] data,
int windowType)
Calculates the Fourier amplitudes of an array, based on a 1D Fast Hartley Transform.
|
ImageStack |
getComplexTransform()
Converts this FHT to a complex Fourier transform and returns it as a two slice stack.
|
FHT |
getCopy()
Returns a clone of this FHT.
|
ImageProcessor |
getPowerSpectrum()
Returns an 8-bit power spectrum, log-scaled to 1-254.
|
void |
inverseTransform()
Performs an inverse transform, converting this image into the space domain.
|
void |
inverseTransform1D(float[] fht)
Performs an inverse 1D Fast Hartley Transform (FHT) of an array
|
static boolean |
isPowerOf2(int n) |
FHT |
multiply(FHT fht)
Returns the image resulting from the point by point Hartley multiplication
of this image and the specified image.
|
boolean |
powerOf2Size()
Returns true of this FHT contains a square image with a width that is a power of two.
|
void |
rc2DFHT(float[] x,
boolean inverse,
int maxN)
Performs a 2D FHT (Fast Hartley Transform).
|
void |
setShowProgress(boolean showProgress)
Enables/disables display of the progress bar during transforms.
|
void |
swapQuadrants()
Swap quadrants 1 and 3 and 2 and 4 of the image
contained in this FHT.
|
void |
swapQuadrants(ImageProcessor ip)
Swap quadrants 1 and 3 and 2 and 4 of the specified ImageProcessor
so the power spectrum origin is at the center of the image.
|
java.lang.String |
toString()
Returns a string containing information about this FHT.
|
void |
transform()
Performs a forward transform, converting this image into the frequency domain.
|
void |
transform1D(float[] x)
Performs an optimized 1D Fast Hartley Transform (FHT) of an array.
|
abs, add, add, and, applyTable, autoThreshold, convolve, convolve3x3, copyBits, create8BitImage, createImage, createProcessor, crop, dilate, drawPixel, duplicate, erode, exp, fill, fill, filter, findMinAndMax, flipVertical, gamma, get, get, getBackgroundValue, getBicubicInterpolatedPixel, getBitDepth, getBufferedImage, getf, getf, getHistogram, getInterpolatedPixel, getMax, getMin, getPixel, getPixel, getPixelInterpolated, getPixels, getPixelsCopy, getPixelValue, getSnapshotPixels, invert, log, max, maxValue, medianFilter, min, minValue, multiply, noise, or, putPixel, putPixel, putPixelValue, reset, reset, resetMinAndMax, resize, rotate, scale, set, set, set, setBackgroundValue, setColor, setf, setf, setMinAndMax, setPixels, setPixels, setSnapshotPixels, setThreshold, setValue, snapshot, sqr, sqrt, swapPixelArrays, threshold, toFloat, xor
applyMacro, bin, blurGaussian, clone, convertToByte, convertToByteProcessor, convertToByteProcessor, convertToColorProcessor, convertToFloat, convertToFloatProcessor, convertToRGB, convertToShort, convertToShortProcessor, convertToShortProcessor, cubic, draw, drawDot, drawDot2, drawLine, drawLine4, drawOval, drawOverlay, drawPolygon, drawRect, drawRoi, drawString, drawString, drawString, fill, fillOutside, fillOval, fillPolygon, findEdges, flipHorizontal, getAutoThreshold, getAutoThreshold, getBestIndex, getCalibrationTable, getColorModel, getColumn, getCurrentColorModel, getDefaultColorModel, getFloatArray, getFont, getFontMetrics, getHeight, getHistogramMax, getHistogramMin, getHistogramSize, getIndexSampleModel, getIntArray, getInterpolate, getInterpolatedValue, getInterpolationMethod, getInterpolationMethods, getLine, getLineWidth, getLut, getLutUpdateMode, getMask, getMaskArray, getMaxThreshold, getMinThreshold, getNChannels, getNeighborhood, getOverlay, getPixelCount, getProgressIncrement, getRoi, getRow, getRow, getSliceNumber, getStatistics, getStringWidth, getWidth, hideProgress, insert, invertLut, isBinary, isColorLut, isDefaultLut, isGrayscale, isInvertedLut, isKillable, isPseudoColorLut, lineTo, ln, makeDefaultColorModel, maskSizeError, moveTo, putColumn, putRow, putRow, resetBinaryThreshold, resetRoi, resetThreshold, resize, resize, resizeLinearly, rotateLeft, rotateRight, setAntialiasedText, setAutoThreshold, setAutoThreshold, setAutoThreshold, setAutoThreshold, setAutoThreshold, setBinaryThreshold, setCalibrationTable, setClipRect, setColor, setColor, setColorModel, setFloatArray, setFont, setHistogramRange, setHistogramSize, setIntArray, setInterpolate, setInterpolationMethod, setJustification, setLineWidth, setLut, setLutAnimation, setMask, setOverColor, setOverlay, setProgressBar, setRoi, setRoi, setRoi, setRoi, setSliceNumber, setSnapshotCopyMode, setUnderColor, setUseBicubic, sharpen, showProgress, smooth, subtract, translate, translate, updateComposite
public boolean quadrantSwapNeeded
public ColorProcessor rgb
public int originalWidth
public int originalHeight
public int originalBitDepth
public java.awt.image.ColorModel originalColorModel
public static int NO_WINDOW
public static int HAMMING
public static int HANN
public static int FLATTOP
public FHT(ImageProcessor ip)
public FHT(ImageProcessor ip, boolean isFrequencyDomain)
public FHT()
public boolean powerOf2Size()
public void transform()
public void inverseTransform()
public float[] fourier1D(float[] data, int windowType)
data
- Input array; its size need not be a power of 2. The input is not modified..windowType
- may be NO_WINDOW, then the input array is used as it is.
Otherwise, it is multiplied by a window function, which can be HAMMING, HANN or
FLATTOP.public void transform1D(float[] x)
public void inverseTransform1D(float[] fht)
public void rc2DFHT(float[] x, boolean inverse, int maxN)
public void dfht3(float[] x, int base, boolean inverse, int maxN)
x
- Input array; will be overwritten by the output in the range given by base and maxN.base
- First index from where data of the input array should be read.inverse
- True for inverse transform.maxN
- Length of data that should be transformed; this must be always
the same for a given FHT object.
Note that all amplitudes in the output 'x' are multiplied by maxN.public ImageProcessor getPowerSpectrum()
public ImageStack getComplexTransform()
public void swapQuadrants(ImageProcessor ip)
2 1 3 4
public void swapQuadrants()
public FHT multiply(FHT fht)
public FHT conjugateMultiply(FHT fht)
public FHT divide(FHT fht)
public void setShowProgress(boolean showProgress)
public FHT getCopy()
public static boolean isPowerOf2(int n)
public java.lang.String toString()
toString
in class ImageProcessor