public class LocalSlices extends Object implements BufferRetriever
Constructor and Description |
---|
LocalSlices(int z,
int windowSize,
Voxels<UnsignedByteBuffer> voxels)
Create with focus around a particular slice.
|
Modifier and Type | Method and Description |
---|---|
Optional<UnsignedByteBuffer> |
getLocal(int relativeZIndex)
Get a buffer at a particular index in the z-dimension.
|
public LocalSlices(int z, int windowSize, Voxels<UnsignedByteBuffer> voxels)
z
- index of the slice in the z-dimension.windowSize
- how big the windows is across the z-dimension for storing slices.voxels
- the voxels whose z-dimension is traversed for slices.public Optional<UnsignedByteBuffer> getLocal(int relativeZIndex)
BufferRetriever
The index is relative to a current position e.g. -1, -2, +1, +2
etc.
If an invalid index is requested, then Optional.empty()
is returned.
getLocal
in interface BufferRetriever
relativeZIndex
- the shift in the z index relative to the current z-slice's indexCopyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.