fractsplinewavelets
Class Operations

java.lang.Object
  |
  +--fractsplinewavelets.Operations

public final class Operations
extends java.lang.Object


Plugin of ImageJ:
Fractional Spline Wavelet

Authors:
Gil Gaillard, Daniel Sage daniel.sage@epfl.ch
Swiss Federal Institute of Technology Lausanne, Biomedical Imaging Group, CH-1015 Lausanne, Switzerland, http://bigwww.epfl.ch

Version:
24 January 2002

References:
[1] M. Unser and T. Blu, "Fractional splines and wavelets," SIAM Review, Vol. 42, No. 1, pp. 43-67, January 2000.
[2] M. Unser and T. Blu, "Construction of fractional spline wavelet bases," Proc. SPIE, Wavelet Applications in Signal and Image Processing VII, Denver, CO, USA, 19-23 July, 1999, vol. 3813, pp. 422-431.
[3] T. Blu and M. Unser, "The fractional spline wavelet transform: definition and implementation," Proc. IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP'2000), Istanbul, Turkey, 5-9 June 2000, vol. I, pp. 512-515.

Copyright
Copyright © 2002, Swiss Federal Institute of Technology, Lausanne, Switzerland, (EPFL)


Purpose of the class:
This class performs the wavelet transform of an image and its inverse.


Constructor Summary
Operations()
           
 
Method Summary
static void add(double[] in1, double[] in2, double[] out, int size)
          Perform the addition of two arrays.
static void doInverse(fractsplinewavelets.ImageAccess image, int iteration, int filter, double degree, double shift)
          Perform the inverse wavelet transform (synthesis) using Fourier domain for filtering.
static void doTransform(fractsplinewavelets.ImageAccess image, int iteration, int filter, double degree, double shift)
          Perform the wavelet transform (analysis) using Fourier domain for filtering, this allows to use FIR and IIR filters.
static void downsampling(double[] output, double[] FilterH, double[] FilterG, int offset)
          Perform the downsampling in Fourier domain (real or imaginary parts).
static void multiply(double[] ReIn, double[] ImIn, double[] ReF, double[] ImF, double[] ReOut, double[] ImOut, int size, int iteration)
          Perform the filtering in Fourier domain.
static void multiplyAndConjugate(double[] ReIn, double[] ImIn, double[] ReF, double[] ImF, double[] ReOut, double[] ImOut, int size, int iteration)
          Perform the filtering in Fourier domain and conjugate.
static void upsampling(double[] in, double[] inH, double[] inG, int offset)
          Perform the upsampling in Fourier domain (real or imaginary parts).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Operations

public Operations()
Method Detail

doTransform

public static final void doTransform(fractsplinewavelets.ImageAccess image,
                                     int iteration,
                                     int filter,
                                     double degree,
                                     double shift)
Perform the wavelet transform (analysis) using Fourier domain for filtering, this allows to use FIR and IIR filters. The separable implementation uses one FFT for two rows (columns) to increase the time perfomances. For this, real images only are accepted. Algorithm:
1. Take one row and put it in an array: a
2. Take the next row and put it in an array: b
3. (c+i*d) = FFT of a+i*b (Two FFTs for the price of one, c and d are arrays which contain the FFT result)
4. Filtering (c+i*d) in Fourier domain with the highpass filter
5. Filtering (c+i*d) in Fourier domain with the lowpass filter
6. Downsampling in Fourier domain of the result of 4
7. Downsampling in Fourier domain of the result of 5
8. IFFT of the result of 6, the real part of the result gives the lowpass part of the first transformed row(a), the imaginary part gives the lowpass part of the second transformed row(b)
9. IFFT of the result of 7,the real part of the result gives the highpass part of the first transformed row(a), the imaginary part gives the highpass part of the second transformed row(b)
10.Put the two rows back in the input image
The same processing is applied on all rows and all columns for the first iteration. For further iterations, the same algorithm is applied on the High-High part of the image.
Parameters:
image - real image to transform
iteration - desired number of iterations
filter - kind of filter the fractional spline filters
degree - degree of the fractional spline filters
shift - shift of the fractional spline filters

doInverse

public static final void doInverse(fractsplinewavelets.ImageAccess image,
                                   int iteration,
                                   int filter,
                                   double degree,
                                   double shift)
Perform the inverse wavelet transform (synthesis) using Fourier domain for filtering. This algorithm can use FIR and IIR filters. The separable implementation uses one IFFT for two rows (columns) to increase the time perfomances. Algorithm: The algorithm is quite similar to this of the analysis with inversions of some operations.
Parameters:
image - real image to transform
iteration - desired number of iterations
filter - kind of filter the fractional spline filters
degree - degree of the fractional spline filters
shift - shift of the fractional spline filters

multiply

public static final void multiply(double[] ReIn,
                                  double[] ImIn,
                                  double[] ReF,
                                  double[] ImF,
                                  double[] ReOut,
                                  double[] ImOut,
                                  int size,
                                  int iteration)
Perform the filtering in Fourier domain.
Parameters:
ReIn - input signal 1D (real part)
ImIn - input signal 1D (imaginary part)
ReF - filter (real part)
ImF - filter (imaginary part)
ReOut - output signal 1D (real part)
ImOut - output signal 1D (imaginary part)
size - size of the vectors
iteration - value of the iteration in the loop

multiplyAndConjugate

public static final void multiplyAndConjugate(double[] ReIn,
                                              double[] ImIn,
                                              double[] ReF,
                                              double[] ImF,
                                              double[] ReOut,
                                              double[] ImOut,
                                              int size,
                                              int iteration)
Perform the filtering in Fourier domain and conjugate.
Parameters:
ReIn - input signal 1D (real part)
ImIn - input signal 1D (imaginary part)
ReF - filter (real part)
ImF - filter (imaginary part)
ReOut - output signal 1D (real part)
ImOut - output signal 1D (imaginary part)
size - size of the vectors
iteration - value of the iteration in the loop

downsampling

public static final void downsampling(double[] output,
                                      double[] FilterH,
                                      double[] FilterG,
                                      int offset)
Perform the downsampling in Fourier domain (real or imaginary parts).
Parameters:
output - result of downsampling
FilterH - response of the lowpass H filter
FilterG - response of the highpass G filter
offset - halfsize of the vectors

upsampling

public static final void upsampling(double[] in,
                                    double[] inH,
                                    double[] inG,
                                    int offset)
Perform the upsampling in Fourier domain (real or imaginary parts).
Parameters:
in - input of upsampling
inH - input of the lowpass H filter
inG - input of the lowpass G filter
offset - halfsize of the vectors

add

public static final void add(double[] in1,
                             double[] in2,
                             double[] out,
                             int size)
Perform the addition of two arrays.
Parameters:
in1 - first array
in2 - second array
out - output array should be allocated before the call