OpenConnectomeVolatileArrayLoader(String baseUrl,
String token,
String mode,
long zMin)
-
-
Method Detail
-
getBytesPerElement
public int getBytesPerElement()
How many bytes does one element (voxel) occupy? This is used only for
statistics, i.e., estimating I/O bandwidth. Implementing classes can
return an estimate if element size is varying or unknown.
- Specified by:
getBytesPerElement in interface CacheArrayLoader<net.imglib2.img.basictypeaccess.volatiles.array.VolatileByteArray>
- Returns:
- number of bytes required to store one element.
-
loadArray
public net.imglib2.img.basictypeaccess.volatiles.array.VolatileByteArray loadArray(int timepoint,
int setup,
int level,
int[] dimensions,
long[] min)
throws InterruptedException
Load cell data into memory. This method blocks until data is successfully
loaded. If it completes normally, the returned data is always valid. If
anything goes wrong, an 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)
- Specified by:
loadArray in interface CacheArrayLoader<net.imglib2.img.basictypeaccess.volatiles.array.VolatileByteArray>
- Parameters:
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).
- Returns:
- loaded cell data.
- Throws:
InterruptedException
-
tryLoadArray
public net.imglib2.img.basictypeaccess.volatiles.array.VolatileByteArray tryLoadArray(int timepoint,
int setup,
int level,
int[] dimensions,
long[] min)
throws InterruptedException
- Throws:
InterruptedException
Copyright © 2012–2025 BigDataViewer. All rights reserved.
|