| synopsis || functions || variables |

kds_metascope [struct]

[Declared in "../apps/kdu_server/kdu_serve.h"]


Synopsis

Used to describe regions of one or more images to which a group of meta-data boxes relate. This object is used to build a linked list of scopes, the union of which represents the complete scope of the meta-data represented by a kds_metagroup object. The scope list provides the information necessary for kdu_serve to appropriately sequence meta-data into a stream of messages generated by the kdu_serve::generate_increments function so that meta-data is appropriately interleaved with compressed imagery, and only the meta-data which is actually relevant to a client's interests need be included.


Public Functions

kds_metascope

Public Variables

is_mandatory [bool]

If this member is true, any window request which intersects with this scope makes the containing kds_metagroup object mandatory for transmission to the client. Such meta-data groups will be transmitted regardless of whether or not the client has supplied a "metareq" JPIP request field, and whether or not a "metareq" request field excludes the transmission of image data. Very little metadata generally requires such a strong classification. However, quite a few entries may require the slightly weaker image_mandatory flag, declared below.

image_mandatory [bool]

This flag plays the same role as is_mandatory, except that the metadata will not be considered mandatory if a "metareq" request field indicates that no image data or image headers should be returned. Typically, codestream headers, colour space info, etc., should be considered as "image_mandatory", since they will be required by the client if any image data is sent, but will not be necessary otherwise.

sequence [kdu_int32]

This parameter determines the priority with which the meta-data should be sequenced by kdu_serve::generate_increments if the present scope is found to intersect with the client's interests. This sequencing priority is expressed relative to other meta-data and also relative to compressed image elements.

sequence values may be either negative or positive, where data having a smaller sequencing index is sequenced earlier than data with a larger index, when kdu_serve::generate_increments is preparing messages for transmission to a client. For reference, all code-stream header data-bins have an implicit sequence index of 0 and the sequence number for precinct data-bin contributions is equal to the quality layer index of the first packet associated with the data being delivered. Where code-stream and meta-data have identical sequence numbers, the meta-data is sequenced first.

If the scope list associated with a kds_metagroup object has multiple scope entries, the sequencing algorithm finds the smallest sequence value amongst all kds_metascope objects which intersect with the client's interests, using that value to schedule the corresponding meta-data.

global [bool]

If true, the scope is associated with the logical target (file) globally, rather than with any specific codestream. In this case, the first_stream_id, last_stream_id, first_component, last_component, min_size, from_x, from_y, to_x and to_y members are ignored. The whole_stream and whole_image members are also ignored. Note that JPIP "metareq" requests which use the "/g" qualifier refer to metadata entries which have at least one scope in which global is true.

whole_stream [bool]

If true, the scope is associated globally with each of the codestreams in the range identified by the first_stream_id and last_stream_id members. In this case, the whole_image, first_component, last_component, min_size, from_x, from_y, to_x and to_y members are ignored. Note that JPIP "metareq" requests which use the "/w" qualifier refer to metadata entries which have at least one scope in which global and whole_stream are both false. JPIP "metareq" requests which use the "/s" qualifier refer to metadata entries which have at least one scope in which global is false, but whole_stream is true.

whole_image [bool]

If true, the scope is associated with the full spatial extent of each image component in the range first_component to last_component, within each code-stream in the range first_stream_id to last_stream_id. In this case, the from_x, from_y, to_x and to_y members are ignored. Otherwise, the scope is restricted to the region specified by the from_x, from_y, to_x and to_y members.

first_stream_id [kdu_int32]

First ID the range of code-stream identifiers to which this scope refers. Ignored if global is true. Must otherwise identify a valid code-stream.

last_stream_id [kdu_int32]

Last ID in the range of code-stream identifiers to which this scope refers. Ignored if global is true. Must otherwise identify a valid code-stream ID, no smaller than last_stream_id.

first_component [kdu_int32]

Index of the first image component to which the scope refers, within each of the code-streams in the range identified by first_stream_id and last_stream_id. Ignored if either global or whole_stream are true.

last_component [kdu_int32]

Index of the last image component to which the scope refers, within each of the code-streams in the range identified by first_stream_id and last_stream_id. Must be at least as large as first_component. Ignored if eiher global or whole_stream are true.

min_size [kdu_coords]

Minimum size for the requested image resolution (not the region) at which this scope becomes valid. The idea is that some meta-data might not be of any interest until the image being requested has sufficiently high resolution. Ignored if either global or whole_stream are true.

from_x [float]

Ignored if global, whole_stream or whole_image is true. Otherwise, this member identifies the relative position (in the range 0 to 1) of the left edge of the scope region.

from_y [float]

Ignored if global, whole_stream or whole_image is true. Otherwise, this member identifies the relative position (in the range 0 to 1) of the upper edge of the scope region.

to_x [float]

Ignored if global, whole_stream or whole_image is true. Otherwise, this member identifies the relative position (in the range 0 to 1) of the right edge of the scope region.

to_y [float]

Ignored if global, whole_stream or whole_image is true. Otherwise, this member identifies the relative position (in the range 0 to 1) of the bottom edge of the scope region.

next [kds_metascope *]

Used to build a linked list of scope records, known as the meta-data scope list.


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