Package jj2000.j2k.wavelet
Class WTDecompSpec
java.lang.Object
jj2000.j2k.wavelet.WTDecompSpec
This class holds the decomposition type to be used in each part of the
image; the default one, the component specific ones, the tile default ones
and the component-tile specific ones.
The decomposition type identifiers values are the same as in the codestream.
The hierarchy is:
- Tile and component specific decomposition
- Tile specific default decomposition
- Component main default decomposition
- Main default decomposition
At the moment tiles are not supported by this class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byteThe identifier for "component default" specified decompositionstatic final byteThe identifier for "main default" specified decompositionstatic final byteThe identifier for "tile and component specific" specified decompositionstatic final byteThe identifier for "tile specific default" specified decompositionstatic final intID for the dyadic wavelet tree decomposition (also called "Mallat" in JPEG 2000): 0x00.static final intID for the PACKET (as defined in JPEG 2000) wavelet tree decomposition (2 levels of decomposition in the high bands and some specified number for the lowest LL band): 0x01.static final intID for the SPACL (as defined in JPEG 2000) wavelet tree decomposition (1 level of decomposition in the high bands and some specified number for the lowest LL band): 0x02. -
Constructor Summary
ConstructorsConstructorDescriptionWTDecompSpec(int nc, int dec, int lev) Constructs a new 'WTDecompSpec' for the specified number of components and tiles, with the given main default decomposition type and number of levels. -
Method Summary
Modifier and TypeMethodDescriptionintgetDecompType(int n) Returns the decomposition type to be used in component 'n' and tile 't'.bytegetDecSpecType(int n) Returns the type of specification for the decomposition in the specified component and tile.intgetLevels(int n) Returns the decomposition number of levels in component 'n' and tile 't'.intReturns the main default decomposition type.intReturns the main default decomposition number of levels.voidsetMainCompDefDecompType(int n, int dec, int lev) Sets the "component main default" decomposition type and number of levels for the specified component.
-
Field Details
-
WT_DECOMP_DYADIC
public static final int WT_DECOMP_DYADICID for the dyadic wavelet tree decomposition (also called "Mallat" in JPEG 2000): 0x00.- See Also:
-
WT_DECOMP_SPACL
public static final int WT_DECOMP_SPACLID for the SPACL (as defined in JPEG 2000) wavelet tree decomposition (1 level of decomposition in the high bands and some specified number for the lowest LL band): 0x02.- See Also:
-
WT_DECOMP_PACKET
public static final int WT_DECOMP_PACKETID for the PACKET (as defined in JPEG 2000) wavelet tree decomposition (2 levels of decomposition in the high bands and some specified number for the lowest LL band): 0x01.- See Also:
-
DEC_SPEC_MAIN_DEF
public static final byte DEC_SPEC_MAIN_DEFThe identifier for "main default" specified decomposition- See Also:
-
DEC_SPEC_COMP_DEF
public static final byte DEC_SPEC_COMP_DEFThe identifier for "component default" specified decomposition- See Also:
-
DEC_SPEC_TILE_DEF
public static final byte DEC_SPEC_TILE_DEFThe identifier for "tile specific default" specified decomposition- See Also:
-
DEC_SPEC_TILE_COMP
public static final byte DEC_SPEC_TILE_COMPThe identifier for "tile and component specific" specified decomposition- See Also:
-
-
Constructor Details
-
WTDecompSpec
public WTDecompSpec(int nc, int dec, int lev) Constructs a new 'WTDecompSpec' for the specified number of components and tiles, with the given main default decomposition type and number of levels.NOTE: The tile specific things are not supported yet
- Parameters:
nc- The number of componentsdec- The main default decomposition typelev- The main default number of decomposition levels
-
-
Method Details
-
setMainCompDefDecompType
public void setMainCompDefDecompType(int n, int dec, int lev) Sets the "component main default" decomposition type and number of levels for the specified component. Both 'dec' and 'lev' can not be negative at the same time.- Parameters:
n- The component indexdec- The decomposition type. If negative then the main default is used.lev- The number of levels. If negative then the main defaul is used.
-
getDecSpecType
public byte getDecSpecType(int n) Returns the type of specification for the decomposition in the specified component and tile. The specification type is one of: 'DEC_SPEC_MAIN_DEF', 'DEC_SPEC_COMP_DEF', 'DEC_SPEC_TILE_DEF', 'DEC_SPEC_TILE_COMP'.NOTE: The tile specific things are not supported yet
- Parameters:
n- The component index- Returns:
- The specification type for component 'n' and tile 't'.
-
getMainDefDecompType
public int getMainDefDecompType()Returns the main default decomposition type.- Returns:
- The main default decomposition type.
-
getMainDefLevels
public int getMainDefLevels()Returns the main default decomposition number of levels.- Returns:
- The main default decomposition number of levels.
-
getDecompType
public int getDecompType(int n) Returns the decomposition type to be used in component 'n' and tile 't'.NOTE: The tile specific things are not supported yet
- Parameters:
n- The component index.- Returns:
- The decomposition type to be used.
-
getLevels
public int getLevels(int n) Returns the decomposition number of levels in component 'n' and tile 't'.NOTE: The tile specific things are not supported yet
- Parameters:
n- The component index.- Returns:
- The decomposition number of levels.
-