Esempio n. 1
0
  /**
   * Advances to the next tile, in standard scan-line order (by rows then columns). An
   * NoNextElementException is thrown if the current tile is the last one (i.e. there is no next
   * tile).
   *
   * <p>This method resets the 'subbTrees' array, and recalculates the values of the 'reversible'
   * array. It also resets the decomposed component buffers.
   */
  public void nextTile() {
    int i;

    // Change tile
    super.nextTile();
    // Reset the decomposed component buffers
    if (decomposedComps != null) {
      for (i = decomposedComps.length - 1; i >= 0; i--) {
        decomposedComps[i] = null;
        currentSubband[i] = null;
      }
    }
  }
Esempio n. 2
0
  /**
   * Changes the current tile, given the new coordinates.
   *
   * <p>This method resets the 'subbTrees' array, and recalculates the values of the 'reversible'
   * array. It also resets the decomposed component buffers.
   *
   * @param x The horizontal coordinate of the tile.
   * @param y The vertical coordinate of the new tile.
   */
  public void setTile(int x, int y) {
    int i;

    // Change tile
    super.setTile(x, y);

    // Reset the decomposed component buffers.
    if (decomposedComps != null) {
      for (i = decomposedComps.length - 1; i >= 0; i--) {
        decomposedComps[i] = null;
        currentSubband[i] = null;
      }
    }
  }