GiciImageExtension
Class ImageExtension

java.lang.Object
  extended by GiciImageExtension.ImageExtension

public class ImageExtension
extends java.lang.Object

This class receives an image and performs an extension to the specified components.
Usage example:
  construct
  set functions
  run

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

Field Summary
(package private)  int[] imageExtensionType
          Extension Type for each of the channels.
(package private)  float[][][] imageSamples
          Original image samples (index meaning [z][y][x]).
(package private)  int[] padRows
          Number of 'padding' rows to delete after inverse DWT for each component
(package private)  boolean parametersSet
          To know if parameters are set.
(package private)  int[] WTLevels
          Definition in ForwardWaveletTransform.WTLevels
(package private)  int xSize
          Image width.
(package private)  int ySize
          Image height.
(package private)  int zSize
          Number of image components.
 
Constructor Summary
ImageExtension(float[][][] imageSamples)
          Constructor that receives the original image samples.
 
Method Summary
 int getExtendedIndex(int indexToExtend, int originalSize, int extensionType)
          Finds the index to extend a vector according to the type selected
 int[] getPadRows()
           
static boolean needImageExtension(int[] imageExtensionType, int[] WTLevels, int xSize, int ySize, int zSize)
          Indicates whether image extension must be applied
 float[][][] run()
          Performs the extension desired to each component
 void setParameters(int[] imageExtensionType, int[] WTLevels)
          Set the parameters used to do 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.


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.


imageExtensionType

int[] imageExtensionType
Extension Type for each of the channels.

Following values are allowed : 0 - Repeat last value (CCSDS Recommended). 1 - Symmetric extension. 2. - No Extension.


WTLevels

int[] WTLevels
Definition in ForwardWaveletTransform.WTLevels


parametersSet

boolean parametersSet
To know if parameters are set.

True indicates that they are set otherwise false.


padRows

int[] padRows
Number of 'padding' rows to delete after inverse DWT for each component

Negative values are not allowed.

Constructor Detail

ImageExtension

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

Parameters:
imageSamples - definition in imageSamples
Method Detail

setParameters

public void setParameters(int[] imageExtensionType,
                          int[] WTLevels)
Set the parameters used to do the image extension

Parameters:
imageExtensionType - definition in imageExtensionType
WTLevels - definition in ForwardWaveletTransform.WTLevels

needImageExtension

public static boolean needImageExtension(int[] imageExtensionType,
                                         int[] WTLevels,
                                         int xSize,
                                         int ySize,
                                         int zSize)
Indicates whether image extension must be applied

Parameters:
imageExtensionType - definition in imageExtensionType
WTLevels - definition in ForwardWaveletTransform.WTLevels
xSize - integer containing the width of the original image
ySize - integer containing the height of the original image
zSize - number of components
Returns:
a boolean that indicates if extension must be performed

getExtendedIndex

public int getExtendedIndex(int indexToExtend,
                            int originalSize,
                            int extensionType)
Finds the index to extend a vector according to the type selected

Parameters:
indexToExtend - index of the extended position
originalSize - size of the original signal
extensionType - type of extension
Returns:
an integer corresponding to the index in the original of the position that is located the value of the extended position

run

public float[][][] run()
                throws ParameterException
Performs the extension desired to each component

Returns:
a float array containing the extended image
Throws:
ParameterException - when an invalid or unrecognized exception is detected it will be thrown

getPadRows

public int[] getPadRows()
Returns:
an integer array that indicates how many rows have been added for each channel


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)