public class TagTreeEncoder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
cols
Number of columns
Negative values are not allowed
|
private int |
levels
Number of levels
Negative values are not allowed
|
private int |
rows
Number of rows
Negative values are not allowed
|
private int[][][] |
states
Tag Tree States.
|
private int[][][] |
tagTree
Tag Tree values.
|
Constructor and Description |
---|
TagTreeEncoder(int[][] matrix)
Constructor with a matrix.
|
TagTreeEncoder(int rows,
int cols)
Constructor with an empty matrix.
|
Modifier and Type | Method and Description |
---|---|
void |
encoder(PacketHeaderDataOutputStream packetHeaderDataOutputStream,
int t,
int m,
int n)
Encode a value of the matrix.
|
void |
list(java.io.PrintStream out)
Prints this Tag Tree out to the specified output stream.
|
void |
reset()
Sets attributes to its initial values;
|
java.lang.String |
toString() |
private int levels
Negative values are not allowed
private int rows
Negative values are not allowed
private int cols
Negative values are not allowed
private int[][][] tagTree
Negative values are not allowed
private int[][][] states
Negative values are not allowed
public TagTreeEncoder(int rows, int cols) throws ErrorException
rows
- matrix rowscols
- matrix columnsErrorException
- when rows or cols are negativepublic TagTreeEncoder(int[][] matrix) throws ErrorException
matrix
- matrix to codeErrorException
- when rows or cols are negativepublic void encoder(PacketHeaderDataOutputStream packetHeaderDataOutputStream, int t, int m, int n) throws ErrorException, java.io.IOException
packetHeaderDataOutputStream
- data output stream.t
- thresholdm
- row of the value to be codedn
- column of the value to be codedErrorException
- when invalid dimensions are passedjava.io.IOException
public void reset()
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)