public class CodestreamIndexing
extends java.lang.Object
Usage example:
construct
run
get functions
Modifier and Type | Field and Description |
---|---|
private JPEG2KCodestream |
codestream |
private JPEG2KComponent |
componentObj |
private BufferedDataInputStream |
in
Is an input stream from where data will be read.
|
PacketHeaderIndexTable |
phix |
private PacketHeadersDecoder |
PkDeheading
Definition in
PacketHeadersDecoder |
PrecinctPacketIndexTable |
ppix |
private boolean |
readCodingPasses
Indicates whether the coding passes structure must be read.
|
private JPEG2KResolutionLevel |
rLevelObj |
TileHeaderIndexTable |
thix |
private JPEG2KTile |
tileObj |
TilePartIndexTable |
tpix |
Constructor and Description |
---|
CodestreamIndexing(BufferedDataInputStream in,
ServerJPEG2KCodestream codestream)
Constructor
|
Modifier and Type | Method and Description |
---|---|
private void |
CPRL()
Reads tile using CPRL progression.
|
PacketHeaderIndexTable |
getPacketHeaderIndexTable() |
PrecinctPacketIndexTable |
getPrecinctPacketIndexTable() |
TileHeaderIndexTable |
getTileHeaderIndexTable() |
TilePartIndexTable |
getTilePartIndexTable() |
void |
list(java.io.PrintStream out)
Prints this Codestream Indexing fields out to the specified output
stream.
|
private void |
LRCP()
Reads a tile using LRCP progression.
|
private int |
maxPrecinct()
Find the maximum precincts of all ressolution levels and all components
|
private int |
maxRlevel()
Find the biggest resolution level within all the components
|
private int |
numMaxPrecinctsHeigh()
Finds the maximum number of precincts in the heigh dimension across all
components.
|
private int |
numMaxPrecinctsWide()
Finds the maximum number of precincts in the wide dimension across all
components.
|
private void |
PCRL()
Reads a tile 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 startLayer,
int numLayers)
Read a precinct in a file up to the coding pass level.
|
private void |
readPacketStructure(long inClassIdentifier,
int startLayer,
int numLayers)
Read a precinct from a file.
|
private void |
readPrecinct(JPEG2KPrecinct precinctObj,
int startLayer,
int numLayers)
Read a precinct from a file.
|
private void |
readSOD()
Reads the SOD marker.
|
private void |
readSOT()
Reads the SOT marker segment.
|
private void |
readTilePartHeader() |
private void |
RLCP()
Reads a tile using RLCP progression.
|
private void |
RPCL()
Reads a tile using RPCL progression.
|
void |
run()
Reads file with selected progression order.
|
void |
setReadingCodingPasses(boolean readCodingPasses)
Sets the
readCodingPasses attribute. |
java.lang.String |
toString() |
private JPEG2KCodestream codestream
private JPEG2KTile tileObj
private JPEG2KComponent componentObj
private JPEG2KResolutionLevel rLevelObj
private PacketHeadersDecoder PkDeheading
PacketHeadersDecoder
private BufferedDataInputStream in
private boolean readCodingPasses
public TilePartIndexTable tpix
public TileHeaderIndexTable thix
public PrecinctPacketIndexTable ppix
public PacketHeaderIndexTable phix
public CodestreamIndexing(BufferedDataInputStream in, ServerJPEG2KCodestream codestream) throws ErrorException
in
- definition in in
codestream
- ErrorException
- when the file cannot be loaded.public void setReadingCodingPasses(boolean readCodingPasses)
readCodingPasses
attribute.readCodingPasses
- definition in readCodingPasses
.public void run() throws ErrorException
ErrorException
- when some error occurspublic TilePartIndexTable getTilePartIndexTable()
public TileHeaderIndexTable getTileHeaderIndexTable()
public PrecinctPacketIndexTable getPrecinctPacketIndexTable()
public PacketHeaderIndexTable getPacketHeaderIndexTable()
public java.lang.String toString()
toString
in class java.lang.Object
public void list(java.io.PrintStream out)
out
- an output stream.private int readByte() throws ErrorException
ErrorException
- when some wrong bitstream or I/O operation occursprivate void LRCP() throws ErrorException
ErrorException
- when the file cannot be loadprivate void RLCP() throws ErrorException
ErrorException
- when the file cannot be loadprivate void RPCL() throws ErrorException
ErrorException
- when the file cannot be loadprivate void PCRL() throws ErrorException
ErrorException
- when the file cannot be loadprivate void CPRL() throws ErrorException
ErrorException
- when the file cannot be loadprivate void readPrecinct(JPEG2KPrecinct precinctObj, int startLayer, int numLayers) throws ErrorException
inClassIdentifier
- is the precinct identifier.startLayer
- it refers to the first layer to be read.numLayers
- it refers to the number of layers to read.ErrorException
- when the file cannot be read correctly.private void readPacketStructure(long inClassIdentifier, int startLayer, int numLayers) throws ErrorException, java.io.IOException
inClassIdentifier
- is the precinct identifier.startLayer
- it refers to the first layer to be read.numLayers
- it refers to the number of layers to read.ErrorException
- when the file cannot be read correctly.java.io.IOException
private void readCodingPassesStructure(long inClassIdentifier, int startLayer, int numLayers) 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 writeErrorException
- when the file cannot be loadjava.io.IOException
private void readTilePartHeader() throws ErrorException
ErrorException
private void readSOT() throws ErrorException
ErrorException
- when SOT marker segment is incorrect or tile options are not supported by BOIprivate void readSOD() throws ErrorException
ErrorException
- when the SOD marker is incorrectprivate int numMaxPrecinctsWide()
private int numMaxPrecinctsHeigh()
private int maxPrecinct()
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 resolution 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 maxRlevel()
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)