GiciTransform
Class ForwardWaveletTransform

java.lang.Object
  extended by GiciTransform.ForwardWaveletTransform

public class ForwardWaveletTransform
extends java.lang.Object

This class receives an image and performs applies a discrete wavelet transform.
Usage example:
  construct
  setParameters
  run

Version:
1.0
Author:
Group on Interactive Coding of Images (GICI)

Field Summary
(package private)  float[][][] imageSamples
          Definition in Coder
(package private)  boolean parametersSet
          To know if parameters are set.
(package private)  int[] WTLevels
          DWT levels to apply for each component.
(package private)  int[] WTOrder
          To know the order of the transform in the spatial dimentions for each component
(package private)  int[] WTTypes
          Discrete wavelet transform to be applied for each component.
(package private)  int xSize
          Definition in Coder
(package private)  int ySize
          Definition in Coder
(package private)  int zSize
          Definition in Coder
 
Constructor Summary
ForwardWaveletTransform(float[][][] imageSamples)
          Constructor that receives the original image samples.
 
Method Summary
private  float[] evenFiltering(float[] src, int z)
          This function applies the DWT filter to a source with even length.
private  float[] filtering(float[] src, int z)
          This function selects the way to apply the filter selected depending on the size of the source
private  float[] oddFiltering(float[] src, int z)
          This function applies the DWT filter to a source with odd length.
 float[][][] run()
          Performs the discrete wavelete transform and returns the result image.
 void setParameters(int[] WTTypes, int[] WTLevels)
          Set the parameters used to apply the discrete wavelet transform, the order is set and cannot be selected..
 void setParameters(int[] WTTypes, int[] WTLevels, int[] WTOrder)
          Set the parameters used to apply the discrete wavelet transform when the order of the spatial dimentions can be chosen.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

imageSamples

float[][][] imageSamples
Definition in Coder


zSize

int zSize
Definition in Coder


ySize

int ySize
Definition in Coder


xSize

int xSize
Definition in Coder


WTTypes

int[] WTTypes
Discrete wavelet transform to be applied for each component.

Valid values are:


WTLevels

int[] WTLevels
DWT levels to apply for each component.

Negative values not allowed.


WTOrder

int[] WTOrder
To know the order of the transform in the spatial dimentions for each component

Valid values are:


parametersSet

boolean parametersSet
To know if parameters are set.

True indicates that they are set otherwise false.

Constructor Detail

ForwardWaveletTransform

public ForwardWaveletTransform(float[][][] imageSamples)
Constructor that receives the original image samples.

Parameters:
imageSamples - definition in Coder
Method Detail

setParameters

public void setParameters(int[] WTTypes,
                          int[] WTLevels)
Set the parameters used to apply the discrete wavelet transform, the order is set and cannot be selected..

Parameters:
WTTypes - definition in WTTypes
WTLevels - definition in WTLevels

setParameters

public void setParameters(int[] WTTypes,
                          int[] WTLevels,
                          int[] WTOrder)
Set the parameters used to apply the discrete wavelet transform when the order of the spatial dimentions can be chosen.

Parameters:
WTTypes - definition in WTTypes
WTLevels - definition in WTLevels
WTOrder - definition in WTOrder

run

public float[][][] run()
                throws ErrorException
Performs the discrete wavelete transform and returns the result image.

Returns:
the DWT image
Throws:
ErrorException - when parameters are not set or wavelet type is unrecognized

filtering

private float[] filtering(float[] src,
                          int z)
                   throws ErrorException
This function selects the way to apply the filter selected depending on the size of the source

Parameters:
src - a float array of the image samples
z - the component determines the filter to apply
Returns:
a float array that contains the tranformed sources
Throws:
ErrorException - when wavelet type is unrecognized

evenFiltering

private float[] evenFiltering(float[] src,
                              int z)
                       throws ErrorException
This function applies the DWT filter to a source with even length.

Parameters:
src - a float array of the image samples
z - the component determines the filter to apply
Returns:
a float array that contains the tranformed sources
Throws:
ErrorException - when wavelet type is unrecognized or size is not proper

oddFiltering

private float[] oddFiltering(float[] src,
                             int z)
                      throws ErrorException
This function applies the DWT filter to a source with odd length.

Parameters:
src - a float array of the image samples
z - the component determines the filter to apply
Returns:
a float array that contains the tranformed sources
Throws:
ErrorException - when wavelet type is unrecognized or size is not proper


TER - Copyright (C) 2006
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Group on Interactive Coding of Images (GICI) - UAB (Spain)