TER.TERdecoder.Weighting
Class InverseWeighting

java.lang.Object
  extended by TER.TERdecoder.Weighting.InverseWeighting

public class InverseWeighting
extends java.lang.Object

This class receives an image and inverse weights the specified components.
Usage example:
  construct
  set functions
  run

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

Field Summary
(package private)  float[][] customWeight
          Definition in ForwardWeighting.customWeight
(package private)  int[] customWtFlag
          Definition in ForwardWeighting.customWtFlag
(package private)  float[][][] imageSamples
          Image samples (index meaning [z][y][x]).
(package private)  boolean parametersSet
          To know if parameters are set.
(package private)  int[] WTLevels
          Definition in ForwardWaveletTransform.WTLevels
(package private)  int[] WTType
          Definition in ForwardWaveletTransform.WTTypes
(package private)  int xSize
          Definition in Coder.xSize
(package private)  int ySize
          Definition in Coder.ySize
(package private)  int zSize
          Definition in Coder.zSize
 
Constructor Summary
InverseWeighting(float[][][] imageSamples)
          Constructor that receives the recovered image samples.
 
Method Summary
 float[][] getCustomWeight()
          return parameter customWeight defined in ForwardWeighting.customWeight
 int[] getCustomWtFlag()
          return parameter customWtFlag defined in ForwardWeighting.customWtFlag
 float getWeight(int subband, int channel)
          Finds the weight for a given subbands and channel
 float[][][] run()
          Performs the inverse weighting desired to each component
 void setParameters(int[] customWtFlag, int[] WTType, int[] WTLevels, float[][] customWeight)
          Set the parameters used to do the inverse weighting operation
static boolean setWeightingNeed(int[] customWtFlag, int[] WTType, int zSize)
          States if weighting is defined in needed according to the user specifications
 boolean weightingRequired(int component)
          For a given component indicates if weigthing must be applied
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

imageSamples

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

All values allowed.


zSize

int zSize
Definition in Coder.zSize


ySize

int ySize
Definition in Coder.ySize


xSize

int xSize
Definition in Coder.xSize


customWtFlag

int[] customWtFlag
Definition in ForwardWeighting.customWtFlag


customWeight

float[][] customWeight
Definition in ForwardWeighting.customWeight


WTType

int[] WTType
Definition in ForwardWaveletTransform.WTTypes


WTLevels

int[] WTLevels
Definition in ForwardWaveletTransform.WTLevels


parametersSet

boolean parametersSet
To know if parameters are set.

True indicates that they are set otherwise false.

Constructor Detail

InverseWeighting

public InverseWeighting(float[][][] imageSamples)
Constructor that receives the recovered image samples.

Parameters:
imageSamples - definition in imageSamples
Method Detail

setParameters

public void setParameters(int[] customWtFlag,
                          int[] WTType,
                          int[] WTLevels,
                          float[][] customWeight)
Set the parameters used to do the inverse weighting operation

Parameters:
customWtFlag - definition in ForwardWeighting.customWtFlag
WTType - definition in ForwardWaveletTransform.WTTypes
WTLevels - definition in ForwardWaveletTransform.WTLevels
customWeight - definition in ForwardWeighting.customWeight

getCustomWtFlag

public int[] getCustomWtFlag()
return parameter customWtFlag defined in ForwardWeighting.customWtFlag

Returns:
an array of integers containing customWtFlag

getCustomWeight

public float[][] getCustomWeight()
return parameter customWeight defined in ForwardWeighting.customWeight

Returns:
an array of floats containing customWeight

setWeightingNeed

public static boolean setWeightingNeed(int[] customWtFlag,
                                       int[] WTType,
                                       int zSize)
States if weighting is defined in needed according to the user specifications

Parameters:
customWtFlag - definition in ForwardWeighting.customWtFlag
WTType - definition in ForwardWaveletTransform.WTTypes
zSize - definition in Coder.zSize
Returns:
a boolean that indicates if the weighting is required

getWeight

public float getWeight(int subband,
                       int channel)
Finds the weight for a given subbands and channel

Parameters:
subband - indicates the subband that requires the weighting factor
channel - indicates the channel that requires the weighting factor
Returns:
a float corresponding to the weigth to be applied in the given subband

weightingRequired

public boolean weightingRequired(int component)
For a given component indicates if weigthing must be applied

Parameters:
component - indicates the component that requires the weighting factor
Returns:
a boolean that indicates whether weighting must be applied in the given subband

run

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

Returns:
the inverted weighted image
Throws:
ParameterException - when something goes wrong and the inverse weighting must be stopped


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)