GiciTransform
Class InverseWaveletTransform

java.lang.Object
  extended by GiciTransform.InverseWaveletTransform

public class InverseWaveletTransform
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
          Original image samples (index meaning [z][y][x]).
(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
          Definition in ForwardWaveletTransform.WTTypes
(package private)  int xSize
          Image width.
(package private)  int ySize
          Image height.
(package private)  int zSize
          Number of image components.
 
Constructor Summary
InverseWaveletTransform(float[][][] imageSamples)
          Constructor that receives the original image samples and initializes default values.
 
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.
static boolean verifyParameters(int[] WTType, int[] WTLevels, int[] WTOrder)
          Verify Parameters defined in this class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

imageSamples

float[][][] imageSamples
Original image samples (index meaning [z][y][x]).

All values allowed.


zSize

int zSize
Number of image components.

Negative values are not allowed for this field.


ySize

int ySize
Image height.

Negative values are not allowed for this field.


xSize

int xSize
Image width.

Negative values are not allowed for this field.


WTTypes

int[] WTTypes
Definition in ForwardWaveletTransform.WTTypes


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 or false.

Constructor Detail

InverseWaveletTransform

public InverseWaveletTransform(float[][][] imageSamples)
Constructor that receives the original image samples and initializes default values.

Parameters:
imageSamples - a 3D float array that contains image samples
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 this class
WTLevels - definition in this class

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 this class
WTLevels - definition in this class
WTOrder - definition in this class

verifyParameters

public static boolean verifyParameters(int[] WTType,
                                       int[] WTLevels,
                                       int[] WTOrder)
Verify Parameters defined in this class

Parameters:
WTType - defined in this class
WTLevels - defined in this class
WTOrder - definition in this class
Returns:
a boolean that indicates if the parameters are allowed

run

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

Returns:
a 3D float array that contains the DWT image
Throws:
java.lang.Exception

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 unrecognized wavelet type is passed

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 unrecognized wavelet type is passed

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 unrecognized wavelet type is passed


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)