| synopsis || arguments || prev || next |

jpx_source::access_layer

Java: Jpx_source::Access_layer

jpx_layer_source access_layer( int which)

Java: Jpx_layer_source Access_layer( int which)

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

Go to class description.


Synopsis

Similar to access_codestream but accesses the information associated with the compositing layer identified by which. If which is 0, this is the first compositing layer in the data source; if which is 1, the second compositing layer is being requested, and so forth. All data sources managed by this object are deemed to have at least one compositing layer, even if they do not contain explicit compositing layer header boxes. Even a basic JP2 file always has one compositing layer and one codestream. If the data source contains compositing layer header boxes, there is one compositing layer for each such header box. Otherwise (and this can only be determined by parsing to the end of the file first), each codestream corresponds to a separate compositing layer.

If the function is unable to access the requested layer at present, it returns an empty interface (one whose jpx_layer_source::exists function returns false). This may happen either because the total number of compositing layers in the data source is less than or equal to which, or because the function is not yet able to parse far enough into the data source to recover the relevant boxes. The latter generally occurs only if the underlying jp2_family_src object is fueled by a dynamic cache (i.e., a kdu_cache object).

Before the function will return a non-empty interface, it must have found and parsed the compositing layer header (jplh) box, if any, in addition to any JP2 header (jp2h) box which is required for recovering default parameters, and any codestream header box whose component mapping box might be required to interpret channel mapping rules. For each required codestream, the embedded codestream box and the code-stream main header must be completely available as well. Alternatively, we must have reached the end of the data source or have other means of knowing that there will be no compositing layer header box for this layer. These complexities arise because JPX was created to allow quite a bit of flexibility for writers, but this has obvious adverse implications for readers, leaving them unable to make solid incremental decisions often until all boxes have been seen. The Kakadu implementation does its best to hide all such irregularities from the application.


Arguments

which [int]


| top || synopsis || arguments || prev || next |