public class JPEG2KResolutionLevel
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private CADIRectangle |
bounds
Bounds (location and size) of the resolution level within the
domain of the tile-component.
|
private int |
firstPrecinctIndex
Records the first precinct index for the tile-component-resolution level.
|
static int |
HH |
static int |
HL |
static int |
LH |
static int |
LL |
private CADIPoint |
location
Position (upper-left corner) of the resolution level within
the domain of the tile-component.
|
private int |
maxNumPrecincts |
protected JPEG2KComponent |
parent
Is a pointer to the parent.
|
protected java.util.HashMap<java.lang.Integer,JPEG2KPrecinct> |
precincts |
protected int |
rLevel
Records the component.
|
Constructor and Description |
---|
JPEG2KResolutionLevel(JPEG2KComponent parent,
int rLevel)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
createPrecinct(int index)
Creates a new precinct.
|
int |
getBlockHeight()
Returns the height of blocks.
|
CADIPoint |
getBlockIndexWithinPrecinct(int xBlock,
int yBlock)
Returns the code-block indexes within the precinct in which is located.
|
CADIDimension |
getBlockSize()
Returns the dimensions (width and height) of blocks.
|
CADIDimension |
getBlocksPerPrecinct()
Returns the number of blocks per precinct.
|
int |
getBlocksPerPrecinctHeights()
Returns the number of blocks per precinct.
|
int |
getBlocksPerPrecinctHigh()
Returns the number of blocks per precinct in the high direccion.
|
int |
getBlocksPerPrecinctWide()
Returns the number of blocks per precinct in the wide direccion.
|
int |
getBlocksPerPrecinctWidths()
Returns the number of blocks per precinct.
|
int |
getBlockWidth()
Returns the width of blocks.
|
CADIRectangle |
getBounds()
Returns the bounds (location and size) of the resolution level within the
domain of the tile-component.
|
int |
getExponent(int subband)
Returns the exponent value for the subband
subband . |
int |
getFirstPrecinctIndex()
Returns the first precinct index in the tile-component-resolution level.
|
long |
getInClassIdentifier(int precinctIndex)
Returns the unique precinct identifier.
|
CADIPoint |
getLocation()
Returns the position (upper-left corner) of the resolution level within
the domain of the tile-component.
|
int |
getMantisa(int subband)
Returns the value of the mantisa for the subband
subband . |
int |
getNumPrecincts()
Returns the number of precincts of the tile-component-resolution revel.
|
int |
getNumPrecinctsHeigh()
Returns the number of precincts in the height dimension.
|
int |
getNumPrecinctsWide()
Returns the number of precincts in the wide dimension.
|
int |
getNumSubbands()
Returns the number of subbands.
|
JPEG2KComponent |
getParent() |
JPEG2KPrecinct |
getPrecinct(int index)
Returns the precinct whose index in the tile-component-resollution level is
|
CADIRectangle |
getPrecinctBounds(int precinctIndex) |
int |
getPrecinctHeight() |
int |
getPrecinctIndex(int xBlock,
int yBlock)
Returns the precinct index in which the code-block defined by
xBlock
and yBlock indexes is located. |
CADIPoint |
getPrecinctLocation(int precinctIndex) |
CADIDimension |
getPrecinctSize(int precinctIndex) |
CADIDimension |
getPrecinctSizes() |
int |
getPrecinctWidth() |
int |
getResolutionLevel() |
CADIDimension |
getSize()
Returns the size of the resolution level within the domain of the
tile-component.
|
CADIRectangle |
getSubbandBounds(int subband)
Returns the bounds (location and size) of the subband within the
domain of the tile-component resolution level
|
CADIPoint |
getSubbandLocation(int subband)
Returns the location (upper-left corner) of the subband within the
domain of the tile-component resolution level
|
CADIDimension |
getSubbandSize(int subband)
Returns the size of the subband within the domain of the tile-component
resolution level.
|
boolean |
isPrecinct(int index)
Checks if the precinct whose index in the tile-component-resolution level
is
index has been created. |
void |
list(java.io.PrintStream out)
Prints this Server JPEG2K Tile out to the specified output stream.
|
void |
removeAllPrecincts()
Removes all precincts from the resolution level.
|
void |
removePrecinct(int index)
Removes a precicnt from the resolution level.
|
java.lang.String |
toString() |
protected int rLevel
Only positive values are allowed.
protected JPEG2KComponent parent
It is useful to scan the tree structure from leaves to the root.
protected java.util.HashMap<java.lang.Integer,JPEG2KPrecinct> precincts
public static final int LL
public static final int HL
public static final int LH
public static final int HH
private CADIPoint location
It is computed by the getLocation()
method.
private CADIRectangle bounds
It is computed by the getBounds()
method.
private int maxNumPrecincts
private int firstPrecinctIndex
public JPEG2KResolutionLevel(JPEG2KComponent parent, int rLevel)
public int getResolutionLevel()
public JPEG2KComponent getParent()
public void createPrecinct(int index)
index
- definition in JPEG2KPrecinct.precinctIndex
.java.lang.IllegalAccessException
public JPEG2KPrecinct getPrecinct(int index)
index
- definition in JPEG2KPrecinct.precinctIndex
.public void removePrecinct(int index)
index
- definition in JPEG2KPrecinct.precinctIndex
.public void removeAllPrecincts()
public boolean isPrecinct(int index)
index
has been created.index
- definition in JPEG2KPrecinct.precinctIndex
.true
if the precinct has been created. Otherwise,
returns false
.public long getInClassIdentifier(int precinctIndex)
JPIPMessageHeader.inClassIdentifier
..public int getPrecinctWidth()
public int getPrecinctHeight()
public CADIDimension getPrecinctSizes()
public CADIPoint getLocation()
public CADIDimension getSize()
public CADIRectangle getBounds()
public int getNumSubbands()
public CADIPoint getSubbandLocation(int subband)
public CADIDimension getSubbandSize(int subband)
subband
- public CADIRectangle getSubbandBounds(int subband)
public int getNumPrecinctsWide()
public int getNumPrecinctsHeigh()
public int getNumPrecincts()
public int getBlockWidth()
public int getBlockHeight()
public CADIDimension getBlockSize()
public CADIPoint getPrecinctLocation(int precinctIndex)
precinctIndex
- public CADIDimension getPrecinctSize(int precinctIndex)
precinctIndex
- public CADIRectangle getPrecinctBounds(int precinctIndex)
precinctIndex
- public int getBlocksPerPrecinctWidths()
TODO: Method name will be changed to getBlocksPerPrecinctWide
public int getBlocksPerPrecinctHeights()
TODO: Method name will be changed to getBlocksPerPrecinctHigh
public int getBlocksPerPrecinctWide()
public int getBlocksPerPrecinctHigh()
public CADIDimension getBlocksPerPrecinct()
public int getFirstPrecinctIndex()
public int getPrecinctIndex(int xBlock, int yBlock)
xBlock
and yBlock
indexes is located.xBlock
- yBlock
- public CADIPoint getBlockIndexWithinPrecinct(int xBlock, int yBlock)
xBlock
- yBlock
- public int getExponent(int subband)
subband
.public int getMantisa(int subband)
subband
.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)