|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCADI.Server.LogicalTarget.JPEG2000.Codestream.JPCMainHeaderEncoder
public class JPCMainHeaderEncoder
This class generates the JPC headers from the JPEG2000 parameters. Usage example:
construct
run
| Field Summary | |
|---|---|
private CODParameters |
codParameters
Definition in CODParameters. |
private boolean[] |
definedPrecincts
Tells if precincts are defined within the headers or not. |
private BufferedDataOutputStream |
headerStream
Contains headers of the JPC file. |
private QCDParameters |
qcdParameters
Definition in QCDParameters. |
private SIZParameters |
sizParameters
Definition in SIZParameters. |
private int[] |
tileParts
Number of tile-parts in each tile. |
| Fields inherited from interface CADI.Common.LogicalTarget.JPEG2000.Codestream.JPCMarkers |
|---|
COC, COD, COM, CRG, EOC, EPH, PLM, PLT, POC, PPM, PPT, QCC, QCD, RGN, SIZ, SOC, SOD, SOP, SOT, TLM |
| Constructor Summary | |
|---|---|
JPCMainHeaderEncoder(SIZParameters sizParameters,
CODParameters codParameters,
QCDParameters qcdParameters)
Constructor of JPCMainHeaderEncoder. |
|
| Method Summary | |
|---|---|
byte[] |
getMainHeader()
Returns the headerStream attribute as a byte array. |
void |
list(java.io.PrintStream out)
Prints this JPC Main Header Encoder out to the specified output stream. |
private boolean |
neddedCOC(int component)
To know if a COC marker segment is needed for a specific component. |
private boolean |
neddedQCC(int component)
To know if a QCC marker segment is needed for a specific component. |
byte[] |
run()
Generates the JPC file headers. |
java.lang.String |
toString()
|
private void |
writeCOC(int z)
Generates the COC marker segment, COC has the coding style for a specific component. |
private void |
writeCOD()
Generates the COD marker segment COD has the default coding style for all components; first component is considered to have the default values. |
private void |
writePrecinctSizes(int z)
Recives the COD or COC BitStream marker and fill it with the precinct Sizes |
private void |
writeQCC(int z)
Generates the QCC marker segment, QCC has the quantization parameters for a specific component. |
private void |
writeQCD()
Generates the QCD marker segment, QCD has the default quantization parameters for all components. |
private void |
writeQuantization(int z)
Recives the COD or COC BitStream marker and fill it with the precinct Sizes |
private void |
writeSIZ()
Generates the SIZ marker segment. |
| 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 QCDParameters qcdParameters
QCDParameters.
private BufferedDataOutputStream headerStream
private boolean[] definedPrecincts
private int[] tileParts
Values must be between 0 - 254.
| Constructor Detail |
|---|
public JPCMainHeaderEncoder(SIZParameters sizParameters,
CODParameters codParameters,
QCDParameters qcdParameters)
sizParameters - definition in
SIZParameters.codParameters - definition in
CODParameters.qcdParameters - definition in
QCDParameters.| Method Detail |
|---|
public byte[] run()
throws WarningException,
java.io.IOException
WarningException - when the header cannot be generated
java.io.IOExceptionpublic byte[] getMainHeader()
headerStream attribute as a byte array.
headerStream as a byte array.public java.lang.String toString()
toString in class java.lang.Objectpublic void list(java.io.PrintStream out)
out - an output stream.
private void writeSIZ()
throws WarningException,
java.io.IOException
WarningException - when the header cannot be generated
java.io.IOException - when an I/O error has occurred.
private void writeCOD()
throws WarningException,
java.io.IOException
WarningException - when COD marker segment cannot be generated due to CADI options
java.io.IOException - when an I/O error has occurred.
private void writeCOC(int z)
throws WarningException,
java.io.IOException
z - image component
WarningException - when COC marker segment cannot be generated due to BOI options
java.io.IOException - when an I/O error has occurred.
private void writePrecinctSizes(int z)
throws WarningException,
java.io.IOException
z - image component
WarningException - when COD or COC marker segment cannot be generated due to CADI options
java.io.IOException - when an I/O error has occurred.
private void writeQCD()
throws WarningException,
java.io.IOException
WarningException - when QCD marker segment cannot be generated due to CADI options
java.io.IOException - when an I/O error has occurred.
private void writeQCC(int z)
throws WarningException,
java.io.IOException
z - image component
WarningException - when QCC marker segment cannot be generated due to CADI options
java.io.IOException - when an I/O error has occurred.
private void writeQuantization(int z)
throws WarningException,
java.io.IOException
z - image component
WarningException - when COD or COC marker segment cannot be generated due to CADI options
java.io.IOException - when an I/O error has occurred.private boolean neddedCOC(int component)
component - image component
private boolean neddedQCC(int component)
component - image component
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||