Class IterateVoxelsEqualTo
Object
IterateVoxelsEqualTo
Like
IterateVoxelsAll
but specifically for equal-to operations on Voxels
of type
UnsignedByteBuffer
.- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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, Consumer<Point3i> consumer) Iterates all points with a specific voxel intensity-value, reusing thePoint3i
in each iteration.untilFirstIntensityEqualTo
(BoundedVoxels<UnsignedByteBuffer> voxels, byte equalToValue) Iterates each voxel until a specific intensity value is found.
-
Method Details
-
equalToReusePoint
public static void equalToReusePoint(Voxels<UnsignedByteBuffer> voxels, byte equalToValue, Consumer<Point3i> consumer) Iterates all points with a specific voxel intensity-value, reusing thePoint3i
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.- Parameters:
voxels
- voxels to iterate throughequalToValue
- voxels match if they are equal to this valueconsumer
- called for every matching voxel
-
equalToPrimitive
public 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.- Parameters:
voxels
- voxels to iterate throughequalToValue
- voxels match if they are equal to this valueconsumer
- called for every matching voxel
-
equalToPrimitiveSlice
public static void equalToPrimitiveSlice(Voxels<UnsignedByteBuffer> voxels, int sliceIndex, byte equalToValue, ScalarThreeDimensionalConsumer consumer) LikeequalToPrimitive(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.- Parameters:
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 voxel
-
untilFirstIntensityEqualTo
public static Optional<Point3i> untilFirstIntensityEqualTo(BoundedVoxels<UnsignedByteBuffer> voxels, byte equalToValue) Iterates each voxel until a specific intensity value is found.- Parameters:
voxels
- the voxels to iterate overequalToValue
- voxels match if they are equal to this value- Returns:
- the first point found in global-coordinates (newly created), or empty() if no points are equal-to.
-