mpi.fruitfly.registration
Class ImageFilter

java.lang.Object
  extended by mpi.fruitfly.registration.ImageFilter

public class ImageFilter
extends java.lang.Object


Constructor Summary
ImageFilter()
           
 
Method Summary
static FloatArray3D computeBinaryFilter3(FloatArray3D input, float threshold)
           
static FloatArray3D computeBinaryPlusSobelFilter3(FloatArray3D input, float threshold)
           
static FloatArray2D computeGaussian(FloatArray2D input, float sigma)
           
static FloatArray3D computeGaussian(FloatArray3D input, float sigma)
           
static FloatArray3D computeGaussianFast(FloatArray3D input, float sigma)
           
static FloatArray2D computeGaussianFastMirror(FloatArray2D input, float sigma)
           
static FloatArray3D computeGaussianFastMirror(FloatArray3D input, float sigma)
          This class does the gaussian filtering of an image.
static FloatArray2D computeIncreasingGaussianX(FloatArray2D input, float stDevStart, float stDevEnd)
           
static FloatArray2D computeLaPlaceFilter3(FloatArray2D input)
           
static FloatArray2D computeLaPlaceFilter5(FloatArray2D input)
           
static FloatArray3D computeLaPlaceFilter5(FloatArray3D input)
           
static FloatArray3D computeSobelFilter(FloatArray3D input)
           
static FloatArray2D convolveSeparable(FloatArray2D input, float[] h, float[] v)
          convolve an image with a horizontal and a vertical kernel simple straightforward, not optimized---replace this with a trusted better version soon
static FloatArray2D create_gaussian_kernel_2D_offset(float sigma, float offset_x, float offset_y, boolean normalize)
           
static float[] createGaussianKernel1D(float sigma, boolean normalize)
          This class creates a gaussian kernel
static FloatArray2D createGaussianKernel2D(float sigma, boolean normalize)
           
static FloatArray3D createGaussianKernel3D(float sigma, boolean normalize)
           
static FloatArray2D[] createGradients(FloatArray2D array)
           
static FloatArray2D distortSamplingX(FloatArray2D input)
           
static FloatArray2D distortSamplingY(FloatArray2D input)
           
static void enhance(FloatArray2D src, float scale)
          in place enhance all values of a FloatArray to fill the given range
static void exponentialWindow(FloatArray2D img)
           
static void exponentialWindow(FloatArray3D img)
           
static void filterKaiserBessel(FloatArray2D img, boolean inverse)
          Does Kaiser-Bessel-Windowing to prevent the fourier spectra from getting infinite numbers, the border will be faded to black.
static void normalize(FloatArray img)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageFilter

public ImageFilter()
Method Detail

filterKaiserBessel

public static void filterKaiserBessel(FloatArray2D img,
                                      boolean inverse)
Does Kaiser-Bessel-Windowing to prevent the fourier spectra from getting infinite numbers, the border will be faded to black.

Parameters:
FloatArray2D - image Input image stored in row-major order
inverse - If true, fading to black in the middle

exponentialWindow

public static void exponentialWindow(FloatArray2D img)

exponentialWindow

public static void exponentialWindow(FloatArray3D img)

createGaussianKernel1D

public static float[] createGaussianKernel1D(float sigma,
                                             boolean normalize)
This class creates a gaussian kernel

Parameters:
sigma - Standard Derivation of the gaussian function
normalize - Normalize integral of gaussian function to 1 or not...
Returns:
float[] The gaussian kernel

normalize

public static void normalize(FloatArray img)

createGaussianKernel2D

public static FloatArray2D createGaussianKernel2D(float sigma,
                                                  boolean normalize)

create_gaussian_kernel_2D_offset

public static FloatArray2D create_gaussian_kernel_2D_offset(float sigma,
                                                            float offset_x,
                                                            float offset_y,
                                                            boolean normalize)

createGaussianKernel3D

public static FloatArray3D createGaussianKernel3D(float sigma,
                                                  boolean normalize)

computeIncreasingGaussianX

public static FloatArray2D computeIncreasingGaussianX(FloatArray2D input,
                                                      float stDevStart,
                                                      float stDevEnd)

computeGaussian

public static FloatArray2D computeGaussian(FloatArray2D input,
                                           float sigma)

computeGaussian

public static FloatArray3D computeGaussian(FloatArray3D input,
                                           float sigma)

computeGaussianFast

public static FloatArray3D computeGaussianFast(FloatArray3D input,
                                               float sigma)

computeGaussianFastMirror

public static FloatArray2D computeGaussianFastMirror(FloatArray2D input,
                                                     float sigma)

computeGaussianFastMirror

public static FloatArray3D computeGaussianFastMirror(FloatArray3D input,
                                                     float sigma)
This class does the gaussian filtering of an image. On the edges of the image it does mirror the pixels. It also uses the seperability of the gaussian convolution.

Parameters:
input - FloatProcessor which should be folded (will not be touched)
sigma - Standard Derivation of the gaussian function
Returns:
FloatProcessor The folded image

distortSamplingX

public static FloatArray2D distortSamplingX(FloatArray2D input)

distortSamplingY

public static FloatArray2D distortSamplingY(FloatArray2D input)

computeSobelFilter

public static FloatArray3D computeSobelFilter(FloatArray3D input)

computeBinaryFilter3

public static FloatArray3D computeBinaryFilter3(FloatArray3D input,
                                                float threshold)

computeBinaryPlusSobelFilter3

public static FloatArray3D computeBinaryPlusSobelFilter3(FloatArray3D input,
                                                         float threshold)

computeLaPlaceFilter3

public static FloatArray2D computeLaPlaceFilter3(FloatArray2D input)

computeLaPlaceFilter5

public static FloatArray2D computeLaPlaceFilter5(FloatArray2D input)

computeLaPlaceFilter5

public static FloatArray3D computeLaPlaceFilter5(FloatArray3D input)

createGradients

public static FloatArray2D[] createGradients(FloatArray2D array)

enhance

public static final void enhance(FloatArray2D src,
                                 float scale)
in place enhance all values of a FloatArray to fill the given range


convolveSeparable

public static FloatArray2D convolveSeparable(FloatArray2D input,
                                             float[] h,
                                             float[] v)
convolve an image with a horizontal and a vertical kernel simple straightforward, not optimized---replace this with a trusted better version soon

Parameters:
input - the input image
h - horizontal kernel
v - vertical kernel
Returns:
convolved image