public class ImarisVolatileFloatArrayLoader extends Object implements CacheArrayLoader<VolatileFloatArray>
Constructor and Description |
---|
ImarisVolatileFloatArrayLoader(IHDF5Access hdf5Access) |
Modifier and Type | Method and Description |
---|---|
int |
getBytesPerElement()
How many bytes does one element (voxel) occupy? This is used only for
statistics, i.e., estimating I/O bandwidth.
|
VolatileFloatArray |
loadArray(int timepoint,
int setup,
int level,
int[] dimensions,
long[] min)
Load cell data into memory.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEmptyArrayCreator
public ImarisVolatileFloatArrayLoader(IHDF5Access hdf5Access)
public VolatileFloatArray loadArray(int timepoint, int setup, int level, int[] dimensions, long[] min) throws InterruptedException
CacheArrayLoader
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
CacheArrayLoader.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)
loadArray
in interface CacheArrayLoader<VolatileFloatArray>
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).InterruptedException
public int getBytesPerElement()
CacheArrayLoader
getBytesPerElement
in interface CacheArrayLoader<VolatileFloatArray>
Copyright © 2015–2021 Fiji. All rights reserved.