public class JPEG2KPrecinct
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected long |
inClassIdentifier
Definition in
JPIPMessageHeader.inClassIdentifier . |
private int[] |
numBlocksHigh |
private int[] |
numBlocksWide
Records the number of blocks in the wide dimension.
|
protected JPEG2KResolutionLevel |
parent
Is a pointer to the parent.
|
protected int |
precinctIndex
Records the precinctIndex.
|
Constructor and Description |
---|
JPEG2KPrecinct(JPEG2KResolutionLevel parent,
int precinctIndex)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getBlockHeight(int subband,
int yBlock,
int xBlock)
Computes the high of the block (
yBlock ,xBlock )
in the subband subband . |
CADIDimension |
getBlockSize(int subband,
int yBlock,
int xBlock)
Returns the real size of the block considering the bounds of the subband
and precinct in which it is.
|
int |
getBlockWidth(int subband,
int yBlock,
int xBlock)
Computes the wide of the block (
yBlock ,xBlock )
in the subband subband . |
CADIRectangle |
getBounds() |
int |
getComponent()
Returns the component which the precinct belongs.
|
JPEG2KComponent |
getComponentObj() |
long |
getInClassIdentifier()
Returns the
inClassIdentifier attribute. |
int |
getIndex()
Returns the
precinctIndex attribute. |
CADIDimension |
getNumBlocks(int subband)
Returns the number of blocks (in wide and high) belonging to this precinct.
|
int |
getNumBlocksHigh(int subband) |
int |
getNumBlocksWide(int subband) |
int |
getNumSubbands()
Returns the number of subbands.
|
JPEG2KResolutionLevel |
getParent() |
int |
getResolutionLevel()
Returns the resolution level which the precinct belongs.
|
JPEG2KResolutionLevel |
getResolutionLevelObj() |
int |
getTile()
Returns the tile which the precinct belongs.
|
JPEG2KTile |
getTileObj() |
void |
list(java.io.PrintStream out)
Prints this JPEG2K Precinct out to the specified output stream.
|
void |
reset()
Sets attributes to their initial values
|
java.lang.String |
toString() |
protected int precinctIndex
Only positive values are allowed.
protected long inClassIdentifier
JPIPMessageHeader.inClassIdentifier
.protected JPEG2KResolutionLevel parent
It is useful to scan the tree structure from leaves to the root.
private int[] numBlocksWide
Used and computed by the getNumBlocksWide(int)
method.
private int[] numBlocksHigh
public JPEG2KPrecinct(JPEG2KResolutionLevel parent, int precinctIndex)
parent
- precinctIndex
- public int getIndex()
precinctIndex
attribute.precinctIndex
attribute.public JPEG2KResolutionLevel getParent()
public long getInClassIdentifier()
inClassIdentifier
attribute.inClassIdentifier
attribute.public void reset()
public CADIRectangle getBounds()
public int getNumSubbands()
public int getNumBlocksWide(int subband)
subband
- a subband name. Allowed values are
JPEG2KResolutionLevel.LL
,
JPEG2KResolutionLevel.HL
JPEG2KResolutionLevel.LH
JPEG2KResolutionLevel.HH
.public int getNumBlocksHigh(int subband)
subband
- a subband name. Allowed values are
JPEG2KResolutionLevel.LL
,
JPEG2KResolutionLevel.HL
JPEG2KResolutionLevel.LH
JPEG2KResolutionLevel.HH
.public CADIDimension getNumBlocks(int subband)
subband
- public int getBlockWidth(int subband, int yBlock, int xBlock)
yBlock
,xBlock
)
in the subband subband
.subband
- yBlock
- xBlock
- public int getBlockHeight(int subband, int yBlock, int xBlock)
yBlock
,xBlock
)
in the subband subband
.subband
- yBlock
- xBlock
- public CADIDimension getBlockSize(int subband, int yBlock, int xBlock)
subband
- yBlock
- xBlock
- public int getTile()
public int getComponent()
public int getResolutionLevel()
public JPEG2KTile getTileObj()
public JPEG2KComponent getComponentObj()
public JPEG2KResolutionLevel getResolutionLevelObj()
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)