public class JPEG2KTile
extends java.lang.Object
This class plays a role as a children of the
CADI.Common.LogicalTarget.JPEG2000.JPEG2KCodestrea
class.
Specific parameters (COD, COC, QCD, QCC) can be set for a tile. If some of
this parameters has been set, they are applied to this tile and
tile-components depending of the tile. Otherwise, the default parameters
defined in the JPEG2KCodestream
class are applied.
As a member of a tree structure there exist an attribute that links with the
father (parent
) and a table containing the children
(components
.
Usage example:
construct
getMethods
Modifier and Type | Field and Description |
---|---|
private CADIRectangle |
bounds
Bounds (location and size) of the tile in the reference grid.
|
protected java.util.HashMap<java.lang.Integer,COCParameters> |
cocParametersList
Coding style of component (COC) for this tile.
|
protected CODParameters |
codParameters
Coding style default (COD) for this tile.
|
protected java.util.HashMap<java.lang.Integer,JPEG2KComponent> |
components
It is a hash table to store the components in which this tile is divided.
|
protected int |
index
Records the tile index.
|
private CADIPoint |
indexes
Indexes of the tile in terms of horizontal and vertical position.
|
private CADIPoint |
location
Coordinates of the upper-left corner in the reference grid.
|
protected JPEG2KCodestream |
parent
Is a pointer to the parent object.
|
protected java.util.HashMap<java.lang.Integer,QCCParameters> |
qccParametersList
Quantization of component (QCC) for this tile.
|
protected QCDParameters |
qcdParameters
Quantization default (QCD) for this tile.
|
Constructor and Description |
---|
JPEG2KTile(JPEG2KCodestream parent,
int index)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
createComponent(int component)
Creates a new component in the tile.
|
int |
findComponent(long inClassIdentifier) |
int |
getBlockHeight(int component) |
int |
getBlockWidth(int component) |
CADIRectangle |
getBounds()
Returns the bounds (location and size) of the tile in the reference grid.
|
CADIRectangle |
getBounds(int component)
Returns the bounds of the tile within the domain of the image component.
|
JPEG2KComponent |
getComponent(int component)
Returns the component whose value is
component . |
int |
getExponent(int component,
int rLevel,
int subband)
Returns the exponent for the component
component , resolution
levelrLevel and subband subband . |
int |
getGuardBits(int component) |
int |
getIndex()
Returns the
index attribute. |
CADIPoint |
getIndexes()
Returns the indexes of the tile in terms of horizontal and vertical
position.
|
CADIPoint |
getLocation()
Returns the coordinates of the upper-left corner in the reference grid.
|
CADIPoint |
getLocation(int component)
Returns the upper-left corner of the tile within the domain of the image
component.
|
int |
getMantisa(int component,
int rLevel,
int subband)
Returns the mantisa for the component
component , resolution
levelrLevel and subband subband . |
int |
getNumLayers()
Returns the number of layers that this tile contains.
|
JPEG2KCodestream |
getParent()
Returns the
parent attribute. |
int |
getPrecinctHeights(int component,
int rLevel) |
int |
getPrecinctWidths(int component,
int rLevel) |
int |
getProgressionOrder() |
int |
getQuantizationStyle(int component) |
CADIDimension |
getSize()
Returns the size (width and height) of the tile in the reference grid.
|
CADIDimension |
getSize(int component)
Returns the size of the tile within the domain of the image component.
|
int |
getWTLevels(int component) |
int |
getWTType(int component) |
int |
getXRsize(int component)
Returns the horizontal separation of sample of component
component
with respect to the reference grid. |
int |
getYRsize(int component)
Returns the vertical separation of sample of component
component
with respect to the reference grid. |
boolean |
isBypass(int component)
Check if the bypass flag is active.
|
boolean |
isCausal(int component)
Check if the causal flag is active.
|
boolean |
isErterm(int component)
Check if the erterm flag is active.
|
boolean |
isReset(int component)
Check if the reset flag is active.
|
boolean |
isRestart(int component)
Check if the restart flag is active.
|
boolean |
isSegmark(int component)
Check if the segmark flag is active.
|
void |
list(java.io.PrintStream out)
Prints this JPEG2K Tile out to the specified output stream.
|
void |
removeAllComponents() |
void |
removeComponent(int component)
Removes a component from the tile.
|
java.lang.String |
toString() |
boolean |
useEPH()
Check if End of Packets Headers (EPH) are used.
|
boolean |
useSOP()
Check if Start of Packets (SOP) are used.
|
protected int index
Only positive values are allowed.
protected JPEG2KCodestream parent
It is useful to scan the tree structure from leaves to the root.
protected java.util.HashMap<java.lang.Integer,JPEG2KComponent> components
The key of the hash is the component index.
protected CODParameters codParameters
If this object is null
the parameters to be applied to this
tile are the default parameters for the codestream,
JPEG2KCodestream.codParameters
.
protected java.util.HashMap<java.lang.Integer,COCParameters> cocParametersList
If this object is null
the parameters to be applied to this
tile are the default parameters for the codestream,
JPEG2KCodestream.cocParametersList
.
protected QCDParameters qcdParameters
If this object is null
the parameters to be applied to this
tile are the default parameters for the codestream,
JPEG2KCodestream.qcdParameters
.
protected java.util.HashMap<java.lang.Integer,QCCParameters> qccParametersList
If this object is null
the parameters to be applied to this
tile are the default parameters for the codestream,
JPEG2KCodestream.qccParametersList
.
private CADIPoint indexes
It is used by the getIndexes()
method.
private CADIPoint location
It is used by the getLocation()
method.
private CADIRectangle bounds
It is computed by the getBounds()
method.
public JPEG2KTile(JPEG2KCodestream parent, int index)
public CADIPoint getIndexes()
public void createComponent(int component)
component
- definition in JPEG2KComponent.component
.public JPEG2KComponent getComponent(int component)
component
.component
- definition in JPEG2KComponent.component
.public void removeComponent(int component)
It also removes all resolution levels included in the component.
component
- definition in JPEG2KComponent.component
.public void removeAllComponents()
public CADIPoint getLocation()
public CADIDimension getSize()
public CADIRectangle getBounds()
public CADIPoint getLocation(int component)
component
- public CADIDimension getSize(int component)
component
- public CADIRectangle getBounds(int component)
component
- public JPEG2KCodestream getParent()
parent
attribute.parent
attribute.public int findComponent(long inClassIdentifier)
inClassIdentifier
- public int getXRsize(int component)
component
with respect to the reference grid.component
- definition in JPEG2KComponent.component
.public int getYRsize(int component)
component
with respect to the reference grid.component
- definition in JPEG2KComponent.component
.public int getWTLevels(int component)
component
- public int getWTType(int component)
component
- public boolean isBypass(int component)
component
- definition in JPEG2KComponent.component
.true
if bypass flag is active. Otherwise, returns false
.public boolean isReset(int component)
component
- definition in JPEG2KComponent.component
.true
if reset flag is active. Otherwise, returns false
.public boolean isRestart(int component)
component
- definition in JPEG2KComponent.component
.true
if restart flag is active. Otherwise, returns false
.public boolean isCausal(int component)
component
- definition in JPEG2KComponent.component
.true
if causal flag is active. Otherwise, returns false
.public boolean isErterm(int component)
component
- definition in JPEG2KComponent.component
.true
if erterm flag is active. Otherwise, returns false
.public boolean isSegmark(int component)
component
- definition in JPEG2KComponent.component
.true
if segmark flag is active. Otherwise, returns false
.public int getBlockHeight(int component)
component
- public int getBlockWidth(int component)
component
- public int getPrecinctHeights(int component, int rLevel)
component
- rLevel
- public int getPrecinctWidths(int component, int rLevel)
component
- rLevel
- public int getQuantizationStyle(int component)
component
- public int getExponent(int component, int rLevel, int subband)
component
, resolution
levelrLevel
and subband subband
.component
- rLevel
- subband
- public int getMantisa(int component, int rLevel, int subband)
component
, resolution
levelrLevel
and subband subband
.component
- rLevel
- subband
- public int getGuardBits(int component)
component
- public int getProgressionOrder()
public int getNumLayers()
public boolean useSOP()
true
if SOP are used. Otherwise, return false
.public boolean useEPH()
false
if EPH are used. Otherwise, return false
.public java.lang.String toString()
toString
in class java.lang.Object
public void list(java.io.PrintStream out)
out
- an output stream.
CADI - Copyright (C) 2007
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Group on Interactive Coding of Images (GICI) (contact)