Package jj2000.j2k.entropy
Class CBlkSizeSpec
java.lang.Object
jj2000.j2k.ModuleSpec
jj2000.j2k.entropy.CBlkSizeSpec
- All Implemented Interfaces:
Cloneable
This class extends ModuleSpec class for code-blocks sizes holding purposes.
It stores the size a of code-block.
-
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, specified, specType, specValType, tileCompVal, tileDef -
Constructor Summary
ConstructorsConstructorDescriptionCBlkSizeSpec(int nt, int nc, byte type) Creates a new CBlkSizeSpec object for the specified number of tiles and components.CBlkSizeSpec(int nt, int nc, byte type, J2KImageWriteParamJava wp, String values) Creates a new CBlkSizeSpec object for the specified number of tiles and components and the parameters instance. -
Method Summary
Modifier and TypeMethodDescriptionintgetCBlkHeight(byte type, int t, int c) Returns the code-block height: for the specified tile/component for the specified tile for the specified component default value The value returned depends on the value of the variable 'type' which can take the following values : SPEC_DEF -> Default value is returned.intgetCBlkWidth(byte type, int t, int c) Returns the code-block width : for the specified tile/component for the specified tile for the specified component default value The value returned depends on the value of the variable 'type' which can take the following values :
SPEC_DEF -> Default value is returned.intReturns the maximum code-block's heightintReturns the maximum code-block's widthvoidsetCompDef(int c, Object value) Sets default value for specified component and specValType tag if allowed by its priority.voidsetDefault(Object value) Sets default value for this modulevoidsetTileCompVal(int t, int c, Object value) Sets value for specified tile-component.voidsetTileDef(int t, Object value) Sets default value for specified tile and specValType tag if allowed by its priority.Methods inherited from class jj2000.j2k.ModuleSpec
clone, getCompDef, getCopy, getDefault, getSpec, getSpecValType, getTileCompVal, getTileDef, isCompSpecified, isTileCompSpecified, isTileSpecified, parseIdx, rotate90
-
Constructor Details
-
CBlkSizeSpec
public CBlkSizeSpec(int nt, int nc, byte type) Creates a new CBlkSizeSpec object for the specified number of tiles and components.- Parameters:
nt- The number of tilesnc- The number of componentstype- the type of the specification module i.e. tile specific, component specific or both.
-
CBlkSizeSpec
Creates a new CBlkSizeSpec object for the specified number of tiles and components and the parameters instance.- Parameters:
nt- The number of tilesnc- The number of componentstype- the type of the specification module i.e. tile specific, component specific or both.wp- The parameters
-
-
Method Details
-
getMaxCBlkWidth
public int getMaxCBlkWidth()Returns the maximum code-block's width -
getMaxCBlkHeight
public int getMaxCBlkHeight()Returns the maximum code-block's height -
getCBlkWidth
public int getCBlkWidth(byte type, int t, int c) Returns the code-block width :- for the specified tile/component
- for the specified tile
- for the specified component
- default value
- SPEC_DEF -> Default value is returned. t and c values are ignored
- SPEC_COMP_DEF -> Component default value is returned. t value is ignored
- SPEC_TILE_DEF -> Tile default value is returned. c value is ignored
- SPEC_TILE_COMP -> Tile/Component value is returned.
- Parameters:
type- The type of the value we want to be returnedt- The tile indexc- the component index- Returns:
- The code-block width for the specified tile and component
-
getCBlkHeight
public int getCBlkHeight(byte type, int t, int c) Returns the code-block height:- for the specified tile/component
- for the specified tile
- for the specified component
- default value
- SPEC_DEF -> Default value is returned. t and c values are ignored
- SPEC_COMP_DEF -> Component default value is returned. t value is ignored
- SPEC_TILE_DEF -> Tile default value is returned. c value is ignored
- SPEC_TILE_COMP -> Tile/Component value is returned.
- Parameters:
type- The type of the value we want to be returnedt- The tile indexc- the component index- Returns:
- The code-block height for the specified tile and component
-
setDefault
Sets default value for this module- Overrides:
setDefaultin classModuleSpec- Parameters:
value- Default value
-
setTileDef
Sets default value for specified tile and specValType tag if allowed by its priority.- Overrides:
setTileDefin classModuleSpec- Parameters:
t- Tile index.value- Tile's default value
-
setCompDef
Sets default value for specified component and specValType tag if allowed by its priority.- Overrides:
setCompDefin classModuleSpec- Parameters:
c- Component indexvalue- Component's default value
-
setTileCompVal
Sets value for specified tile-component.- Overrides:
setTileCompValin classModuleSpec- Parameters:
t- Tie indexc- Component indexvalue- Tile-component's value
-