edu.stanford.rsl.konrad.utils
Class FHTUtil

java.lang.Object
  extended by edu.stanford.rsl.konrad.utils.FHTUtil

public abstract class FHTUtil
extends java.lang.Object

This class is currently unused as all transforms in OSCAR are now based on JTransforms However some of these methods may come in handy when dealing with the ImageJ implementation of the FHT. Many of the methods are very similar to the ones in ij/plugin/FFT.java. If code was partially taken from there this is declared in the comment before the method.

Author:
Andreas Maier

Constructor Summary
FHTUtil()
           
 
Method Summary
static ij.process.FHT complexToFHT(ij.process.FloatProcessor real, ij.process.FloatProcessor imag)
          Converts real and imaginary parts of an FFT to Hartley domain.
static ij.process.FloatProcessor imaginaryFromFHT(ij.process.FHT fht)
          Computes the imaginary values of an FFT given the values of an FHT.
static ij.process.ImageProcessor padImageProcessor(ij.process.ImageProcessor ip)
          Image is padded with 0.
static ij.process.ImageProcessor padImageProcessor(ij.process.ImageProcessor ip, int maxN)
          Image is padded with 0.
static ij.process.ImageProcessor powerFromFHT(ij.process.FHT fht)
          Computes the power spectrum of an FFT given the values of an FHT.
static ij.process.FloatProcessor realFromFHT(ij.process.FHT fht)
          Computes the real values of an FFT given the values of an FHT.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FHTUtil

public FHTUtil()
Method Detail

padImageProcessor

public static ij.process.ImageProcessor padImageProcessor(ij.process.ImageProcessor ip,
                                                          int maxN)
Image is padded with 0. Code was partially taken from ij.plugin.FFT.java::pad(). Thanks for the inspiration!

Parameters:
ip - the ImageProcessor to be padded.
Returns:
the padded ImageProcessor.

padImageProcessor

public static ij.process.ImageProcessor padImageProcessor(ij.process.ImageProcessor ip)
Image is padded with 0. Size of padding is automatically determined. This means a slight increase in computation time. Code was partially taken from ij.plugin.FFT.java::pad(). Thanks for the inspiration!

Parameters:
ip - the ImageProcessor to be padded.
Returns:
the padded ImageProcessor.

complexToFHT

public static ij.process.FHT complexToFHT(ij.process.FloatProcessor real,
                                          ij.process.FloatProcessor imag)
Converts real and imaginary parts of an FFT to Hartley domain.

Parameters:
real - FloatProcessor with the real values
imag - FloatProcessor with the imaginary values
Returns:
the values in Hartley Domain

imaginaryFromFHT

public static ij.process.FloatProcessor imaginaryFromFHT(ij.process.FHT fht)
Computes the imaginary values of an FFT given the values of an FHT.

Parameters:
fht - the FHT as input
Returns:
the imaginary values as FloatProcessor. Use .log() if you want an improved visualization of the result.

realFromFHT

public static ij.process.FloatProcessor realFromFHT(ij.process.FHT fht)
Computes the real values of an FFT given the values of an FHT.

Parameters:
fht - the FHT as input
Returns:
the real values as FloatProcessor. Use .log() if you want an improved visualization of the result.

powerFromFHT

public static ij.process.ImageProcessor powerFromFHT(ij.process.FHT fht)
Computes the power spectrum of an FFT given the values of an FHT.

Parameters:
fht - the FHT as input
Returns:
the power spectrum as FloatProcessor. Use .log() if you want an improved visualization of the result.