ComponentOne PdfViewer for WPF and Silverlight
C1.WPF.PdfViewer.4.6.2 Assembly / CSJ2K.j2k.codestream.writer Namespace / PktEncoder Class
Fields Properties Methods


In This Topic
    PktEncoder Class Members
    In This Topic

    The following tables list the members exposed by PktEncoder.

    Public Constructors
     NameDescription
    Public ConstructorCreates a new packet encoder object, using the information from the 'infoSrc' object.  
    Top
    Public Fields
     NameDescription
    Public FieldThe prefix for packet encoding options: 'P'  
    Top
    Public Properties
     NameDescription
    Public PropertyReturns the buffer of the body of the last encoded packet. The length of the body can be retrieved with the getLastBodyLen() method. The length of the array returned by this method may be larger than the actual body length.  
    Public PropertyReturns the length of the body of the last encoded packet, in bytes. The body itself can be retrieved with the getLastBodyBuf() method.  
    Public PropertyReturns true if the current packet is writable i.e. should be written. Returns false otherwise.  
    Public Propertystatic (Shared in Visual Basic)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.  
    Public PropertyTells if there was ROI information in the last written packet  
    Public PropertyGives the length to read in current packet body to get all ROI information  
    Top
    Public Methods
     NameDescription
    Public MethodEncodes a packet and returns the buffer containing the encoded packet header. The code-blocks appear in a 3D array of CBlkRateDistStats, 'cbs'. The first index is the tile index in lexicographical order, the second index is the subband index (as defined in the Subband class), and the third index is the code-block index (whithin the subband tile) in lexicographical order as well. The indexes of the new truncation points for each code-block are specified by the 3D array of int 'tIndx'. The indices of this array are the same as for cbs. The truncation point indices in 'tIndx' are the indices of the elements of the 'truncIdxs' array, of the CBlkRateDistStats class, that give the real truncation points. If a truncation point index is negative it means that the code-block has not been included in any layer yet. If the truncation point is less than or equal to the highest truncation point used in previous layers then the code-block is not included in the packet. Otherwise, if larger, the code-block is included in the packet. The body of the packet can be obtained with the getLastBodyBuf() and getLastBodyLen() methods.

    Layers must be coded in increasing order, in consecutive manner, for each tile, component and resolution level (e.g., layer 1, then layer 2, etc.). For different tile, component and/or resolution level no particular order must be followed.

     
    Public MethodReturns information about a given precinct  
    Public MethodResets the state of the object to the initial state, as if the object was just created.  
    Public MethodRestores the last saved state of this object. An IllegalArgumentException is thrown if no state has been saved.  
    Public MethodSaves the current state of this object. The last saved state can be restored with the restore() method.  
    Top
    See Also