CADI.Server.LogicalTarget.JPEG2000.Codestream
Class JPKMainHeaderEncoder

java.lang.Object
  extended by CADI.Server.LogicalTarget.JPEG2000.Codestream.JPKMainHeaderEncoder

public class JPKMainHeaderEncoder
extends java.lang.Object

This class generates JPK headers from the CADI server. This heading is useful for some parameters/options allowed in CADI and not allowed in JPEG2000 standard headings. Usage example:
  construct
  run

Version:
1.0 2008/05/22
Author:
Group on Interactive Coding of Images (GICI)

Field Summary
private  int BDBlockHeights_BITS
           
private  int BDBlockWidths_BITS
           
private  int BDResolutionPrecinctHeights_BITS
           
private  int BDResolutionPrecinctWidths_BITS
           
private  int[] bitPlaneEncodingSA
          Definition in JPKParameters.bitPlaneEncodingSA
private  int BitStreamType
          Is the bitstream type Bitstreams can be:
0- J2B JPEG2000 bitstream (without MQ coding) - CANCELLED 1- J2C JPEG2000 codestream (with MQ coding)
private  int BitStreamType_BITS
           
private  int[] blockHeights
          Definition in CODParameters.blockHeights
private  int[] blockWidths
          Definition in CODParameters.blockWidths
private  int CBitPlaneEncodingSA_BITS
           
private  int[] CTComponents
          Definition in CADI.Common.LogicalTarget.JPEG2000.Parameters.CODParameters#CTComponents
private  int CTComponents_BITS
           
private  int CTType
          Definition in CADI.Common.LogicalTarget.JPEG2000.Parameters.CODParameters#CTType
private  int CTType_BITS
           
private  int CWaveletSA_BITS
           
private  boolean[] FWPacketHeaders
          Definition in CODParameters.useSOP and CODParameters.useEPH.
private  int FWProgressionOrder
          Definition in CODParameters.progressionOrder
private  int FWProgressionOrder_BITS
           
private  int LCAchievedNumLayers
          Definition in CODParameters.numLayers
private  int LCAchievedNumLayers_BITS
           
private  boolean[] LSComponents
          Definition in JPKParameters.LSComponents
private  boolean[] LSSignedComponents
          Definition in SIZParameters.signed
private  int[] LSSubsValues
          Definition in JPKParameters.LSSubsValues
private  int LSSubsValues_BITS
           
private  int LSType
          Definition in JPKParameters.LSType
private  int LSType_BITS
           
private  int[] QComponentsBits
          Definition in SIZParameters.precision
private  int QComponentsBits_BITS
           
private  int QDynamicRange
          Definition in JPKParameters.QDynamicRange
private  int QDynamicRange_BITS
           
private  int[][][] QExponents
          Definition in QCDParameters.QExponents
private  int QExponents_BITS
           
private  int QGuardBits
          Definition in QCDParameters.QGuardBits
private  int QGuardBits_BITS
           
private  int[][][] QMantisas
          Definition in QCDParameters.QMantisas
private  int QMantisas_BITS
           
private  int[] QTypes
          Definition in QCDParameters.QTypes
private  int QTypes_BITS
           
private  int[] RBitplanesScaling
          Definition in JPKParameters.RBitplanesScaling
private  int RBitplanesScaling_BITS
           
private  int[][] resolutionPrecinctHeights
          Definition in CODParameters.precinctHeights
private  int[][] resolutionPrecinctWidths
          Definition in CODParameters.precinctWidths
private  float[] RMMultValues
          Definition in JPKParameters.RMMultValues
private  int[] RroisParameters
          Definition in JPKParameters.RroisParameters
private  int RroisParameters_BITS
           
private  int RroiType
          Definition in JPKParameters.RroiType
private  int RroiType_BITS
           
private  int[] waveletSA
          Definition in JPKParameters.waveletSA
private  int WSL
          Definition in JPKParameters.WSL
private  int WSL_BITS
           
