| synopsis || arguments || prev || next |
bool get_valid_blocks( int band_idx, kdu_dims & indices)
Java: boolean Get_valid_blocks( int band_idx, Kdu_dims indices)
[Declared in "../coresys/common/kdu_compressed.h"]
Returns false if the precinct does not belong to a resolution level which includes the band indicated by band_idx. Otherwise, configures the indices argument to identify the range of indices which may be used to access code-blocks beloning to this precinct within the indicated subband. If this range of indices is non-empty, the function returns true; otherwise, it returns false.
Upon return, indices.area yields the total number of code-blocks in the subband which belong to the present precinct and indices.pos identifies the coordinates of the first (top left) block in the precinct-band. As with all of the index manipulation functions, indices may well turn out to be negative as a result of geometric manipulations.
As for kdu_subband::get_valid_blocksthe interpretation of the band_idx argument is affected by the transpose argument supplied in any call to kdu_codestream::change_appearance.
It is important to understand two distinctions between this function and its namesake, kdu_subband::get_valid_blocks interface. Firstly, the range of returned code-block indices is restricted to those belonging to the precinct; and secondly, the range of indices includes all code-blocks belonging to the precinct, even if some of these do not lie within the current region of interest, as established by kdu_codestream::apply_input_restrictions function. This is important, because a precinct is not considered loaded until all of its code-blocks have been written, regardless of whether or not they lie within the current region of interest.