mpi.cbg.fly
Class Filter

java.lang.Object
  extended by mpi.cbg.fly.Filter

public class Filter
extends java.lang.Object


Constructor Summary
Filter()
           
 
Method Summary
static FloatArray2D computeGaussian(FloatArray2D input, float sigma)
           
static FloatArray2D computeGaussianFastMirror(FloatArray2D input, float sigma)
           
static FloatArray2D computeIncreasingGaussianX(FloatArray2D input, float stDevStart, float stDevEnd)
           
static FloatArray2D computeLaPlaceFilter3(FloatArray2D input)
           
static FloatArray2D computeLaPlaceFilter5(FloatArray2D 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)
          Create a 1d-Gaussian kernel of appropriate size
static FloatArray2D createGaussianKernel2D(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 int flipInRange(int a, int mod)
          return a integer that is flipped in the range [0 ... mod - 1]
static int ldu(int v)
          fast floor ld of unsigned v
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Filter

public Filter()
Method Detail

flipInRange

public static final int flipInRange(int a,
                                    int mod)
return a integer that is flipped in the range [0 ... mod - 1]

Parameters:
a - the value to be flipped
range - the size of the range
Returns:
a flipped in range like a ping pong ball

ldu

public static final int ldu(int v)
fast floor ld of unsigned v


createGaussianKernel1D

public static float[] createGaussianKernel1D(float sigma,
                                             boolean normalize)
Create a 1d-Gaussian kernel of appropriate size

Parameters:
sigma - Standard deviation of the Gaussian kernel
normalize - Normalize integral of the Gaussian kernel to 1 or not...
Returns:
float[] Gaussian kernel of appropriate size

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)

computeIncreasingGaussianX

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

computeGaussian

public static FloatArray2D computeGaussian(FloatArray2D input,
                                           float sigma)

computeGaussianFastMirror

public static FloatArray2D computeGaussianFastMirror(FloatArray2D input,
                                                     float sigma)

distortSamplingX

public static FloatArray2D distortSamplingX(FloatArray2D input)

distortSamplingY

public static FloatArray2D distortSamplingY(FloatArray2D input)

computeLaPlaceFilter3

public static FloatArray2D computeLaPlaceFilter3(FloatArray2D input)

computeLaPlaceFilter5

public static FloatArray2D computeLaPlaceFilter5(FloatArray2D 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