A
- access typepublic class ImarisProbabilitiesCache<A> extends Object implements CacheRemover<Long,Cell<A>,A>, CacheLoader<Long,Cell<A>>
CacheRemover
/CacheLoader
for writing/reading cells
to an Imaris IDataset
.
At each pixel the image is assumed to represent a probability distribution
over channels. For storing to Imaris IDataSetPrx
backing cache, the
first channel ("background") is removed (only the other channels are stored).
If the dataset has UINT8 or UINT16 type, the [0, 1] range is scaled to the
[0, 2^8-1] or [0, 2^16-1], respectively. For loading data back from the cache
this operation is reversed.
Blocks which are not in the cache (yet) are obtained from a backing
CacheLoader
. Typically the backing loader will just create empty cells.
A ImarisProbabilitiesCache
should be connected to a in-memory
cache through IoSync
if the cache will be used concurrently by
multiple threads!
defaultParallelismThreshold
Modifier | Constructor and Description |
---|---|
|
ImarisProbabilitiesCache(Imaris.IDataSetPrx dataset,
PrimitiveType primitiveType,
int[] mapDimensions,
CellGrid grid,
CacheLoader<Long,Cell<A>> backingLoader,
boolean persistOnLoad) |
protected |
ImarisProbabilitiesCache(Imaris.IDataSetPrx dataset,
PrimitiveType primitiveType,
int[] mapDimensions,
CellGrid grid,
CacheLoader<Long,Cell<A>> backingLoader,
boolean persistOnLoad,
boolean withDirtyFlag) |
Modifier and Type | Method and Description |
---|---|
A |
extract(Cell<A> value) |
Cell<A> |
get(Long key) |
void |
invalidate(Long key) |
void |
invalidateAll(long parallelismThreshold) |
void |
invalidateIf(long parallelismThreshold,
Predicate<Long> condition) |
void |
onRemoval(Long key,
A valueData) |
CompletableFuture<Void> |
persist(Long key,
A valueData) |
Cell<A> |
reconstruct(Long key,
A valueData) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
invalidateAll, invalidateIf
public ImarisProbabilitiesCache(Imaris.IDataSetPrx dataset, PrimitiveType primitiveType, int[] mapDimensions, CellGrid grid, CacheLoader<Long,Cell<A>> backingLoader, boolean persistOnLoad) throws Imaris.Error
Imaris.Error
protected ImarisProbabilitiesCache(Imaris.IDataSetPrx dataset, PrimitiveType primitiveType, int[] mapDimensions, CellGrid grid, CacheLoader<Long,Cell<A>> backingLoader, boolean persistOnLoad, boolean withDirtyFlag) throws Imaris.Error
Imaris.Error
public Cell<A> reconstruct(Long key, A valueData)
reconstruct
in interface CacheRemover<Long,Cell<A>,A>
public CompletableFuture<Void> persist(Long key, A valueData)
public void invalidate(Long key)
invalidate
in interface CacheRemover<Long,Cell<A>,A>
invalidate
in interface Invalidate<Long>
public void invalidateIf(long parallelismThreshold, Predicate<Long> condition)
invalidateIf
in interface CacheRemover<Long,Cell<A>,A>
invalidateIf
in interface Invalidate<Long>
public void invalidateAll(long parallelismThreshold)
invalidateAll
in interface CacheRemover<Long,Cell<A>,A>
invalidateAll
in interface Invalidate<Long>
Copyright © 2019–2021 Imaris. All rights reserved.