| synopsis || arguments || prev || next |
void get_dims( int comp_idx, kdu_dims & dims)
Java: void Get_dims( int comp_idx, Kdu_dims dims)
[Declared in "../coresys/common/kdu_compressed.h"]
Retrieves the apparent dimensions and position of an image component on the canvas. These are calculated from the image region on the high resolution canvas and the individual sub-sampling factors for the image component. Note that the apparent dimensions are affected by any calls which may have been made to change_appearance or apply_input_restrictions. In particular, both geometric transformations and resolution reduction requests affect the apparent component dimensions. The interpretation of the component index is also relative to any restrictions on the range of apparent image components.
If comp_idx is negative, the function returns the dimensions of the image on the high resolution canvas itself. In this case, the return value is corrected for geometric transformations, but not resolution reduction requests. Since the sub-sampling factors returned by get_subsampling are corrected for resolution reduction, the caller may recover the image component dimensions directly from the canvas dimensions returned here with comp_idx<0 by applying the sub-sampling factors. For information on how to perform such mapping operations, see Chapter 11 in the book by Taubman and Marcellin.