A - type of access to cell data, currently always a
VolatileAccess.public interface CacheArrayLoader<A>
Cell data. This is
implemented by data back-ends to the VolatileGlobalCellCache.| Modifier and Type | Method and Description |
|---|---|
default int |
getBytesPerElement()
How many bytes does one element (voxel) occupy? This is used only for
statistics, i.e., estimating I/O bandwidth.
|
default EmptyArrayCreator<A> |
getEmptyArrayCreator()
Implementing classes must override this if
A is not a standard
VolatileArrayDataAccess type. |
A |
loadArray(int timepoint,
int setup,
int level,
int[] dimensions,
long[] min)
Load cell data into memory.
|
default int getBytesPerElement()
default EmptyArrayCreator<A> getEmptyArrayCreator()
A is not a standard
VolatileArrayDataAccess type. The default implementation returns
null, which will let
CreateInvalidVolatileCell.get(...) try to figure out the appropriate
DefaultEmptyArrayCreator.
Default access types are
EmptyArrayCreator for A or null.A loadArray(int timepoint, int setup, int level, int[] dimensions, long[] min) throws InterruptedException
InterruptedException is thrown.
Parameters specify the image within the data set and the location of the
cell within the image: timepoint, setup, and
level define the stack, where setup is a combination of angle,
channel, etc., and level is the resolution level (for multi-resolution
data). dimensions is the size of the block to load (in voxels).
min is the starting coordinate of the block in the stack (in
voxels).
Usually, the CacheArrayLoader interface is implemented in
conjunction with implementing a ViewerImgLoader for a BDV data
back-end. You do not need to be able to load blocks of arbitrary sizes
and offsets here -- just the ones that you will use from the images
returned by your ViewerImgLoader. For an example, look at
CatmaidImageLoader. There, the blockDimensions are defined in the
constructor, according to the tile size of the data set. These
blockDimensions are then used for every image that the
CatmaidImageLoader provides. Therefore, all calls to
loadArray(int, int, int, int[], long[]) will have predictable
dimensions (corresponding to tile size of the data set) and
min offsets (multiples of the tile size).
The only exception to this rule is at the (max) border of the stack. The
boundary cells may have a truncated shape. For example, if your image
size is 20x20x1 and your cell size is 16x16x1, you will
have cell sizes
(16x16x1), (4x16x1)
(16x4x1), (4x4x1)
timepoint - the timepoint of the stack.setup - the setup of the stack.level - the resolution level of the stack (0 for full resolution).dimensions - the size of the block to load (in voxels).min - the min coordinate of the block in the stack (in voxels).InterruptedExceptionCopyright © 2015–2021 Fiji. All rights reserved.