Package jj2000.j2k.wavelet
Class WTDecompSpec
- java.lang.Object
-
- jj2000.j2k.wavelet.WTDecompSpec
-
public class WTDecompSpec extends Object
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
Fields Modifier and Type Field Description static byte
DEC_SPEC_COMP_DEF
The identifier for "component default" specified decompositionstatic byte
DEC_SPEC_MAIN_DEF
The identifier for "main default" specified decompositionstatic byte
DEC_SPEC_TILE_COMP
The identifier for "tile and component specific" specified decompositionstatic byte
DEC_SPEC_TILE_DEF
The identifier for "tile specific default" specified decompositionstatic int
WT_DECOMP_DYADIC
ID for the dyadic wavelet tree decomposition (also called "Mallat" in JPEG 2000): 0x00.static int
WT_DECOMP_PACKET
ID 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 int
WT_DECOMP_SPACL
ID 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
Constructors Constructor Description 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getDecompType(int n)
Returns the decomposition type to be used in component 'n' and tile 't'.byte
getDecSpecType(int n)
Returns the type of specification for the decomposition in the specified component and tile.int
getLevels(int n)
Returns the decomposition number of levels in component 'n' and tile 't'.int
getMainDefDecompType()
Returns the main default decomposition type.int
getMainDefLevels()
Returns the main default decomposition number of levels.void
setMainCompDefDecompType(int n, int dec, int lev)
Sets the "component main default" decomposition type and number of levels for the specified component.
-
-
-
Field Detail
-
WT_DECOMP_DYADIC
public static final int WT_DECOMP_DYADIC
ID for the dyadic wavelet tree decomposition (also called "Mallat" in JPEG 2000): 0x00.- See Also:
- Constant Field Values
-
WT_DECOMP_SPACL
public static final int WT_DECOMP_SPACL
ID 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:
- Constant Field Values
-
WT_DECOMP_PACKET
public static final int WT_DECOMP_PACKET
ID 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:
- Constant Field Values
-
DEC_SPEC_MAIN_DEF
public static final byte DEC_SPEC_MAIN_DEF
The identifier for "main default" specified decomposition- See Also:
- Constant Field Values
-
DEC_SPEC_COMP_DEF
public static final byte DEC_SPEC_COMP_DEF
The identifier for "component default" specified decomposition- See Also:
- Constant Field Values
-
DEC_SPEC_TILE_DEF
public static final byte DEC_SPEC_TILE_DEF
The identifier for "tile specific default" specified decomposition- See Also:
- Constant Field Values
-
DEC_SPEC_TILE_COMP
public static final byte DEC_SPEC_TILE_COMP
The identifier for "tile and component specific" specified decomposition- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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 Detail
-
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.
-
-