| synopsis || functions || variables |

kdu_window [struct]

Java: Kdu_window

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


Synopsis

This structure defines the elements which can be used to identify a spatial region of interest, an image resolution of interest and image components of interest, in a manner which does not depend upon the coordinate system used by any particular JPEG2000 code-stream. Together, we refer to these parameters as identifying a "window" into the full image.


Public Functions

kdu_window {Java: Kdu_window}

~kdu_window {Java: Native_destroy}

init {Java: Init}

copy_from {Java: Copy_from}

equals {Java: Equals}

contains {Java: Contains}

get_resolution {Java: Get_resolution}

set_resolution {Java: Set_resolution}

get_round_direction {Java: Get_round_direction}

set_round_direction {Java: Set_round_direction}

get_region {Java: Get_region}

set_region {Java: Set_region}

access_components {Java: Access_components}

access_codestreams {Java: Access_codestreams}

get_max_layers {Java: Get_max_layers}

set_max_layers {Java: Set_max_layers}

get_metadata_only {Java: Get_metadata_only}

set_metadata_only {Java: Set_metadata_only}

get_metareq {Java: Get_metareq}

init_metareq {Java: Init_metareq}

add_metareq {Java: Add_metareq}

parse_metareq {Java: Parse_metareq}

Public Variables

resolution [kdu_coords]

Describes the preferred image resolution in terms of the width and the height of the full image. Requests are to be satisfied by finding the smallest image resolution, whose dimensions are no less than those provided. In particular, res_x must be >= resolution.x and res_y must be >= resolution.y, where res_x and res_y refer to the actual dimensions of the selected image resolution. If none of the available image resolutions satisfies these constraints, the full image resolution is selected.

If both resolution.x and resolution.y are 0, the request refers to an empty region, meaning that no compressed image data is being requested. Such a request requires the server to send only the essential marker segments from the main code-stream header and any meta-data which is required for correct rendering (usually the header of a containing JP2 file). Such a request may be sent by the client when it first connects to the server, but would not normally be issued by an application.

round_direction [int]

Indicates the preferred direction for converting the resolution size to the size of an actual available image resolution.

region [kdu_dims]

Describes a spatial region within the reduced resolution image defined by the resolution member. The left hand boundary of the requested region is located a distance of ( region.pos.x* res_x/ resolution.x) columns from the edge of the selected image resolution, where res_x identifies the actual full width of the selected image resolution. The width of the requested region is ( region.size.x* res_x/ resolution.x). Similarly, the upper boundary of the requested region is located ( region.pos.y* res_y/ resolution.y) rows from the top of the actual requested image resolution, where res_y denotes the height of the requested image resolution. The height of the requested region is ( region.size.y* res_y/ resolution.y).

components [kdu_range_set]

Set of image components which belong to the window. If this member is empty ( components.is_empty returns true), the window includes all possible image components. No range in the components object is permitted to contain a negative index. You should also avoid adding ranges to the components member whose kdu_sampled_range::step member is anything other than 1.

codestreams [kdu_range_set]

Set of codestreams which belong to the window. If this member is empty, the window refers only to codestream 0. If the from member of any codestream index range is equal to -1, it has the interpretation of the "now" token defined by the JPIP standard. No other negative values should currently be used, but we may later use them as placeholders for specific codestream tokens such as page labels in a JPM file. For more on negative indices, see the introductory comments associated with the kdu_range_set object.

max_layers [int]

Identifies the maximum number of code-stream quality layers which are to be considered as belonging to the window. If this is zero, or any value larger than the actual number of layers in the code-stream, the window is considered to embody all available quality layers.

metadata_only [bool]

If this flag is true, the client is not interested in receiving anything other than the metadata which would be returned in response to the requested window. No compressed imagery, or even image headers should be sent. Note that setting this member to true may have no effect unless a non-empty metareq list is also provided (e.g. by calls to add_metareq).

metareq [kdu_metareq *]

Points to a linked list of kdu_metareq objects. If NULL, the client is interested in all meta-data the server deems to be important, delivered in the order the server chooses. If non-NULL only those items identified by this list are of interest to the client, unless items are omitted which the server deems to be essential for the client to correctly interpret the requested imagery.

Do not add to this list manually. Instead, use the add_metareq function to build a list of kdu_metareq objects. Note that the init function resets the metareq list to empty (NULL).


| top || synopsis || functions || variables |