T - source typeA - intermediate access typeCA - access type of cellspublic class RandomAccessibleCacheLoader<T extends NativeType<T>,A extends ArrayDataAccess<A>,CA extends ArrayDataAccess<CA>> extends Object implements CacheLoader<Long,Cell<CA>>
CacheLoader that produces cells from a given source
RandomAccessible. The cells are backed by ArrayDataAccess of
type CA, with the correct dimensions, etc.
Usually, it should be created through static helper methods
get(CellGrid, RandomAccessible, Set) or
get(CellGrid, RandomAccessible, NativeType, Set) to get
the desired primitive type and dirty/volatile variant.
The access backing the cells is filled through an intermediate access type
A which is the basic variant of the final access type CA. For
example, this might be A = ByteArray and CA =
DirtyByteArray. The reason for this is that we do not want the dirty
flag to be triggered by filling in the initial values.
| Constructor and Description |
|---|
RandomAccessibleCacheLoader(CellGrid grid,
RandomAccessible<T> source,
T type,
A creator,
Function<A,CA> rewrap) |
| Modifier and Type | Method and Description |
|---|---|
static <T extends NativeType<T>,A extends ArrayDataAccess<A>,CA extends ArrayDataAccess<CA>> |
get(CellGrid grid,
RandomAccessible<T> source,
Set<AccessFlags> flags) |
static <T extends NativeType<T>,A extends ArrayDataAccess<A>,CA extends ArrayDataAccess<CA>> |
get(CellGrid grid,
RandomAccessible<T> source,
T type,
Set<AccessFlags> flags) |
Cell<CA> |
get(Long key) |
public Cell<CA> get(Long key) throws Exception
get in interface CacheLoader<Long,Cell<CA extends ArrayDataAccess<CA>>>Exceptionpublic static <T extends NativeType<T>,A extends ArrayDataAccess<A>,CA extends ArrayDataAccess<CA>> RandomAccessibleCacheLoader<T,A,CA> get(CellGrid grid, RandomAccessible<T> source, Set<AccessFlags> flags)
public static <T extends NativeType<T>,A extends ArrayDataAccess<A>,CA extends ArrayDataAccess<CA>> RandomAccessibleCacheLoader<T,A,CA> get(CellGrid grid, RandomAccessible<T> source, T type, Set<AccessFlags> flags)
Copyright © 2015–2022 ImgLib2. All rights reserved.