[]
This class writes almost of the markers and marker segments in main header and in tile-part headers. It is created by the run() method of the Encoder instance.
<p>A marker segment includes a marker and eventually marker segment
parameters. It is designed by the three letter code of the marker
associated with the marker segment. JPEG 2000 part I defines 6 types of
markers:
<ul><li>Delimiting : SOC,SOT,SOD,EOC (written in FileCodestreamWriter).</li><li>Fixed information: SIZ.</li><li>Functional: COD,COC,RGN,QCD,QCC,POC.</li><li> In bit-stream: SOP,EPH.</li><li> Pointer: TLM,PLM,PLT,PPM,PPT.</li><li> Informational: CRG,COM.</li></ul></p><p>Main Header is written when Encoder instance calls encodeMainHeader
whereas tile-part headers are written when the EBCOTRateAllocator instance
calls encodeTilePartHeader.</p>
public class HeaderEncoder
Name | Description |
---|---|
HeaderEncoder(ImgData, bool[], ForwardWT, Tiler, EncoderSpecs, ROIScaler, PostCompRateAllocator, ParameterList) | Initializes the header writer with the references to the coding chain. |
Name | Description |
---|---|
OPT_PREFIX | The prefix for the header encoder options: 'H' |
baos | The ByteArrayOutputStream to store header data. This handler is kept in order to use methods not accessible from a general DataOutputStream. For the other methods, it's better to use variable hbuf. |
dwt | Reference to the DWT module |
encSpec | The encoder specifications |
hbuf | The DataOutputStream to store header data. This kind of object is useful to write short, int, .... It's constructor takes baos as parameter. |
isOrigSig | An array specifying, for each component,if the data was signed or not |
origSrc | The image data reader. Source of original data info |
ralloc | Reference to the rate allocator |
roiSc | Reference to the ROI module |
tiler | Reference to the tiler module |
Name | Description |
---|---|
Buffer | Returns the byte-buffer used to store the codestream header. |
BufferLength | Returns the number of bytes used in the codestream header's buffer. |
Length | Returns the length of the header. |
ParameterInfo | Returns the parameters that are used in this class and implementing classes. It returns a 2D String array. Each of the 1D arrays is for a different option, and they have 3 elements. The first element is the option name, the second one is the synopsis, the third one is a long description of what the parameter is and the fourth is its default value. The synopsis or description may be 'null', in which case it is assumed that there is no synopsis or description of the option, respectively. Null may be returned if no options are supported. |
Name | Description |
---|---|
encodeMainHeader() | Write main header. JJ2000 main header corresponds to the following sequence of marker segments:
|
encodeTilePartHeader(int, int) | Writes tile-part header. JJ2000 tile-part header corresponds to the following sequence of marker segments:
|
reset() | Resets the contents of this HeaderEncoder to its initial state. It erases all the data in the header buffer and reactualizes the headerLength field of the bit stream writer. |
writeCOC(bool, int, int) | Writes COC marker segment . It is a functional marker containing the coding style for one component (coding style, decomposition, layering).
|
writeCOD(bool, int) | Writes COD marker segment. COD is a functional marker segment containing the code style default (coding style, decomposition, layering) used for compressing all the components in an image.
|
writeMainQCC(int) | Writes QCC marker segment in main header. It is a functional marker segment countaining the quantization used for compressing the specified component in an image. The values override for the specified component what was defined by a QCC marker in either the main or the tile header. |
writeMainQCD() | Writes QCD marker segment in main header. QCD is a functional marker segment countaining the quantization default used for compressing all the components in an image. The values can be overriden for an individual component by a QCC marker in either the main or the tile header. |
writePOC(bool, int) | Writes POC marker segment. POC is a functional marker segment containing the bounds and progression order for any progression order other than default in the codestream. |
writeTileQCC(int, int) | Writes QCC marker segment in tile header. It is a functional marker segment countaining the quantization used for compressing the specified component in an image. The values override for the specified component what was defined by a QCC marker in either the main or the tile header. |
writeTileQCD(int) | Writes QCD marker segment in tile header. QCD is a functional marker segment countaining the quantization default used for compressing all the components in an image. The values can be overriden for an individual component by a QCC marker in either the main or the tile header. |
writeTo(BinaryDataOutput) | Writes the header to the specified BinaryDataOutput. |
writeTo(Stream) | Writes the header to the specified OutputStream. |