Class Filter


public class Filter
extends java.lang.Object

Wavelet Transformation Demo: Definition and use of wavelet filters.
For orthogonal filters, only the forward low pass (FLP) is specified. From this, all other filters are calculated.

Field Summary

static int
BOTH
Low pass and/or high pass requested flag
static int
BOTH_BORDER
Low pass and/or high pass requested flag
static String
DB10
Daubechies 10 filter
private static double[]
DB10_FLP
static String
DB15
Daubechies 15 filter
private static double[]
DB15_FLP
static String
DB2
Daubechies 2 filter
static String
DB20
Daubechies 20 filter
private static double[]
DB20_FLP
private static double[]
DB2_FLP
static String
DB3
Daubechies 3 filter
private static double[]
DB3_FLP
static String
DB4
Daubechies 4 filter
private static double[]
DB4_FLP
static String
DB5
Daubechies 5 filter
private static double[]
DB5_FLP
static HashMap
FILTERS
Defined filters (name, value pairs)
static String[]
FILTERS_COMBO
static String
HAAR
Haar filter
private static double[]
HAAR_FLP
static int
HIGH_PASS
Low pass and/or high pass requested flag
static int
LOW_PASS
Low pass and/or high pass requested flag
private int
filterLength
private String
filterName
double[]
forwardHighPass
Single filter bank filter
double[]
forwardLowPass
Single filter bank filter
double[]
inverseHighPass
Single filter bank filter
double[]
inverseLowPass
Single filter bank filter

Constructor Summary

Filter(String name)
Construct a new Filter object with the specified filter bank

Method Summary

private double[]
alternatingFlip(double[] in)
private void
createFilters(double[] fwdLow)
Create all needed filters from the given forward low pass filter
int
getBoundarySize()
Returns the total border extension length (for both borders), which depends on the selected filter.
double[]
getForwardHighPass()
double[]
getForwardLowPass()
Returns the current low pass filter for analysis
double[]
getInverseHighPass()
double[]
getInverseLowPass()
int
getSize()
Returns the (array-)length of the current filter.
private double[]
orderFlip(double[] in)
String
toString()

Field Details

BOTH

public static final int BOTH
Low pass and/or high pass requested flag
Field Value:
3

BOTH_BORDER

public static final int BOTH_BORDER
Low pass and/or high pass requested flag
Field Value:
4

DB10

public static final String DB10
Daubechies 10 filter

DB10_FLP

private static final double[] DB10_FLP

DB15

public static final String DB15
Daubechies 15 filter

DB15_FLP

private static final double[] DB15_FLP

DB2

public static final String DB2
Daubechies 2 filter

DB20

public static final String DB20
Daubechies 20 filter

DB20_FLP

private static final double[] DB20_FLP

DB2_FLP

private static final double[] DB2_FLP

DB3

public static final String DB3
Daubechies 3 filter

DB3_FLP

private static final double[] DB3_FLP

DB4

public static final String DB4
Daubechies 4 filter

DB4_FLP

private static final double[] DB4_FLP

DB5

public static final String DB5
Daubechies 5 filter

DB5_FLP

private static final double[] DB5_FLP

FILTERS

public static final HashMap FILTERS
Defined filters (name, value pairs)

FILTERS_COMBO

public static final String[] FILTERS_COMBO

HAAR

public static final String HAAR
Haar filter

HAAR_FLP

private static final double[] HAAR_FLP

HIGH_PASS

public static final int HIGH_PASS
Low pass and/or high pass requested flag
Field Value:
2

LOW_PASS

public static final int LOW_PASS
Low pass and/or high pass requested flag
Field Value:
1

filterLength

private int filterLength

filterName

private String filterName

forwardHighPass

public double[] forwardHighPass
Single filter bank filter

forwardLowPass

public double[] forwardLowPass
Single filter bank filter

inverseHighPass

public double[] inverseHighPass
Single filter bank filter

inverseLowPass

public double[] inverseLowPass
Single filter bank filter

Constructor Details

Filter

public Filter(String name)
            throws Message
Construct a new Filter object with the specified filter bank
Parameters:

Method Details

alternatingFlip

private double[] alternatingFlip(double[] in)

createFilters

private void createFilters(double[] fwdLow)
Create all needed filters from the given forward low pass filter
Parameters:
fwdLow - The low pass filter

getBoundarySize

public int getBoundarySize()
Returns the total border extension length (for both borders), which depends on the selected filter.
Returns:
total border extension length

getForwardHighPass

public double[] getForwardHighPass()

getForwardLowPass

public double[] getForwardLowPass()
Returns the current low pass filter for analysis

getInverseHighPass

public double[] getInverseHighPass()

getInverseLowPass

public double[] getInverseLowPass()

getSize

public int getSize()
Returns the (array-)length of the current filter.
Returns:
current filter length

orderFlip

private double[] orderFlip(double[] in)

toString

public String toString()