| synopsis || arguments || prev || next |
void set_window( kdu_window & window)
Java: void Set_window( Kdu_window window)
[Declared in "../apps/kdu_server/kdu_serve.h"]
Call this function to update the image code-streams, components, resolution, spatial region and number of quality layers (together designated "the window") which are to be used in responding to future calls to generate_increments. The server does not care how the window parameters are determined, but it may need to modify the window parameters in order to satisfy internal resource constraints. The get_window function may be used to determine the actual window parameters which are being used at any given point.
Upon initialization, the window is set to refer to all image components of the first available code-stream, taken over the whole image, but viewed at the lowest available resolution (usually a thumbnail). Of course, these initial defaults may be overridden at any time, even before the first call to generate_increments.
Although this function may be called as often as needed, there is a computational overhead associated with changes in the region of interest. The next time generate_increments is called, it will have to build a new list of active precincts, which might easily take a milisecond or more. Perhaps even more importantly, code-block data for the new precincts will need to be loaded from kdu_codestream objects accessed via kdu_serve_target::lock_codestream. This may indirectly trigger disk accesses, packet parsing and cache management activities. For this reason, once you have committed to calling generate_increments in response to some new window, you should aim to generate a significant amount of data for that window before moving on to a new window. The actual minimum amount of data which the application chooses to generate for one window before moving to another might (ideally) be based upon simultaneous estimates of the computational complexity and the communication bandwidth to a remote client.
The interpretation of this object and its members is carefully described in the comments accompanying the kdu_window object.