CADI.Common.Network.JPIP
Class ViewWindowField

java.lang.Object
  extended by CADI.Common.Network.JPIP.ViewWindowField

public class ViewWindowField
extends java.lang.Object

This class is used to store the view window fields.

Further information, see ISO/IEC 15444-9 section C.4

Version:
1.0.1 2008/02/18
Author:
Group on Interactive Coding of Images (GICI)

Field Summary
static int CLOSEST
           
 int[][] comps
          comps = "comps" "=" 1#UINT-RANGE This field is used to identify the image components that are to be included in the requested view-window; if not present, the request is understood to include all available image components of all codestreams identified via the Codestream request field, and all relevant components of all codestreams requested via the Codestream Context request field.
 java.lang.String context
           
 int[] fsiz
          fsiz = "fsiz" "=" fx "," fy ["," round-direction]
fx = UINT
fy = UINT
round-direction = "round-up" / "round-down" / "closest" This field is used to identify the resolution associated with the requested view-window.
 int layers
          layers = "layers" "=" UINT This field may be used to restrict the number of codestream quality layers that belong to the view-window request.
 int[] roff
          roff = "roff" "=" ox "," oy
ox = UINT
oy = UINT
This field is used to identify the upper left hand corner (offset) of the spatial region associated with the requested viewwindow; if not present, the offsets default to 0.
 java.lang.String roi
           
static int ROUND_DOWN
          Allowed values for the round direction
static int ROUND_UP
           
 int[] rsiz
          rsiz = "rsiz" "=" sx "," sy
sx = UINT
sy = UINT
This field is used to identify the horizontal and vertical extent (size) of the spatial region associated with the requested view-window; if not present, the region extends to the lower right hand corner of the image.
 float srate
          srate = "srate" "=" streams-per-second
streams-per-second = UFLOAT
If this field is supplied, the codestreams which belong to the view-window are obtained by subsampling those mentioned by the Codestream request field, in addition to those expanded from context-range values in the Codestream Context request field (see C.4.7), so as to achieve an average sampling rate no greater than the streams-per-second value.
 int[][] stream
          stream = "stream" "=" 1#sampled-range
sampled-range = UINT-RANGE [":" sampling-factor]
sampling-factor = UINT
This field is used to identify which codestream or codestreams belong to the requested view-window.
 
Constructor Summary
ViewWindowField()
          Constructor.
ViewWindowField(int[] fsiz, int[] roff, int[] rsiz, int[][] comps, int[][] stream, java.lang.String context, float srate, java.lang.String roi, int layers)
          Constructor.
ViewWindowField(ViewWindowField viewWindow)
          Constructor (copy).
 
Method Summary
static ViewWindowField copyOf(ViewWindowField viewWindow)
          Performs a deep copy of the input object.
static void deepCopy(ViewWindowField viewWindow1, ViewWindowField viewWindow2)
          Copy attributes from viewWindow1 to viewWindow2.
 void list(java.io.PrintStream out)
          Prints this ViewWindow out to the specified output stream.
 void reset()
          Sets the attributes to its initial values.
 java.lang.String toString()
          For debugging purpose
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fsiz

public int[] fsiz
fsiz = "fsiz" "=" fx "," fy ["," round-direction]
fx = UINT
fy = UINT
round-direction = "round-up" / "round-down" / "closest"

This field is used to identify the resolution associated with the requested view-window. The values fx and fy specify the dimensions of the desired image resolution. The round-direction value specifies how an available codestream image resolution shall be selected for each requested codestream, if the requested image resolution is not available within that codestream. The requested frame size is mapped to a codestream image resolution, following the procedure described in C.4.1 of the ISO/IEC 15444-9:2005, possibly with the addition of coordinate transformations requested via a Codestream Context request field. A client wishing to control the exact number of samples received for a particular image component may need to increase the requested frame size, as explained in C.4.1. The round-direction options defined ISO/IEC 15444-9:2005 Recommendation | International Standard are:

Round-direction Meaning
"round-up" For each requested codestream, the smallest codestream image resolution whose width and height are both greater than or equal to the specified size shall be selected. If there is none, then the largest available codestream image resolution shall be used.
"round-down" For each requested codestream, the largest codestream image resolution whose width and height are both less than or equal to the specified size shall be selected. This is the default value when the round-direction parameter is not specified.
"closest" For each requested codestream, the codestream image resolution that is closest to the specified size in area (where area = fx x fy) shall be selected. Where two codestream image resolutions have areas which are equidistant from fx x fy, the larger of the two shall be selected.


ROUND_DOWN

public static final int ROUND_DOWN
Allowed values for the round direction

See Also:
Constant Field Values

ROUND_UP

public static final int ROUND_UP
See Also:
Constant Field Values

CLOSEST

public static final int CLOSEST
See Also:
Constant Field Values

roff

public int[] roff
roff = "roff" "=" ox "," oy
ox = UINT
oy = UINT

This field is used to identify the upper left hand corner (offset) of the spatial region associated with the requested viewwindow; if not present, the offsets default to 0. The actual displacement of a codestream image region from the upper left hand corner of the image, at the actual codestream image resolution selected by the server, is obtained following the procedure described in C.4.1 of the ISO/IEC 15444-9:2005, possibly with the addition of coordinate transformations requested via a Codestream Context request field.

