jj2000.j2k.wavelet.analysis
Class AnWTFilterSpec

java.lang.Object
  |
  +--jj2000.j2k.ModuleSpec
        |
        +--jj2000.j2k.wavelet.analysis.AnWTFilterSpec

public class AnWTFilterSpec
extends ModuleSpec

This class extends ModuleSpec class for analysis filters specification holding purpose.

See Also:
ModuleSpec

Field Summary
private static java.lang.String NON_REV_FILTER_STR
          The non-reversible default filter
private static java.lang.String REV_FILTER_STR
          The reversible default filter
 
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
AnWTFilterSpec(int nt, int nc, byte type, QuantTypeSpec qts, ParameterList pl)
          Constructs a new 'AnWTFilterSpec' for the specified number of components and tiles.
 
Method Summary
 AnWTFilter[] getHFilters(int t, int c)
          Returns the horizontal analysis filters to be used in component 'n' and tile 't'.
 AnWTFilter[] getVFilters(int t, int c)
          Returns the vertical analysis filters to be used in component 'n' and tile 't'.
 int getWTDataType(int t, int c)
          Returns the data type used by the filters in this object, as defined in the 'DataBlk' interface for specified tile-component.
 boolean isReversible(int t, int c)
          Check the reversibility of filters contained is the given tile-component.
private  AnWTFilter[][] parseFilters(java.lang.String word)
          Parse filters from the given word
 java.lang.String toString()
          Debugging method
 
Methods inherited from class jj2000.j2k.ModuleSpec
getCompDef, getCompDefRep, getDefault, getDefRep, getSpec, getSpecValType, getTileCompVal, getTileDef, getTileDefRep, isCompSpecified, isTileCompSpecified, isTileSpecified, parseIdx, setCompDef, setDefault, setTileCompVal, setTileDef
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

REV_FILTER_STR

private static final java.lang.String REV_FILTER_STR
The reversible default filter

NON_REV_FILTER_STR

private static final java.lang.String NON_REV_FILTER_STR
The non-reversible default filter
Constructor Detail

AnWTFilterSpec

public AnWTFilterSpec(int nt,
                      int nc,
                      byte type,
                      QuantTypeSpec qts,
                      ParameterList pl)
Constructs a new 'AnWTFilterSpec' for the specified number of components and tiles.
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.
qts - Quantization specifications
pl - The ParameterList
Method Detail

parseFilters

private AnWTFilter[][] parseFilters(java.lang.String word)
Parse filters from the given word
Parameters:
word - String to parse
Returns:
Analysis wavelet filter (first dimension: by direction, second dimension: by decomposition levels)

getWTDataType

public int getWTDataType(int t,
                         int c)
Returns the data type used by the filters in this object, as defined in the 'DataBlk' interface for specified tile-component.
Parameters:
t - Tile index
c - Component index
Returns:
The data type of the filters in this object
See Also:
DataBlk

getHFilters

public AnWTFilter[] getHFilters(int t,
                                int c)
Returns the horizontal analysis filters to be used in component 'n' and tile 't'.

The horizontal analysis filters are returned in an array of AnWTFilter. Each element contains the horizontal filter for each resolution level starting with resolution level 1 (i.e. the analysis filter to go from resolution level 1 to resolution level 0). If there are less elements than the maximum resolution level, then the last element is assumed to be repeated.

Parameters:
t - The tile index, in raster scan order
c - The component index.
Returns:
The array of horizontal analysis filters for component 'n' and tile 't'.

getVFilters

public AnWTFilter[] getVFilters(int t,
                                int c)
Returns the vertical analysis filters to be used in component 'n' and tile 't'.

The vertical analysis filters are returned in an array of AnWTFilter. Each element contains the vertical filter for each resolution level starting with resolution level 1 (i.e. the analysis filter to go from resolution level 1 to resolution level 0). If there are less elements than the maximum resolution level, then the last element is assumed to be repeated.

Parameters:
t - The tile index, in raster scan order
c - The component index.
Returns:
The array of horizontal analysis filters for component 'n' and tile 't'.

toString

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

isReversible

public boolean isReversible(int t,
                            int c)
Check the reversibility of filters contained is the given tile-component.
Parameters:
t - The index of the tile
c - The index of the component