| synopsis || arguments || prev || next |
void set_codestream_registration( int codestream_id, kdu_coords alignment, kdu_coords sampling, kdu_coords denominator)
Java: void Set_codestream_registration( int codestream_id, Kdu_coords alignment, Kdu_coords sampling, Kdu_coords denominator)
[Declared in "../apps/compressed_io/jpx.h"]
Use this function to specify the alignment of multiple codestreams which are shared by this compositing layer. If you do not specify the alignment for any codestream which is used by the channel mappings supplied via the interface returned by access_channels, that codestream will be aligned directly with the compositing registation grid by default. That is, the origin of the codestream's high resolution reference grid will be aligned with the origin of the compositing layer's registration grid, and the spacing between consecutive columns and rows on the codestream's reference grid will be exactly one column or row spacing (as appropriate) on the compositing layer's registration grid. In this case, the dimensions of the composition layer will be the minima of the corresponding dimensions of each codestream.
This should be one of the codestream ID's used to specify channel mapping rules via the jp2_channels interface functions. Codestream identifiers start from 0 and correspond exactly with the order in which the codestream will appear in the JPX file, which is also the order in which the jpx_codestream_target interfaces were created using jpx_target::add_codestream.
Supplies 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 you must ensure that 0 <= alignment.x < denominator.x and 0 <= alignment.y < denominator.y.
Note that alignment values must also lie in the range 0 to 255.
Supplies 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.
Note that sampling factors must lie in the range 1 to 255.
Supplies the denominator for the alignment and sampling expressions. The values of denominator.x and denominator.y must be strictly positive. Each compositing layer may have only one unique denominator, so calling this function multiple times with different denominator values will cause an error to be generated through kdu_error.