|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCADI.Common.LogicalTarget.JPEG2000.Codestream.CodestreamIndexing
public class CodestreamIndexing
This class reads the image a store it in a concret structure to decompress. Usage example:
construct
run
get functions
| Field Summary | |
|---|---|
private int[][] |
blocksPerPrecinctHeights
Definition in GenerateImageStructure.blocksPerPrecinctHeights |
private int[][] |
blocksPerPrecinctWidths
Definition in GenerateImageStructure.blocksPerPrecinctWidths |
private CODParameters |
codParameters
Definition in CODParameters. |
private java.util.Hashtable<java.lang.Long,DataBinInfo> |
dataBins
This attribute is used to store information about the data-bins of the codestream. |
private int[][][][][][] |
imageStructure
Definition in GenerateImageStructure.imageStructure |
private BufferedDataInputStream |
in
Is an input stream from where data will be read. |
private PacketHeadersDecoder |
PkDeheading
Definition in PacketHeadersDecoder |
private boolean[][][] |
precinctRead
Indicates if a precinct has been writen in the file. |
private boolean |
readCodingPasses
Indicates whether the coding passes structure must be read. |
private SIZParameters |
sizParameters
Definition in SIZParameters. |
private int[][][] |
xNumBlocks
Number of blocks X for each component and resolution level and subband (needed to calculate the number of precincts widht and heights) |
private int[][][] |
yNumBlocks
number of blocks Y for each component and resolution level and subband (needed to calculate the number of precincts widht and heights) |
| Constructor Summary | |
|---|---|
CodestreamIndexing(BufferedDataInputStream in,
JPCParameters jpcParameters,
int[][][][][][] imageStructure,
int[][] blocksPerPrecinctWidths,
int[][] blocksPerPrecinctHeights)
Constructor |
|
| Method Summary | |
|---|---|
private void |
calculateNumBlocksPerPrecinct()
Calculate the number of blocks that there are per precinct |
private void |
CPRL()
Reads file using CPRL progression. |
java.util.Hashtable<java.lang.Long,DataBinInfo> |
getDataBins()
Returns the dataBins attribute. |
void |
list(java.io.PrintStream out)
Prints this Codestream Indexing fields out to the specified output stream. |
private void |
LRCP()
Reads file using LRCP progression. |
private int |
maxPrecinct()
Find the maximum precincts of all ressolution levels and all components |
private int |
maxRlevel()
Find the biggest ressolution level within all the components |
private int |
numPrecinctHighRlevel(int z,
int rLevel)
Find the hight precinct in function of one ressolution level |
private int |
numPrecinctWitdhRlevel(int z,
int rLevel)
Find the width precinct in function of one ressolution level |
private void |
PCRL()
Reads file using PCRL progression. |
private double |
precinctCorrespondenceX(int z,
int precinct,
int rLevel,
int maxRlevel)
Find the correspondence in width of a precinct |
private double |
precinctCorrespondenceY(int z,
int precinct,
int rLevel,
int maxRlevel)
Find the correspondence in hight of a precinct |
private int |
readByte()
Reads a byte from the file and returns its value. |
private void |
readCodingPassesStructure(long inClassIdentifier,
int rLevel,
int precinct,
int z,
int layerBegin,
int layerToWrite)
Read a precinct in a file up to the coding pass level. |
private void |
readPacketStructure(long inClassIdentifier,
int rLevel,
int precinct,
int z,
int layerBegin,
int layerToRead)
Read a precinct in a file up to the precinct level. |
private void |
readPrecinct(int rLevel,
int precinct,
int z,
int layerBegin,
int layerToRead)
Read a precinct in a file. |
private void |
readSOD()
Reads the SOD marker. |
private void |
readSOT()
Reads the SOT marker segment. |
private void |
RLCP()
Reads file using RLCP progression. |
private void |
RPCL()
Reads file using RPCL progression. |
void |
run()
Reads file with selected progression order. |
void |
setReadingCodingPasses(boolean readCodingPasses)
Sets the readCodingPasses attribute. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private SIZParameters sizParameters
SIZParameters.
private CODParameters codParameters
CODParameters.
private int[][] blocksPerPrecinctWidths
GenerateImageStructure.blocksPerPrecinctWidths
private int[][] blocksPerPrecinctHeights
GenerateImageStructure.blocksPerPrecinctHeights
private int[][][][][][] imageStructure
GenerateImageStructure.imageStructure
private PacketHeadersDecoder PkDeheading
PacketHeadersDecoder
private BufferedDataInputStream in
private java.util.Hashtable<java.lang.Long,DataBinInfo> dataBins
private boolean readCodingPasses
private boolean[][][] precinctRead
True or False
private int[][][] xNumBlocks
private int[][][] yNumBlocks
| Constructor Detail |
|---|
public CodestreamIndexing(BufferedDataInputStream in,
JPCParameters jpcParameters,
int[][][][][][] imageStructure,
int[][] blocksPerPrecinctWidths,
int[][] blocksPerPrecinctHeights)
throws ErrorException
in - definition in injpcParameters - definition in JPCParameters.imageStructure - definition in imageStructureblocksPerPrecinctWidths - definition in blocksPerPrecinctWidthsblocksPerPrecinctHeights - definition in blocksPerPrecinctHeights
ErrorException - when the file cannot be load| Method Detail |
|---|
public void setReadingCodingPasses(boolean readCodingPasses)
readCodingPasses attribute.
readCodingPasses - definition in readCodingPasses.
public void run()
throws ErrorException
ErrorException - when some error occurspublic java.util.Hashtable<java.lang.Long,DataBinInfo> getDataBins()
dataBins attribute.
dataBins attributepublic java.lang.String toString()
toString in class java.lang.Objectpublic void list(java.io.PrintStream out)
out - an output stream.
private int readByte()
throws ErrorException
ErrorException - when some wrong bitstream or I/O operation occurs
private void LRCP()
throws ErrorException
ErrorException - when the file cannot be load
private void RLCP()
throws ErrorException
ErrorException - when the file cannot be load
private void RPCL()
throws ErrorException
ErrorException - when the file cannot be load
private void PCRL()
throws ErrorException
ErrorException - when the file cannot be load
private void CPRL()
throws ErrorException
ErrorException - when the file cannot be load
private void readPrecinct(int rLevel,
int precinct,
int z,
int layerBegin,
int layerToRead)
throws ErrorException
rLevel - whichs belong the precinctprecinct - that will be written in filez - it refers to the component that belongs the precinctlayerBegin - it refers to the first layer to writelayerToRead - it refers to the number of layers to read
ErrorException - when the file cannot be load
private void readPacketStructure(long inClassIdentifier,
int rLevel,
int precinct,
int z,
int layerBegin,
int layerToRead)
throws ErrorException,
java.io.IOException
rLevel - whichs belong to the precinctprecinct - that will be written in filez - it refers to the component that belongs the precinctlayerBegin - it refers to the first layer to writelayerToRead - it refers to the number of layers to write
ErrorException - when the file cannot be load
java.io.IOException
private void readCodingPassesStructure(long inClassIdentifier,
int rLevel,
int precinct,
int z,
int layerBegin,
int layerToWrite)
throws ErrorException,
java.io.IOException
rLevel - whichs belong the precinctprecinct - that will be written in filez - it refers to the component that belongs the precinctlayerBegin - it refers to the first layer to writelayerToWrite - it refers to the number of layers to write
ErrorException - when the file cannot be load
java.io.IOException
private void readSOT()
throws ErrorException
ErrorException - when SOT marker segment is incorrect or tile options are not supported by BOI
private void readSOD()
throws ErrorException
ErrorException - when the SOD marker is incorrect
private int numPrecinctWitdhRlevel(int z,
int rLevel)
z - component to know the number of precinct widthrLevel - to know the number of precincts in width
private int numPrecinctHighRlevel(int z,
int rLevel)
z - component to know the number of precinct HighrLevel - to know the number of precincts in High
private double precinctCorrespondenceX(int z,
int precinct,
int rLevel,
int maxRlevel)
z - component to know the correspondenceprecinct - which to know the correspondence, always the biggest ressolution levelrLevel - to know the correspondencemaxRlevel -
private double precinctCorrespondenceY(int z,
int precinct,
int rLevel,
int maxRlevel)
z - component to know the correspondenceprecinct - which to knOw the correspondencerLevel - to know the correspondencemaxRlevel -
private int maxPrecinct()
private int maxRlevel()
private void calculateNumBlocksPerPrecinct()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||