jj2000.j2k.quantization
Class QuantTypeSpec

java.lang.Object
  |
  +--jj2000.j2k.ModuleSpec
        |
        +--jj2000.j2k.quantization.QuantTypeSpec
All Implemented Interfaces:
java.lang.Cloneable

public class QuantTypeSpec
extends ModuleSpec

This class extends ModuleSpec class in order to hold specifications about the quantization type to use in each tile-component. Supported quantization type are:

See Also:
ModuleSpec

Field Summary
 
Fields inherited from class jj2000.j2k.ModuleSpec
compDef, def, nComp, nTiles, SPEC_COMP_DEF, SPEC_DEF, SPEC_TILE_COMP, SPEC_TILE_DEF, SPEC_TYPE_COMP, SPEC_TYPE_TILE, SPEC_TYPE_TILE_COMP, specType, specValType, tileCompVal, tileDef
 
Constructor Summary
QuantTypeSpec(int nt, int nc, byte type)
          Constructs an empty 'QuantTypeSpec' with the specified number of tiles and components.
QuantTypeSpec(int nt, int nc, byte type, ParameterList pl)
          Constructs a new 'QuantTypeSpec' for the specified number of components and tiles and the arguments of "-Qtype" option.
 
Method Summary
 boolean isDerived(int t, int c)
          Returns true if given tile-component uses derived quantization step size.
 boolean isFullyNonReversible()
          Check the irreversibility of the whole image.
 boolean isFullyReversible()
          Check the reversibility of the whole image.
 boolean isReversible(int t, int c)
          Check the reversibility of the given tile-component.
 
Methods inherited from class jj2000.j2k.ModuleSpec
clone, getCompDef, getCopy, getDefault, getSpec, getSpecValType, getTileCompVal, getTileDef, isCompSpecified, isTileCompSpecified, isTileSpecified, parseIdx, rotate90, setCompDef, setDefault, setTileCompVal, setTileDef
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuantTypeSpec

public QuantTypeSpec(int nt,
                     int nc,
                     byte type)
Constructs an empty 'QuantTypeSpec' with the specified number of tiles and components. This constructor is called by the decoder.

Parameters:
nt - Number of tiles
nc - Number of components
type - the type of the allowed specifications for this module i.e. tile specific, component specific or both.

QuantTypeSpec

public QuantTypeSpec(int nt,
                     int nc,
                     byte type,
                     ParameterList pl)
Constructs a new 'QuantTypeSpec' for the specified number of components and tiles and the arguments of "-Qtype" option. This constructor is called by the encoder.

Parameters:
nt - The number of tiles
nc - The number of components
type - the type of the specification module i.e. tile specific, component specific or both.
pl - The ParameterList
Method Detail

isDerived

public boolean isDerived(int t,
                         int c)
Returns true if given tile-component uses derived quantization step size.

Parameters:
t - Tile index
c - Component index
Returns:
True if derived quantization step size

isReversible

public boolean isReversible(int t,
                            int c)
Check the reversibility of the given tile-component.

Parameters:
t - The index of the tile
c - The index of the component
Returns:
Whether or not the tile-component is reversible

isFullyReversible

public boolean isFullyReversible()
Check the reversibility of the whole image.

Returns:
Whether or not the whole image is reversible

isFullyNonReversible

public boolean isFullyNonReversible()
Check the irreversibility of the whole image.

Returns:
Whether or not the whole image is reversible