T - type of the data contained in the DataBlockpublic interface DatasetAccess<T>
| Modifier and Type | Method and Description |
|---|---|
boolean |
deleteChunk(PositionValueAccess pva,
long[] gridPosition)
Deletes the chunk at
gridPosition. |
boolean |
deleteChunks(PositionValueAccess pva,
List<long[]> gridPositions)
Deletes the chunks at the given
positions. |
Nesting.NestedGrid |
getGrid() |
DataBlock<T> |
readBlock(PositionValueAccess pva,
long[] shardGridPosition,
int level)
Read a block at
shardGridPosition at the given nesting level. |
DataBlock<T> |
readChunk(PositionValueAccess pva,
long[] gridPosition)
Read the chunk at the given
gridPosition. |
List<DataBlock<T>> |
readChunks(PositionValueAccess pva,
List<long[]> gridPositions)
Read the chunks at the given
gridPositions. |
void |
writeBlock(PositionValueAccess pva,
DataBlock<T> dataBlock,
int level)
Write a full block at the given nesting
level. |
void |
writeChunk(PositionValueAccess pva,
DataBlock<T> chunk)
Writes a chunk to the
grid position
specified by chunk. |
void |
writeChunks(PositionValueAccess pva,
List<DataBlock<T>> chunks)
Writes multiple chunks to the
grid
positions specified by the respective chunks. |
void |
writeRegion(PositionValueAccess pva,
long[] min,
long[] size,
N5Writer.DataBlockSupplier<T> chunkSupplier,
boolean writeFully) |
void |
writeRegion(PositionValueAccess pva,
long[] min,
long[] size,
N5Writer.DataBlockSupplier<T> chunkSupplier,
boolean writeFully,
ExecutorService exec) |
DataBlock<T> readChunk(PositionValueAccess pva, long[] gridPosition) throws N5Exception.N5IOException
gridPosition.
If the requested chunk doesn't exist, then this method will return null. N5IOException will be thrown if something goes wrong
reading or decoding data for an existing key.
pva - dataset storagegridPosition - grid position of the chunks to readnullN5Exception.N5IOException - if any error occurs while reading or decoding the blockList<DataBlock<T>> readChunks(PositionValueAccess pva, List<long[]> gridPositions) throws N5Exception.N5IOException
gridPositions.
The returned List<DataBlock<T>> is in the same order as the
requested gridPositions. That is, the DataBlock at index
i has grid coordinates gridPositions.get(i).
If a requested chunk doesn't exist, then the corresponding element in the
result list will be null. (N5IOException will only be
thrown if something goes wrong reading or decoding data for an existing
key.)
pva - dataset storagegridPositions - list of grid positions of the chunks to readN5Exception.N5IOException - if any error occurs while reading or decoding blocksvoid writeChunk(PositionValueAccess pva, DataBlock<T> chunk) throws N5Exception.N5IOException
grid position
specified by chunk.N5Exception.N5IOExceptionvoid writeChunks(PositionValueAccess pva, List<DataBlock<T>> chunks) throws N5Exception.N5IOException
grid
positions specified by the respective chunks.N5Exception.N5IOExceptionboolean deleteChunk(PositionValueAccess pva, long[] gridPosition) throws N5Exception.N5IOException
gridPosition.N5Exception.N5IOExceptionboolean deleteChunks(PositionValueAccess pva, List<long[]> gridPositions) throws N5Exception.N5IOException
positions.N5Exception.N5IOExceptionvoid writeRegion(PositionValueAccess pva, long[] min, long[] size, N5Writer.DataBlockSupplier<T> chunkSupplier, boolean writeFully) throws N5Exception.N5IOException
pva - min - min pixel coordinate of region to writesize - size in pixels of region to writechunkSupplier - is asked to create chunks within the given regionwriteFully - if false, merge existing data in blocks/chunks that overlap the region boundary. if true, override everything.N5Exception.N5IOExceptionvoid writeRegion(PositionValueAccess pva, long[] min, long[] size, N5Writer.DataBlockSupplier<T> chunkSupplier, boolean writeFully, ExecutorService exec) throws N5Exception, InterruptedException, ExecutionException
pva - min - min pixel coordinate of region to writesize - size in pixels of region to writechunkSupplier - is asked to create chunks within the given region. must be thread-safe.writeFully - if false, merge existing data in blocks/chunks that overlap the region boundary. if true, override everything.exec - used to parallelize over chunks and blocksN5ExceptionInterruptedExceptionExecutionExceptionDataBlock<T> readBlock(PositionValueAccess pva, long[] shardGridPosition, int level) throws N5Exception.N5IOException
shardGridPosition at the given nesting level. The data is read as chunks and then rearranged and assembled into
a (large) DataBlock.
The getGridPosition() of the returned DataBlock is the
grid position with respect to level. For example, if level==1, then this refers to the position on the shard grid.
pva - dataset storageshardGridPosition - position of the shard to read (on the shard grid at level)level - grid level of the shard/block to write.N5Exception.N5IOExceptionvoid writeBlock(PositionValueAccess pva, DataBlock<T> dataBlock, int level) throws N5Exception.N5IOException
level. The block data is
given as a (large) DataBlock that will be sliced, rearranged, and
written as chunks (level-0 DataBlocks).
dataBlock.getGridPosition() is the grid position with respect to
level. For example, if level==1, then this refers to the
position on the level-1 shard grid.
pva - dataset storagedataBlock - block to writelevel - grid level of the block to write.N5Exception.N5IOExceptionNesting.NestedGrid getGrid()
Copyright © 2017–2026 Saalfeld Lab. All rights reserved.