CADI.Client.ClientLogicalTarget.JPEG2000
Class MultiComponentDetransform

java.lang.Object
  extended by CADI.Client.ClientLogicalTarget.JPEG2000.MultiComponentDetransform

public class MultiComponentDetransform
extends java.lang.Object

This class implements several multiple component detransformations.

Two constructors are implemented depending on multiple component transformation is specified either by means of the JPEG2000-compliant headers or by means of the uncompliant JPK headers.

Version:
1.1 2008/12/13
Author:
Group on Interactive Coding of Images (GICI)

Field Summary
private  CBDParameters cbdParameters
          Definition in CBDParameters.
private  CODParameters codParameters
          Definition in CODParameters.
private  int[] componentIndexes
          Is an one-dimensional array with the component indexes which will be returned after the multi-component transform has been applied.
private  float[][][] imageSamples
          Multi-component image which will be detransformed along the component dimension (spectral dimension).
private  boolean isNoCompliantMCT
          Indicates whether the multiple component transformation is signalled by means of either CBD, MCT, MCC, and MCO parameters or the JPK parameters.
private  JPKParameters jpkParameters
          Definition in JPKParameters.
private  java.util.HashMap<java.lang.Integer,MCCParameters> mccParametersList
          Definition in MCCParameters.
private  MCOParameters mcoParameters
          Definition in MCOParameters.
private  java.util.HashMap<java.lang.Integer,MCTParameters> mctParametersList
          Definition in MCTParameters.
private  int multiComponentTransformType
          Definition in CODParameters.multiComponentTransform.
private  int[] relevantComponentIndexes
          Is an one-dimensional array with the component indexes which are necessaries to invert the multi-component transform.
private  SIZParameters sizParameters
          Definition in SIZParameters.
private  float[][][] tmpImageSamples
          Multi-component image which will be used as a temporary image in order to apply the inverse multi-component transform.
 
Constructor Summary
MultiComponentDetransform(float[][][] imageSamples, SIZParameters sizParameters, CODParameters codParameters, CBDParameters cbdParameters, java.util.HashMap<java.lang.Integer,MCTParameters> mctParametersList, java.util.HashMap<java.lang.Integer,MCCParameters> mccParametersList, MCOParameters mcoParameters, int[] relevantComponentIndexes, int[] componentIndexes)
          Constructor.
MultiComponentDetransform(float[][][] imageSamples, SIZParameters sizParameters, JPKParameters jpkParameters, int[] relevantComponentIndexes, int[] componentIndexes)
          Constructor.
 
Method Summary
private  int[] computeSubBandSizes(int zSize, int WTLevels)
          This function compute the subband sizes for every dimension.
private  void differentialCodingWithRestartIndex(int restartIndex)
          Performs the differential coding along the components with a periodical restart.
private  void differentialCodingWithRestartIndex(int[] restartIndexes)
          Performs the differential coding along the components with a non periodical restart.
private  void discreteWaveletTransform(int type, int levels)
           
 float[][][] getImage()
          Returns the imageSamples attribute.
 void list(java.io.PrintStream out)
          Prints this Multi-component detransform out to the specified output stream.
 float[][][] run()
          Performs the multiple component transformation.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

imageSamples

private float[][][] imageSamples
Multi-component image which will be detransformed along the component dimension (spectral dimension).


sizParameters

private SIZParameters sizParameters
Definition in SIZParameters.


codParameters

private CODParameters codParameters
Definition in CODParameters.


multiComponentTransformType

private int multiComponentTransformType
Definition in CODParameters.multiComponentTransform.


cbdParameters

private CBDParameters cbdParameters
Definition in CBDParameters.


mctParametersList

private java.util.HashMap<java.lang.Integer,MCTParameters> mctParametersList
Definition in MCTParameters.


mccParametersList

private java.util.HashMap<java.lang.Integer,MCCParameters> mccParametersList
Definition in MCCParameters.


mcoParameters

private MCOParameters mcoParameters
Definition in MCOParameters.


jpkParameters

private JPKParameters jpkParameters
Definition in JPKParameters.


relevantComponentIndexes

private int[] relevantComponentIndexes
Is an one-dimensional array with the component indexes which are necessaries to invert the multi-component transform.


componentIndexes

private int[] componentIndexes
Is an one-dimensional array with the component indexes which will be returned after the multi-component transform has been applied.


isNoCompliantMCT

private boolean isNoCompliantMCT
Indicates whether the multiple component transformation is signalled by means of either CBD, MCT, MCC, and MCO parameters or the JPK parameters.


tmpImageSamples

private float[][][] tmpImageSamples
Multi-component image which will be used as a temporary image in order to apply the inverse multi-component transform. It is used due to the inverse module has not a canvas coordinate system.

Constructor Detail

MultiComponentDetransform

public MultiComponentDetransform(float[][][] imageSamples,
                                 SIZParameters sizParameters,
                                 CODParameters codParameters,
                                 CBDParameters cbdParameters,
                                 java.util.HashMap<java.lang.Integer,MCTParameters> mctParametersList,
                                 java.util.HashMap<java.lang.Integer,MCCParameters> mccParametersList,
                                 MCOParameters mcoParameters,
                                 int[] relevantComponentIndexes,
                                 int[] componentIndexes)
Constructor.

Parameters:
imageSamples - definition in imageSamples.
sizParameters - definition in sizParameters.
codParameters - definition in codParameters.
cbdParameters - definition in cbdParameters.
mctParametersList - definition in mctParametersList.
mccParametersList - definition in mccParametersList.
mcoParameters - definition in mcoParameters.
relevantComponentIndexes - definition in relevantComponentIndexes.

MultiComponentDetransform

public MultiComponentDetransform(float[][][] imageSamples,
                                 SIZParameters sizParameters,
                                 JPKParameters jpkParameters,
                                 int[] relevantComponentIndexes,
                                 int[] componentIndexes)
Constructor.

It must be used when the multiple component transformation is performed through the JPK main headers in the codestream. This is a non JEPG2000 compliant headers.

Parameters:
imageSamples - definition in imageSamples.
sizParameters - definition in sizParameters.
jpkParameters - definition in jpkParameters.
relevantComponentIndexes - definition in relevantComponentIndexes.
componentIndexes - definition in componentIndexes.
Method Detail

run

public float[][][] run()
                throws ErrorException
Performs the multiple component transformation.

Returns:
the imageSamples attribute.
Throws:
ErrorException

getImage

public float[][][] getImage()
Returns the imageSamples attribute.

Returns:
the imageSamples attribute.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

list

public void list(java.io.PrintStream out)
Prints this Multi-component detransform out to the specified output stream. This method is useful for debugging.

Parameters:
out - an output stream.

discreteWaveletTransform

private void discreteWaveletTransform(int type,
                                      int levels)
                               throws ErrorException
Parameters:
type -
levels -
Throws:
ErrorException

differentialCodingWithRestartIndex

private void differentialCodingWithRestartIndex(int restartIndex)
                                         throws ErrorException
Performs the differential coding along the components with a periodical restart.

Parameters:
restartIndex -
Throws:
ErrorException

differentialCodingWithRestartIndex

private void differentialCodingWithRestartIndex(int[] restartIndexes)
                                         throws ErrorException
Performs the differential coding along the components with a non periodical restart.

Parameters:
restartIndexes -
Throws:
ErrorException

computeSubBandSizes

private int[] computeSubBandSizes(int zSize,
                                  int WTLevels)
This function compute the subband sizes for every dimension.



CADI - Copyright (C) 2007
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) (contact)