Interface ICacheStrategy

All Superinterfaces:
CacheReporter
All Known Implementing Classes:
CacheStrategy, CrosshairStrategy, RectangleStrategy

public interface ICacheStrategy extends CacheReporter
Interface for cache strategies. A cache strategy identifies which objects should be loaded into the cache, in which order. Unlike ICacheSource, it works with multidimensional (N-D) position arrays rather than rasterized (1-D) indices. The two are made equivalent via a mapping between the two, invoked within Cache as needed.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int[]
    Gets the lengths of all the axes.
    int[][]
    getLoadList(int[] pos)
    Gets the indices of the objects to cache, surrounding the object at the given position.
    int[]
    Retrieves the order in which objects should be loaded along each axis.
    int[]
    Retrieves the priority for caching each axis.
    int[]
    Retrieves the number of objects to cache along each axis.
    void
    setOrder(int order, int axis)
    Sets the order in which objects should be loaded along each axis.
    void
    setPriority(int priority, int axis)
    Sets the priority for caching the given axis.
    void
    setRange(int num, int axis)
    Sets the number of objects to cache along the given axis.

    Methods inherited from interface loci.formats.cache.CacheReporter

    addCacheListener, getCacheListeners, removeCacheListener
  • Field Details

  • Method Details

    • getLoadList

      int[][] getLoadList(int[] pos) throws CacheException
      Gets the indices of the objects to cache, surrounding the object at the given position.
      Throws:
      CacheException
    • getPriorities

      int[] getPriorities()
      Retrieves the priority for caching each axis.
    • setPriority

      void setPriority(int priority, int axis)
      Sets the priority for caching the given axis.
    • getOrder

      int[] getOrder()
      Retrieves the order in which objects should be loaded along each axis.
      Returns:
      An array whose constituents are each one of:
      • CENTERED_ORDER
      • FORWARD_ORDER
      • BACKWARD_ORDER
    • setOrder

      void setOrder(int order, int axis)
      Sets the order in which objects should be loaded along each axis.
      Parameters:
      order - One of:
      • CENTERED_ORDER
      • FORWARD_ORDER
      • BACKWARD_ORDER
      axis - The axis for which to set the order.
    • getRange

      int[] getRange()
      Retrieves the number of objects to cache along each axis.
    • setRange

      void setRange(int num, int axis)
      Sets the number of objects to cache along the given axis.
    • getLengths

      int[] getLengths()
      Gets the lengths of all the axes.