GiciImageExtension
Class ImageDeExtension

java.lang.Object
  extended by GiciImageExtension.ImageDeExtension

public class ImageDeExtension
extends java.lang.Object

This class receives an image and delete the files and columns extended during compression process.
Usage example:
  construct
  set functions
  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)  int[] imageWidth
          Image width of the original image for each of the channels.
(package private)  int[] padRows
          Definition in ImageExtension.padRows
(package private)  boolean parametersSet
          To know if parameters are set.
(package private)  int zSize
          Number of image components.
 
Constructor Summary
ImageDeExtension(float[][][] imageSamples)
          Constructor that receives the original image samples.
 
Method Summary
static int[] computePadRows(int zSize, int ySize, int[] imageExtensionType, int[] WTLevels)
          Computes the number of padding rows that has been added to the original image
static boolean needDeExtension(int[] padRows, int[] imageWidth, int[] xSizes)
          Determines if the image should be cropped in order to recover its initial size
 float[][][] run()
          Inversion of the extension
 void setParameters(int[] imageWidth, int[] padRows)
          Set the parameters used to invert the image extension
 
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.


imageWidth

int[] imageWidth
Image width of the original image for each of the channels.

Negative values are not allowed for this field.


padRows

int[] padRows
Definition in ImageExtension.padRows


parametersSet

boolean parametersSet
To know if parameters are set.

True indicates that they are set otherwise false.

Constructor Detail

ImageDeExtension

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

Parameters:
imageSamples - definition in imageSamples
Method Detail

setParameters

public void setParameters(int[] imageWidth,
                          int[] padRows)
Set the parameters used to invert the image extension

Parameters:
imageWidth - definition in imageWidth
padRows - definition in padRows

run

public float[][][] run()
                throws java.lang.Exception
Inversion of the extension

Returns:
the deExtended image
Throws:
java.lang.Exception

needDeExtension

public static boolean needDeExtension(int[] padRows,
                                      int[] imageWidth,
                                      int[] xSizes)
Determines if the image should be cropped in order to recover its initial size

Parameters:
padRows - definition in padRows
imageWidth - definition in imageWidth
xSizes - indicates the size of each channel after reconstruction.
Returns:
a boolean that indicates if ImageDeExtension is required.

computePadRows

public static int[] computePadRows(int zSize,
                                   int ySize,
                                   int[] imageExtensionType,
                                   int[] WTLevels)
Computes the number of padding rows that has been added to the original image

Parameters:
zSize - definition in zSize
ySize - image height of the original image
imageExtensionType - definition in ImageExtension.imageExtensionType
WTLevels - definition in ForwardWaveletTransform.WTLevels
Returns:
an intger array containing the number of padding rows to delete after inverse DWT


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)