private  int WST
          Definition in JPKParameters.WST
private  int WST_BITS
           
private  int WT3D
          Definition in JPKParameters.WT3D
private  int WT3D_BITS
           
private  int[] WTLevels
          Definition in CODParameters.WTLevels
private  int WTLevels_BITS
           
private  int[] WTTypes
          Definition in CODParameters.WTTypes
private  int WTTypes_BITS
           
private  int xSize
          Definition in SIZParameters.xSize
private  int xSize_BITS
           
private  int ySize
          Definition in SIZParameters.ySize
private  int ySize_BITS
           
private  int zSize
          Definition in SIZParameters.zSize
private  int zSize_BITS
           
 
Constructor Summary
JPKMainHeaderEncoder(SIZParameters sizParameters, CODParameters codParameters, QCDParameters qcdParameters, JPKParameters jpkParameters, int BitStreamType)
          Constructor.
 
Method Summary
 void list(java.io.PrintStream out)
          Prints the JPK Main Header Encoder data out to the specified output stream.
 ByteStream run()
          Generates the JPK heading.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

zSize

private int zSize
Definition in SIZParameters.zSize


zSize_BITS

private final int zSize_BITS
See Also:
Constant Field Values

ySize

private int ySize
Definition in SIZParameters.ySize


ySize_BITS

private final int ySize_BITS
See Also:
Constant Field Values

xSize

private int xSize
Definition in SIZParameters.xSize


xSize_BITS

private final int xSize_BITS
See Also:
Constant Field Values

LSType

private int LSType
Definition in JPKParameters.LSType


LSType_BITS

private final int LSType_BITS
See Also:
Constant Field Values

LSComponents

private boolean[] LSComponents
Definition in JPKParameters.LSComponents


LSSubsValues

private int[] LSSubsValues
Definition in JPKParameters.LSSubsValues


LSSubsValues_BITS

private final int LSSubsValues_BITS
See Also:
Constant Field Values

LSSignedComponents

private boolean[] LSSignedComponents
Definition in SIZParameters.signed


RMMultValues

private float[] RMMultValues
Definition in JPKParameters.RMMultValues


CTType

private int CTType
Definition in CADI.Common.LogicalTarget.JPEG2000.Parameters.CODParameters#CTType


CTType_BITS

private final int CTType_BITS
See Also:
Constant Field Values

CTComponents

private int[] CTComponents
Definition in CADI.Common.LogicalTarget.JPEG2000.Parameters.CODParameters#CTComponents


CTComponents_BITS

private final int CTComponents_BITS
See Also:
Constant Field Values

WTTypes

private int[] WTTypes
Definition in CODParameters.WTTypes


WTTypes_BITS

private final int WTTypes_BITS
See Also:
Constant Field Values

WTLevels

private int[] WTLevels
Definition in CODParameters.WTLevels


WTLevels_BITS

private final int WTLevels_BITS
See Also:
Constant Field Values

WT3D

private int WT3D
Definition in JPKParameters.WT3D


WT3D_BITS

private final int WT3D_BITS
See Also:
Constant Field Values

WSL

private int WSL
Definition in JPKParameters.WSL


WSL_BITS

private final int WSL_BITS
See Also:
Constant Field Values

WST

private int WST
Definition in JPKParameters.WST


WST_BITS

private final int WST_BITS
See Also:
Constant Field Values

QTypes

private int[] QTypes
Definition in QCDParameters.QTypes


QTypes_BITS

private final int QTypes_BITS
See Also:
Constant Field Values

QDynamicRange

private int QDynamicRange
Definition in JPKParameters.QDynamicRange


QDynamicRange_BITS

private final int QDynamicRange_BITS
See Also:
Constant Field Values

QComponentsBits

private int[] QComponentsBits
Definition in SIZParameters.precision


QComponentsBits_BITS

private final int QComponentsBits_BITS
See Also:
Constant Field Values

QExponents

private int[][][] QExponents
Definition in QCDParameters.QExponents


QExponents_BITS

