[]
        
(Showing Draft Content)

CSJ2K.j2k.roi.encoder.ROIScaler

ROIScaler Class

Inheritance
ROIScaler
Namespace: CSJ2K.j2k.roi.encoder
Assembly: C1.WPF.PdfViewer.4.6.2.dll
Syntax
public class ROIScaler : ImgDataAdapter, CBlkQuantDataSrcEnc, ForwWTDataProps, ImgData

Constructors

Name Description
ROIScaler(Quantizer, ROIMaskGenerator, bool, int, bool, EncoderSpecs)

Constructor of the ROI scaler, takes a Quantizer as source of data to scale.

Fields

Name Description
OPT_PREFIX

The prefix for ROI Scaler options: 'R'

Properties

Name Description
BlockAligned

This function returns the blockAligned flag

CbULX

Returns the horizontal offset of the code-block partition. Allowable values are 0 and 1, nothing else.

CbULY

Returns the vertical offset of the code-block partition. Allowable values are 0 and 1, nothing else.

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.

ROIMaskGenerator

This function returns the ROI mask generator.

Methods

Name Description
createInstance(Quantizer, ParameterList, EncoderSpecs)

Creates a ROIScaler object. The Quantizer is the source of data to scale.

       <p>The ROI Scaler creates a ROIMaskGenerator depending on what ROI
       information is in the ParameterList. If only rectangular ROI are used,
       the fast mask generator for rectangular ROI can be used.</p>
getAnSubbandTree(int, int)

Returns a reference to the subband tree structure representing the subband decomposition for the specified tile-component.

getNextCodeBlock(int, CBlkWTData)

This function gets a datablk from the entropy coder. The sample sin the block, which consists of the quantized coefficients from the quantizer, are scaled by the values given for any ROIs specified.

       <p>The function calls on a ROIMaskGenerator to get the mask for scaling
       the coefficients in the current block.</p><p>The data returned by this method is a copy of the orignal
       data. Therfore it can be modified "in place" without any problems after
       being returned. The 'offset' of the returned data is 0, and the 'scanw'
       is the same as the code-block width. See the 'CBlkWTData' class.</p>
getNextInternCodeBlock(int, CBlkWTData)

This function gets a datablk from the entropy coder. The sample sin the block, which consists of the quantized coefficients from the quantizer, are scaled by the values given for any ROIs specified.

       <p>The function calls on a ROIMaskGenerator to get the mask for scaling
       the coefficients in the current block.</p>
isReversible(int, int)

Since ROI scaling is always a reversible operation, it calls isReversible() method of it source (the quantizer module).

nextTile()

Advances to the next tile, in standard scan-line order (by rows then columns). An NoNextElementException is thrown if the current tile is the last one (i.e. there is no next tile).

parseROIs(string, int, List<object>)

This function parses the values given for the ROIs with the argument -Rroi. Currently only circular and rectangular ROIs are supported.

       <p>A rectangular ROI is indicated by a 'R' followed the coordinates for
       the upper left corner of the ROI and then its width and height.</p><p>A circular ROI is indicated by a 'C' followed by the coordinates of
       the circle center and then the radius.</p><p>Before the R and C values, the component that are affected by the
       ROI are indicated.</p>
setTile(int, int)

Changes the current tile, given the new indexes. An IllegalArgumentException is thrown if the indexes do not correspond to a valid tile.

useRoi()

This function returns the flag indicating if any ROI functionality used