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

kdu_codestream::open_tile

Java: Kdu_codestream::Open_tile

kdu_tile open_tile( kdu_coords tile_idx)

Java: Kdu_tile Open_tile( Kdu_coords tile_idx)

[Declared in "../coresys/common/kdu_compressed.h"]

Go to class description.


Synopsis

Accesses a specific tile, returning an interface which can be used for accessing the tile's contents and further interfaces to specific tile-components. The returned interface contains no state of its own, but only an embedded reference to the real state information, which is buried in the implementation. When a tile is first opened, the internal state information may be automatically created from the code-stream parameters available at that time. These in turn may be translated automatically from marker segments if this is an input codestream. Indeed, for this to happen, any amount of the code-stream may need to be read and buffered internally, depending upon whether or not the sufficient information is available to support random access into the code-stream.

For these reasons, you should be careful only to open tiles which you really want to read from or write to. Instead of walking through tiles to find one you are interested in, use the find_tile member function. You may also find the get_tile_dims function useful.

With input codestreams, the function attempts to read and buffer the minimum amount of the code-stream in order to satisfy the request. Although not mandatory, it is a good idea to close all tiles (see kdu_tile::close) once you are done with them.


Arguments

tile_idx [kdu_coords]

The tile indices must lie within the region returned by the get_valid_tiles function; otherwise, an error will be generated.


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