| synopsis || arguments || prev || next |
void map_region( int comp_idx, kdu_dims comp_region, kdu_dims & hires_region)
Java: void Map_region( int comp_idx, Kdu_dims comp_region, Kdu_dims hires_region)
[Declared in "../coresys/common/kdu_compressed.h"]
Maps a region of interest, specified in the domain of a single image component (or the full image in the current geoemetry and at the current resolution) onto the high-res canvas, yielding a region suitable for use with the apply_input_restrictions member function. The supplied region is specified with respect to the same coordinate system as that associated with the region returned by get_dims — i.e., taking into account component sub-sampling factors, discarded resolution levels and any geometric transformations (see change_appearance) associated with the current appearance. The component index is also interpreted relative to any restrictions on the range of available image components, unless negative, in which case the function is being asked to transform a region on the current image resolution to the full high-res canvas.
The region returned via hires_region lives on the high-res canvas of the underlying code-stream and is independent of appearance transformations, discarded resolution levels or component-specific attributes. The hi-res region is guaranteed to be large enough to cover all samples belonging to the intersecton between the supplied component (or resolution) region and the region returned via get_dims.
If negative, the comp_region argument defines a region on the current image resolution, as it appears after any geometric transformations supplied by change_appearance, and after any reduction in the number of resolution levels, as supplied by apply_input_restrictions. Otherwise, the comp_region argument refers to a region on the image component indexed by comp_idx relative to the first image component identified in any call to apply_input_restrictions.