|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCADI.Common.LogicalTarget.JPEG2000.Codestream.JPCMainHeaderDecoder
public class JPCMainHeaderDecoder
This class reads the JPEG2000 code-stream main header and decodes it. An input stream object is passed to, and it reads the global information neccesary to decompress the image.
| Field Summary | |
|---|---|
(package private) int[] |
definedPrecincts
Tells if precincts are defined within the headers or not (1 or 0). |
private BufferedDataInputStream |
in
Is an object with the input stream where the main header is read from. |
private JPCParameters |
jpcParameters
Is an object where the main header are saved. |
private long |
mainHeaderInitialPos
Is the file pointer to the first byte of the main header. |
private int |
mainHeaderLength
Is the length of the main header. |
(package private) boolean |
markerFound
To know if a marker has been found. |
| Constructor Summary | |
|---|---|
JPCMainHeaderDecoder(BufferedDataInputStream in)
|
|
| Method Summary | |
|---|---|
JPCParameters |
getJPCParameters()
This function returns the JPC codestream parameters. |
long |
getMainHeaderInitialPos()
Returns the first position of the main header first byte in the image codestream. |
int |
getMainHeaderLength()
Returns the length of the main header. |
private void |
readCBD()
|
private void |
readCOC()
Reads a COD/COC marker segment and retrieves the parameters contained. |
private void |
readCOD()
Reads a COD marker segment and retrieves the parameters contained. |
void |
readCOM()
|
private void |
readMCC()
Reads the MCC marker. |
private void |
readMCO()
Reads the MCO marker. |
private void |
readMCT()
|
private void |
readQCC()
Reads a QCD/QCC marker segment and retrieves the parameters contained. |
private void |
readQCD()
Reads a QCD/QCC marker segment and retrieves the parameters contained. |
private void |
readSIZ()
Reads the SIZ marker segment and retrieves the parameters contained. |
private void |
readSOC()
Reads the SOC marker. |
void |
run()
Reads the J2C file headers and retrieves the parameters contained. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private BufferedDataInputStream in
private JPCParameters jpcParameters
private long mainHeaderInitialPos
private int mainHeaderLength
int[] definedPrecincts
Index in the array is component index
boolean markerFound
| Constructor Detail |
|---|
public JPCMainHeaderDecoder(BufferedDataInputStream in)
in - | Method Detail |
|---|
public void run()
throws ErrorException
ErrorException - when the header information is ambiguous or incorrectpublic long getMainHeaderInitialPos()
public int getMainHeaderLength()
public JPCParameters getJPCParameters()
JPCParameters
private void readSOC()
throws ErrorException,
java.io.IOException
ErrorException - when the SOC marker is not unique in the codestream
java.io.IOException
private void readSIZ()
throws ErrorException,
java.io.IOException
ErrorException - when the SIZ marker or its marker segment is ambiguous or incorrect
java.io.IOException
private void readCOD()
throws ErrorException,
java.io.IOException
ErrorException - when the COD marker segment is ambiguous or incorrect
java.io.IOException
private void readCOC()
throws ErrorException,
java.io.IOException
ErrorException - when the COD/COC marker segment is ambiguous or incorrect
java.io.IOException
private void readQCD()
throws ErrorException,
java.io.IOException
ErrorException - when the QCD/QCC marker segment is ambiguous or incorrect
java.io.IOException
private void readQCC()
throws ErrorException,
java.io.IOException
ErrorException - when the QCD/QCC marker segment is ambiguous or incorrect
java.io.IOException
public void readCOM()
throws ErrorException,
java.io.IOException
ErrorException
java.io.IOException
private void readCBD()
throws ErrorException,
java.io.IOException
ErrorException
java.io.IOException
private void readMCT()
throws ErrorException,
java.io.IOException
ErrorException
java.io.IOException
private void readMCC()
throws ErrorException,
java.io.IOException
ErrorException
java.io.IOException
private void readMCO()
throws ErrorException,
java.io.IOException
ErrorException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||