Package gov.nih.mipav.model.file
Class TIFFLZWDecoder
java.lang.Object
gov.nih.mipav.model.file.TIFFLZWDecoder
A class for performing LZW decoding.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) int[]DOCUMENT ME!(package private) intDOCUMENT ME!(package private) intDOCUMENT ME!(package private) intDOCUMENT ME!(package private) byte[]DOCUMENT ME!(package private) intDOCUMENT ME!(package private) intDOCUMENT ME!(package private) intDOCUMENT ME!(package private) intDOCUMENT ME!(package private) intDOCUMENT ME!(package private) intDOCUMENT ME!(package private) byte[][]DOCUMENT ME!(package private) intDOCUMENT ME!(package private) byte[]DOCUMENT ME!(package private) intDOCUMENT ME! -
Constructor Summary
ConstructorsConstructorDescriptionTIFFLZWDecoder(int w, int predictor, int samplesPerPixel) Creates a new TIFFLZWDecoder object. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStringToTable(byte[] string) Add a new string to the string table.voidaddStringToTable(byte[] oldString, byte newString) Add a new string to the string table.byte[]composeString(byte[] oldString, byte newString) AppendnewStringto the end ofoldString.byte[]decode(byte[] data, byte[] uncompData, int h) Method to decode LZW compressed data.intReturns the next 9, 10, 11 or 12 bits.voidInitialize the string table.voidwriteString(byte[] string) Write out the string just uncompressed.
-
Field Details
-
andTable
int[] andTableDOCUMENT ME! -
bytePointer
int bytePointerDOCUMENT ME! -
bitPointer
int bitPointerDOCUMENT ME! -
data
byte[] dataDOCUMENT ME! -
uncompData
byte[] uncompDataDOCUMENT ME! -
dstIndex
int dstIndexDOCUMENT ME! -
nextBits
int nextBitsDOCUMENT ME! -
nextData
int nextDataDOCUMENT ME! -
predictor
int predictorDOCUMENT ME! -
samplesPerPixel
int samplesPerPixelDOCUMENT ME! -
stringTable
byte[][] stringTableDOCUMENT ME! -
tableIndex
int tableIndexDOCUMENT ME! -
bitsToGet
int bitsToGetDOCUMENT ME! -
w
int wDOCUMENT ME! -
h
int hDOCUMENT ME!
-
-
Constructor Details
-
TIFFLZWDecoder
public TIFFLZWDecoder(int w, int predictor, int samplesPerPixel) Creates a new TIFFLZWDecoder object.- Parameters:
w- DOCUMENT ME!predictor- DOCUMENT ME!samplesPerPixel- DOCUMENT ME!
-
-
Method Details
-
addStringToTable
public void addStringToTable(byte[] string) Add a new string to the string table.- Parameters:
string- DOCUMENT ME!
-
addStringToTable
public void addStringToTable(byte[] oldString, byte newString) Add a new string to the string table.- Parameters:
oldString- DOCUMENT ME!newString- DOCUMENT ME!
-
composeString
public byte[] composeString(byte[] oldString, byte newString) AppendnewStringto the end ofoldString.- Parameters:
oldString- DOCUMENT ME!newString- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
decode
public byte[] decode(byte[] data, byte[] uncompData, int h) Method to decode LZW compressed data.- Parameters:
data- The compressed data.uncompData- Array to return the uncompressed data in.h- The number of rows the compressed data contains.- Returns:
- DOCUMENT ME!
- Throws:
UnsupportedOperationException- DOCUMENT ME!
-
getNextCode
public int getNextCode()Returns the next 9, 10, 11 or 12 bits.- Returns:
- DOCUMENT ME!
-
initializeStringTable
public void initializeStringTable()Initialize the string table. -
writeString
public void writeString(byte[] string) Write out the string just uncompressed.- Parameters:
string- DOCUMENT ME!
-