|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCADI.Common.LogicalTarget.JPEG2000.Codestream.TagTreeDecoder
public class TagTreeDecoder
This class implements a tag tree decoder. A tag tree is an efficient way to code a 2D matrix.
Usage: example:
| Field Summary | |
|---|---|
private int |
cols
Number of columns Negative values are not allowed |
private int |
levels
Number of levels Negative values are not allowed |
private PacketHeaderDataInputStream |
PHDataInputStream
Is an input stream where the bit will be read from. |
private int |
rows
Number of rows Negative values are not allowed |
private int[][][] |
states
Tag Tree States. |
private int[][][] |
tagTree
Tag Tree values. |
| Constructor Summary | |
|---|---|
TagTreeDecoder(int rows,
int cols)
Constructor |
|
| Method Summary | |
|---|---|
int |
Decoder(int t,
int m,
int n,
PacketHeaderDataInputStream PHDataInputStream)
Decode a value of the matrix |
private int |
getBit()
Returns the bit readed from the file. |
int |
getValue(int m,
int n)
|
void |
list(java.io.PrintStream out)
Prints this Tag Tree out to the specified output stream. |
void |
reset()
Sets the state and tagTree internal
attributes to its initial values. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private int rows
private int cols
private PacketHeaderDataInputStream PHDataInputStream
private int levels
private int[][][] tagTree
private int[][][] states
| Constructor Detail |
|---|
TagTreeDecoder(int rows,
int cols)
rows - matrix rowscols - matrix columns
ErrorException - when a codeblock row or column values are wrong| Method Detail |
|---|
public int Decoder(int t,
int m,
int n,
PacketHeaderDataInputStream PHDataInputStream)
throws java.io.EOFException,
java.io.IOException
t - thresholdm - coordintes of the value to codifyn - coordintes of the value to codifyPHDataInputStream - data input stream with the packet header.
ErrorException - when codeblock coordinates are wrong or the bitstream is insuficient for decoding the tag tree information
java.io.EOFException
java.io.IOExceptionpublic void reset()
state and tagTree internal
attributes to its initial values.
public int getValue(int m,
int n)
throws ErrorException
m - coordinates of the value to codifyn - coordinates of the value to codify
ErrorException - when the codeblock coordinates are wrongpublic java.lang.String toString()
toString in class java.lang.Objectpublic void list(java.io.PrintStream out)
out - an output stream.
private int getBit()
throws java.io.EOFException,
java.io.IOException
java.io.EOFException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||