Modifier and Type | Method and Description |
---|---|
static <T> void |
withBuffer(BoundingBox box,
Voxels<T> voxels,
ProcessBufferUnary<T> process)
Iterate over each voxel in a bounding-box - with one associated buffer for each slice
|
static void |
withCursor(BinaryVoxels<UnsignedByteBuffer> voxels,
BoundingBox box,
KernelApplicationParameters parameters,
ProcessKernelPointCursor process)
Iterate over each voxel in a bounding-box using a
KernelPointCursor . |
static boolean |
withCursorUntil(BinaryVoxels<UnsignedByteBuffer> voxels,
BoundingBox box,
KernelApplicationParameters parameters,
PredicateKernelPointCursor predicate)
Iterate over each voxel in a bounding-box using a
KernelPointCursor until a predicate
returns true.. |
static void |
withMatchingPoints(BoundingBox box,
java.util.function.Predicate<Point3i> predicate,
ProcessPoint process)
Iterate over each voxel in a bounding-box that matches a predicate.
|
static void |
withPoint(BoundingBox box,
ProcessPoint process)
Iterate over each voxel in a bounding-box
|
static void |
withPointAndIndex(BoundingBox box,
ProcessPointAndIndex process)
Iterate over each voxel in a bounding-box
|
static <T> void |
withThreeBuffers(BoundingBox box,
ReadableTuple3i shiftForSecond,
ReadableTuple3i shiftForThird,
Voxels<T> voxels1,
Voxels<T> voxels2,
Voxels<T> voxels3,
ProcessBufferTernary<T> process)
Iterate over each voxel in a bounding-box - with three associated buffers for each
slice.
|
static <T> void |
withTwoBuffers(BoundingBox box,
ReadableTuple3i shiftForSecond,
Voxels<T> voxels1,
Voxels<T> voxels2,
ProcessBufferBinary<T,T> process)
Iterate over each voxel in a bounding-box - with two associated buffers for each
slice, one
VoxelBuffer and one Buffer |
static <T> Optional<Point3i> |
withTwoBuffersUntil(BoundingBox box,
ReadableTuple3i shiftForSecond,
Voxels<T> voxels1,
Voxels<T> voxels2,
PredicateBufferBinary<T> predicate)
Iterate over each voxel in a bounding-box - with two associated buffers for each slice
- until a predicate evaluates to true.
|
static <S,T> void |
withTwoMixedBuffers(BoundingBox box,
ReadableTuple3i shiftForSecond,
Voxels<S> voxels1,
Voxels<T> voxels2,
ProcessBufferBinaryMixed<S,T> process)
Iterate over each voxel in a bounding-box - with two associated buffers for each
slice.
|
public static void withPoint(BoundingBox box, ProcessPoint process)
box
- the box that is used as a condition on what voxels to iterate i.e. only voxels
within these boundsprocess
- is called for each voxel within the bounding-box using global
coordinates.public static void withPointAndIndex(BoundingBox box, ProcessPointAndIndex process)
box
- the box that is used as a condition on what voxels to iterate i.e. only voxels
within these boundsprocess
- is called for each voxel within the bounding-box using global
coordinates.public static void withMatchingPoints(BoundingBox box, java.util.function.Predicate<Point3i> predicate, ProcessPoint process)
box
- the box that is used as a condition on what voxels to iterate i.e. only voxels
within these boundspredicate
- only voxels that match this predicate are processed.process
- is called for each voxel that matches predicate
within the
bounding-box using global coordinates.public static <T> void withBuffer(BoundingBox box, Voxels<T> voxels, ProcessBufferUnary<T> process)
T
- buffer-type for voxelsbox
- the box that is used as a condition on what voxels to iterate i.e. only voxels
within these boundsvoxels
- voxels in which which {code box} refers to a subregion.process
- is called for each voxel within the bounding-box using global
coordinates.public static <T> void withTwoBuffers(BoundingBox box, ReadableTuple3i shiftForSecond, Voxels<T> voxels1, Voxels<T> voxels2, ProcessBufferBinary<T,T> process)
VoxelBuffer
and one Buffer
T
- buffer-type for voxelsbox
- the box that is used as a condition on what voxels to iterate i.e. only voxels
within these boundsshiftForSecond
- added to the current point in voxels1
to give a corresponding
point in voxels2
.voxels1
- voxels in which which box
refers to a subregion.voxels2
- voxels in which which box + shiftForSecond
refers to a subregion.process
- is called for each voxel within the bounding-box where the point uses
global coordinates without the shift. A new Point3i
is not created
on each iteration.public static <S,T> void withTwoMixedBuffers(BoundingBox box, ReadableTuple3i shiftForSecond, Voxels<S> voxels1, Voxels<T> voxels2, ProcessBufferBinaryMixed<S,T> process)
S
- buffer-type for the voxel-buffer for voxels1
).T
- buffer-type for the buffer (for voxels2
).box
- the box that is used as a condition on what voxels to iterate i.e. only voxels
within these boundsshiftForSecond
- added to the current point in voxels1
to give a corresponding
point in voxels2
.voxels1
- voxels in which which box
refers to a subregion.voxels2
- voxels in which which box + shiftForSecond
refers to a subregion.process
- is called for each voxel within the bounding-box where the point uses
global coordinates without the shift. A new Point3i
is not created
on each iteration.public static <T> Optional<Point3i> withTwoBuffersUntil(BoundingBox box, ReadableTuple3i shiftForSecond, Voxels<T> voxels1, Voxels<T> voxels2, PredicateBufferBinary<T> predicate)
predicate
is called for each voxel within the bounding-box where the point uses
global coordinates without the shift while it continues to evaluate to false. The
routine exits on the first occasion predicate
evaluates to true. A new Point3i
is not created on each iteration.
T
- buffer-type for voxelsbox
- the box that is used as a condition on what voxels to iterate i.e. only voxels
within these boundsshiftForSecond
- added to the current point in voxels1
to give a corresponding
point in voxels2
.voxels1
- voxels in which which box
refers to a subregion.voxels2
- voxels in which which box + shiftForSecond
refers to a subregion.predicate
- the predicate as described above.box1
when the predicate first
evaluates to true, or Optional.empty()
if no point satisfies the predicate.public static <T> void withThreeBuffers(BoundingBox box, ReadableTuple3i shiftForSecond, ReadableTuple3i shiftForThird, Voxels<T> voxels1, Voxels<T> voxels2, Voxels<T> voxels3, ProcessBufferTernary<T> process)
T
- buffer-type for voxelsbox
- the box that is used as a condition on what voxels to iterate i.e. only voxels
within these boundsshiftForSecond
- added to the current point in voxels1
to give a corresponding
point in voxels2
.shiftForThird
- added to the current point in voxels1
to give a corresponding
point in voxels3
.voxels1
- voxels in which which box
refers to a subregion.voxels2
- voxels in which which box + shiftForSecond
refers to a subregion.voxels3
- voxels in which which box + shiftForThird
refers to a subregion.process
- is called for each voxel within the bounding-box where the point uses
global coordinates without the shift. A new Point3i
is not created
on each iteration.public static void withCursor(BinaryVoxels<UnsignedByteBuffer> voxels, BoundingBox box, KernelApplicationParameters parameters, ProcessKernelPointCursor process)
KernelPointCursor
.voxels
- the voxels to iterator overbox
- the box to iterate over (with coordinates referring to voxels
.parameters
- to use when applying a kernelprocess
- process is called for each voxel inside the extent using the same coordinates
as the extent.public static boolean withCursorUntil(BinaryVoxels<UnsignedByteBuffer> voxels, BoundingBox box, KernelApplicationParameters parameters, PredicateKernelPointCursor predicate)
KernelPointCursor
until a predicate
returns true..voxels
- the voxels to iterator overbox
- the box to iterate over (with coordinates referring to voxels
.parameters
- to use when applying a kernelpredicate
- evaluates each position of the cursor.predicate
, false if it
never happens.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.