| synopsis || return value || arguments || prev |

jpx_layer_source::get_codestream_registration

Java: Jpx_layer_source::Get_codestream_registration

int get_codestream_registration( int which, kdu_coords & alignment, kdu_coords & sampling, kdu_coords & denominator)

Java: int Get_codestream_registration( int which, Kdu_coords alignment, Kdu_coords sampling, Kdu_coords denominator)

[Declared in "../apps/compressed_io/jpx.h"]

Go to class description.


Synopsis

This function plays a similar role to get_codestream_id and in fact it has the same return value. However, it returns additional information about the alignment and scaling of multiple codestreams used by this compositing layer against one another.


Return Value

Identifier of the codestream enumerated via which. Codestream indices start from 0 and correspond to the order of appearance of the codestream within the data source. Returns -1 if the number of codestreams used by this compositing layer is less than or equal to which.

Arguments

which [int]

0 to ask about the first codestream used by this compositing layer; 1 to ask about the second codestream used by the layer; and so forth.

alignment [kdu_coords &]

Used to return horizontal and vertical alignment offsets. Specifically, the upper left hand sample of the code-stream's image region is located alignment.x/ denominator.x samples to the right and alignment.y/ denominator.y samples below the origin of this compositing layer's reference grid. The JPX standard (accounting for corrigenda) requires these alignment offsets to lie in the half open interval [0,1), which means that 0 <= alignment.x < denominator.x and 0 <= alignment.y < denominator.y.

sampling [kdu_coords &]

Used to return horizontal and vertical sampling factors for the codestream. Specifically, adjacent columns on the codestream's high resolution reference grid are separated by sampling.x/ denominator.x samples on this compositing layer's reference grid. Similarly, adjacent rows on the codestream's high resolution reference grid are separated by sampling.y/ denominator.y samples on the compositing layer reference grid.

denominator [kdu_coords &]

Used to return the denominator for the alignment and sampling expressions. The values of denominator.x and denominator.y are guaranteed to be strictly positive. Each compositing layer is guaranteed to have a single unique denominator, so that this argument will be set to the same values no matter what value is supplied for which. This is true even if the value of which does not correspond to a valid codestream.


| top || synopsis || return value || arguments || prev |