Interface MultiLevelModel

All Known Implementing Classes:
DefaultMultiLevelModel

public interface MultiLevelModel
The MultiLevelModel class represents a layout model for multi-resolution images such as image pyramids.

It provides the number of resolution levels, the affine transformation from image (pixel) to model coordinates and the bounds in model coordinates.

The resolution level is an integer number ranging from zero (the highest resolution) to getLevelCount()-1 (the lowest resolution).

  • Method Summary

    Modifier and Type
    Method
    Description
    Gets a copy (non-life object) of the affine transformation from image to model coordinates for the given level.
    int
    getLevel(double scale)
    Gets the resolution level for a given scaling factor, e.g.
    int
    Gets the number of resolution levels, which is always greater than zero.
    Gets the bounding box in model coordinates.
    Gets a copy (non-life object) of the affine transformation from model to image coordinates for the given level.
    double
    getScale(int level)
    Gets the scale for a given resolution level, e.g.
  • Method Details

    • getLevelCount

      int getLevelCount()
      Gets the number of resolution levels, which is always greater than zero.
      Returns:
      The number of resolution levels.
    • getLevel

      int getLevel(double scale)
      Gets the resolution level for a given scaling factor, e.g. level=log(scale)/log(2).
      Parameters:
      scale - The scaling factor, will always be a greater than or equal to 1.
      Returns:
      The resolution level, must be in the range 0 to levelCount-1.
      See Also:
    • getScale

      double getScale(int level)
      Gets the scale for a given resolution level, e.g. scale=pow(2,level).
      Parameters:
      level - The resolution level, must be in the range 0 to levelCount-1.
      Returns:
      The scaling factor, must be greater than or equal to 1. getLevel(scale) shall return level.
      See Also:
    • getImageToModelTransform

      AffineTransform getImageToModelTransform(int level)
      Gets a copy (non-life object) of the affine transformation from image to model coordinates for the given level.
      Parameters:
      level - The resolution level, must be in the range 0 to levelCount-1.
      Returns:
      The affine transformation from image to model coordinates.
    • getModelToImageTransform

      AffineTransform getModelToImageTransform(int level)
      Gets a copy (non-life object) of the affine transformation from model to image coordinates for the given level.
      Parameters:
      level - The resolution level, must be in the range 0 to levelCount-1.
      Returns:
      The affine transformation from model to image coordinates.
    • getModelBounds

      Rectangle2D getModelBounds()
      Gets the bounding box in model coordinates.
      Returns:
      The bounding box, may be null if unspecified.