private final int QExponents_BITS
See Also:
Constant Field Values

QMantisas

private int[][][] QMantisas
Definition in QCDParameters.QMantisas


QMantisas_BITS

private final int QMantisas_BITS
See Also:
Constant Field Values

QGuardBits

private int QGuardBits
Definition in QCDParameters.QGuardBits


QGuardBits_BITS

private final int QGuardBits_BITS
See Also:
Constant Field Values

blockWidths

private int[] blockWidths
Definition in CODParameters.blockWidths


BDBlockWidths_BITS

private final int BDBlockWidths_BITS
See Also:
Constant Field Values

blockHeights

private int[] blockHeights
Definition in CODParameters.blockHeights


BDBlockHeights_BITS

private final int BDBlockHeights_BITS
See Also:
Constant Field Values

resolutionPrecinctWidths

private int[][] resolutionPrecinctWidths
Definition in CODParameters.precinctWidths


BDResolutionPrecinctWidths_BITS

private final int BDResolutionPrecinctWidths_BITS
See Also:
Constant Field Values

resolutionPrecinctHeights

private int[][] resolutionPrecinctHeights
Definition in CODParameters.precinctHeights


BDResolutionPrecinctHeights_BITS

private final int BDResolutionPrecinctHeights_BITS
See Also:
Constant Field Values

LCAchievedNumLayers

private int LCAchievedNumLayers
Definition in CODParameters.numLayers


LCAchievedNumLayers_BITS

private final int LCAchievedNumLayers_BITS
See Also:
Constant Field Values

BitStreamType

private int BitStreamType
Is the bitstream type Bitstreams can be:


BitStreamType_BITS

private final int BitStreamType_BITS
See Also:
Constant Field Values

FWProgressionOrder

private int FWProgressionOrder
Definition in CODParameters.progressionOrder


FWProgressionOrder_BITS

private final int FWProgressionOrder_BITS
See Also:
Constant Field Values

FWPacketHeaders

private boolean[] FWPacketHeaders
Definition in CODParameters.useSOP and CODParameters.useEPH.


waveletSA

private int[] waveletSA
Definition in JPKParameters.waveletSA


CWaveletSA_BITS

private final int CWaveletSA_BITS
See Also:
Constant Field Values

bitPlaneEncodingSA

private int[] bitPlaneEncodingSA
Definition in JPKParameters.bitPlaneEncodingSA


CBitPlaneEncodingSA_BITS

private final int CBitPlaneEncodingSA_BITS
See Also:
Constant Field Values

RroiType

private int RroiType
Definition in JPKParameters.RroiType


RroiType_BITS

private final int RroiType_BITS
See Also:
Constant Field Values

RroisParameters

private int[] RroisParameters
Definition in JPKParameters.RroisParameters


RroisParameters_BITS

private final int RroisParameters_BITS
See Also:
Constant Field Values

RBitplanesScaling

private int[] RBitplanesScaling
Definition in JPKParameters.RBitplanesScaling


RBitplanesScaling_BITS

private final int RBitplanesScaling_BITS
See Also:
Constant Field Values
Constructor Detail

JPKMainHeaderEncoder

public JPKMainHeaderEncoder(SIZParameters sizParameters,
                            CODParameters codParameters,
                            QCDParameters qcdParameters,
                            JPKParameters jpkParameters,
                            int BitStreamType)
Constructor.

Parameters:
sizParameters - definition in SIZParameters.
codParameters - definition in CODParameters.
qcdParameters - definition in QCDParameters.
jpkParameters - definition in JPKParameters.
BitStreamType - definition in BitStreamType.
Method Detail

run

public ByteStream run()
               throws WarningException
Generates the JPK heading.

Throws:
WarningException - when the heading can not be generated due to some variable exceeds the maximum allowed range

toString

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

list

public void list(java.io.PrintStream out)
Prints the JPK Main Header Encoder data out to the specified output stream. This method is useful for debugging.

Parameters:
out - an output stream.


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)