Package loci.formats.cache
Interface ICacheStrategy
- All Superinterfaces:
CacheReporter
- All Known Implementing Classes:
CacheStrategy,CrosshairStrategy,RectangleStrategy
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
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionint[]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[]getOrder()Retrieves the order in which objects should be loaded along each axis.int[]Retrieves the priority for caching each axis.int[]getRange()Retrieves the number of objects to cache along each axis.voidsetOrder(int order, int axis) Sets the order in which objects should be loaded along each axis.voidsetPriority(int priority, int axis) Sets the priority for caching the given axis.voidsetRange(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
-
MIN_PRIORITY
static final int MIN_PRIORITY- See Also:
-
LOW_PRIORITY
static final int LOW_PRIORITY- See Also:
-
NORMAL_PRIORITY
static final int NORMAL_PRIORITY- See Also:
-
HIGH_PRIORITY
static final int HIGH_PRIORITY- See Also:
-
MAX_PRIORITY
static final int MAX_PRIORITY- See Also:
-
CENTERED_ORDER
static final int CENTERED_ORDER- See Also:
-
FORWARD_ORDER
static final int FORWARD_ORDER- See Also:
-
BACKWARD_ORDER
static final int BACKWARD_ORDER- See Also:
-
-
Method Details
-
getLoadList
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.
-