C# (CSharp) CSJ2K.j2k.codestream.writer Пространство имен

Классы

Имя Описание
FileCodestreamWriter This class implements a CodestreamWriter for Java streams. The streams can be files or network connections, or any other resource that presents itself as a OutputStream. See the CodestreamWriter abstract class for more details on the implementation of the CodestreamWriter abstract class.

Before any packet data is written to the bit stream (even in simulation mode) the complete header should be written otherwise incorrect estimates are given by getMaxAvailableBytes() for rate allocation.

HeaderEncoder 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.

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.

PktEncoder This 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.