public class IterateVoxelsEqualTo extends Object
IterateVoxelsAll
but specifically for equal-to operations on Voxels
of type
UnsignedByteBuffer
.Modifier and Type | Method and Description |
---|---|
static void |
equalToPrimitive(Voxels<UnsignedByteBuffer> voxels,
byte equalToValue,
ScalarThreeDimensionalConsumer consumer)
Iterates through all points with a specific voxel intensity-value, passing coordinates as
primitive types.
|
static void |
equalToPrimitiveSlice(Voxels<UnsignedByteBuffer> voxels,
int sliceIndex,
byte equalToValue,
ScalarThreeDimensionalConsumer consumer)
|
static void |
equalToReusePoint(Voxels<UnsignedByteBuffer> voxels,
byte equalToValue,
java.util.function.Consumer<Point3i> consumer)
Iterates all points with a specific voxel intensity-value, reusing the
Point3i in
each iteration. |
static Optional<Point3i> |
untilFirstIntensityEqualTo(BoundedVoxels<UnsignedByteBuffer> voxels,
byte equalToValue)
Iterates each voxel until a specific intensity value is found.
|
public static void equalToReusePoint(Voxels<UnsignedByteBuffer> voxels, byte equalToValue, java.util.function.Consumer<Point3i> consumer)
Point3i
in
each iteration.
This means that the same Point3i
instance is passed to the consumer each time and
is not newly created for each matching voxel.
voxels
- voxels to iterate throughequalToValue
- voxels match if they are equal to this valueconsumer
- called for every matching voxelpublic static void equalToPrimitive(Voxels<UnsignedByteBuffer> voxels, byte equalToValue, ScalarThreeDimensionalConsumer consumer)
voxels
- voxels to iterate throughequalToValue
- voxels match if they are equal to this valueconsumer
- called for every matching voxelpublic static void equalToPrimitiveSlice(Voxels<UnsignedByteBuffer> voxels, int sliceIndex, byte equalToValue, ScalarThreeDimensionalConsumer consumer)
equalToPrimitive(org.anchoranalysis.image.voxel.Voxels<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer>, byte, org.anchoranalysis.spatial.point.consumer.ScalarThreeDimensionalConsumer)
but only iterates over one specific z-slice.voxels
- voxels to iterate throughsliceIndex
- which slice to iterate over (z coordinate)equalToValue
- voxels match if they are equal to this valueconsumer
- called for every matching voxelpublic static Optional<Point3i> untilFirstIntensityEqualTo(BoundedVoxels<UnsignedByteBuffer> voxels, byte equalToValue)
voxels
- the voxels to iterate overequalToValue
- voxels match if they are equal to this valueCopyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.