Class LocalSlices
Object
LocalSlices
- All Implemented Interfaces:
BufferRetriever
Caches a small number of slices around which we wish to work, so the memory is efficiently
accessed.
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionLocalSlices
(int z, int windowSize, Voxels<UnsignedByteBuffer> voxels) Create with focus around a particular slice. -
Method Summary
Modifier and TypeMethodDescriptiongetLocal
(int relativeZIndex) Get a buffer at a particular index in the z-dimension.
-
Constructor Details
-
LocalSlices
Create with focus around a particular slice.- Parameters:
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.
-
-
Method Details
-
getLocal
Description copied from interface:BufferRetriever
Get a buffer at a particular index in the z-dimension.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.- Specified by:
getLocal
in interfaceBufferRetriever
- Parameters:
relativeZIndex
- the shift in the z index relative to the current z-slice's index- Returns:
- the buffer corresponding to the z-index, if it exists.
-