Use of the Offset field is valid only in conjunction with the Frame Size request field.


rsiz

public int[] rsiz
rsiz = "rsiz" "=" sx "," sy
sx = UINT
sy = UINT

This field is used to identify the horizontal and vertical extent (size) of the spatial region associated with the requested view-window; if not present, the region extends to the lower right hand corner of the image. The actual dimensions of a codestream image region, at the actual codestream image resolution selected by the server, are computed following the procedure described in C.4.1 of the ISO/IEC 15444-9:2005, possibly with the addition of coordinate transformations requested via a Codestream Context request field. A requested codestream image region need not necessarily be fully contained within the codestream, in which case the server simply takes the intersection between the available codestream image region and the requested region.

Use of the Region Size request field is valid only in conjunction with the Frame Size request field.


comps

public int[][] comps
comps = "comps" "=" 1#UINT-RANGE

This field is used to identify the image components that are to be included in the requested view-window; if not present, the request is understood to include all available image components of all codestreams identified via the Codestream request field, and all relevant components of all codestreams requested via the Codestream Context request field.


stream

public int[][] stream
stream = "stream" "=" 1#sampled-range
sampled-range = UINT-RANGE [":" sampling-factor]
sampling-factor = UINT

This field is used to identify which codestream or codestreams belong to the requested view-window. If the field is omitted and the codestream(s) cannot be determined by other means, the default is the single codestream with identifier 0. Note that the Codestream Context request field (see C.4.7) provides an additional means for requesting codestreams.

Where a range of codestreams is identified, the absence of an upper bound means that the range extends to all codestreams with larger identifiers. Where an upper bound is provided, the upper bound provides the absolute identifier of the last codestream in the range.

Whether or not an upper bound is provided, a codestream range may be qualified by an additional samplingfactor. The sampling-factor, if provided, shall be a strictly positive integer, F. The range then includes all codestream identifiers L+Fk which lie within the unqualified range, where L is the identifier of the first codestream in the range. The client's index of the codestreams of interest is k and k is a UINT.


context

public java.lang.String context

srate

public float srate
srate = "srate" "=" streams-per-second
streams-per-second = UFLOAT

If this field is supplied, the codestreams which belong to the view-window are obtained by subsampling those mentioned by the Codestream request field, in addition to those expanded from context-range values in the Codestream Context request field (see C.4.7), so as to achieve an average sampling rate no greater than the streams-per-second value. This is possible only if the codestreams have associated timing information (e.g., if they belong to a logical target conforming to the MJ2 file format).

This request field serves only to determine which codestreams should be considered to belong to the view-window. The server shall scan through all codestreams which would otherwise be included in the view-window, discarding codestreams as required to ensure that the average separation between codestream source times is no less than the reciprocal of the streams-per-second value. This Recommendation | International Standard does not prescribe an algorithm for subsampling, or a precise interpretation for the term "average separation."

If no source timing information is available, the view-window will consist of all codestreams identified via the Codestream request field and the Codestream Context request field, but this request field may nonetheless affect the interpretation of a Delivery Rate request field, if present


roi

public java.lang.String roi

layers

public int layers
layers = "layers" "=" UINT

This field may be used to restrict the number of codestream quality layers that belong to the view-window request. By default, all available layers are of interest. The value specifies the number of initial quality layers that are of interest. The server should not attempt to augment any precinct data-bins beyond the relevant layer boundary. The server should not attempt to augment any tile data-bins beyond the point at which all remaining contents lie beyond the relevant layer boundary. Due to the order of data within a tile, it may be necessary for the server to return data beyond the boundary of the requested layer for JPT-stream requests only.

Constructor Detail

ViewWindowField

public ViewWindowField()
Constructor.


ViewWindowField

public ViewWindowField(ViewWindowField viewWindow)
Constructor (copy).

Parameters:
viewWindow - object to be copied.

ViewWindowField

public ViewWindowField(int[] fsiz,
                       int[] roff,
                       int[] rsiz,
                       int[][] comps,
                       int[][] stream,
                       java.lang.String context,
                       float srate,
                       java.lang.String roi,
                       int layers)
Constructor.

Parameters:
fsiz - definition in fsiz
roff - definition in roff
rsiz - definition in rsiz
comps - definition in comps
stream - definition in stream
context - definition in context
srate - definition in srate
roi - definition in roi
layers - definition in layers
Method Detail

deepCopy

public static void deepCopy(ViewWindowField viewWindow1,
                            ViewWindowField viewWindow2)
Copy attributes from viewWindow1 to viewWindow2. It is a deep copy, then attributes are copied one by one, and none reference is copied.

Parameters:
viewWindow1 - data to copy.
viewWindow2 - where data are copied.

copyOf

public static ViewWindowField copyOf(ViewWindowField viewWindow)
Performs a deep copy of the input object.

Parameters:
viewWindow - data to be copied.

reset

public void reset()
Sets the attributes to its initial values.


toString

public java.lang.String toString()
For debugging purpose

Overrides:
toString in class java.lang.Object

list

public void list(java.io.PrintStream out)
Prints this ViewWindow out to the specified output stream. This method is useful for debugging.

Parameters:
out - an output stream.


CADI - Copyright (C) 2007
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Group on Interactive Coding of Images (GICI) (contact)