ComponentOne PdfViewer for WPF and Silverlight
C1.WPF.PdfViewer.4.6.2 Assembly / CSJ2K.j2k.codestream.writer Namespace
Inheritance Hierarchy
In This Topic
    CSJ2K.j2k.codestream.writer Namespace
    In This Topic
    Classes
     ClassDescription
    Class 
    ClassThis is the abstract class for writing to a codestream. A codestream corresponds to headers (main and tile-parts) and packets. Each packet has a head and a body. The codestream always has a maximum number of bytes that can be written to it. After that many number of bytes no more data is written to the codestream but the number of bytes is counted so that the value returned by getMaxAvailableBytes() is negative. If the number of bytes is unlimited a ridicoulosly large value, such as Integer.MAX_VALUE, is equivalent.

    Data writting to the codestream can be simulated. In this case, no byto is effectively written to the codestream but the resulting number of bytes is calculated and returned (although it is not accounted in the bit stream). This can be used in rate control loops.

    Implementing classes should write the header of the bit stream before writing any packets. The bit stream header can be written with the help of the HeaderEncoder class.

    Class 
    ClassThis 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.

    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:

    • Delimiting : SOC,SOT,SOD,EOC (written in FileCodestreamWriter).
    • Fixed information: SIZ.
    • Functional: COD,COC,RGN,QCD,QCC,POC.
    • In bit-stream: SOP,EPH.
    • Pointer: TLM,PLM,PLT,PPM,PPT.
    • Informational: CRG,COM.

    Main Header is written when Encoder instance calls encodeMainHeader whereas tile-part headers are written when the EBCOTRateAllocator instance calls encodeTilePartHeader.

    ClassThis class builds packets and keeps the state information of packet interdependencies. It also supports saving the state and reverting (restoring) to the last saved state, with the save() and restore() methods.

    Each time the encodePacket() method is called a new packet is encoded, the packet header is returned by the method, and the packet body can be obtained with the getLastBodyBuf() and getLastBodyLen() methods.

    ClassThis class implements the tag tree encoder. A tag tree codes a 2D matrix of integer elements in an efficient way. The encoding procedure 'encode()' codes information about a value of the matrix, given a threshold. The procedure encodes the sufficient information to identify whether or not the value is greater than or equal to the threshold.

    The tag tree saves encoded information to a BitOutputBuffer.

    A particular and useful property of tag trees is that it is possible to change a value of the matrix, provided both new and old values of the element are both greater than or equal to the largest threshold which has yet been supplied to the coding procedure 'encode()'. This property can be exploited through the 'setValue()' method.

    This class allows saving the state of the tree at any point and restoring it at a later time, by calling save() and restore().

    A tag tree can also be reused, or restarted, if one of the reset() methods is called.

    The TagTreeDecoder class implements the tag tree decoder.

    Tag trees that have one dimension, or both, as 0 are allowed for convenience. Of course no values can be set or coded in such cases.

    See Also