Class IterateVoxelsEqualTo
Object
IterateVoxelsEqualTo
Like 
IterateVoxelsAll but specifically for equal-to operations on Voxels of type
 UnsignedByteBuffer.- Author:
- Owen Feehan
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidequalToPrimitive(Voxels<UnsignedByteBuffer> voxels, byte equalToValue, ScalarThreeDimensionalConsumer consumer) Iterates through all points with a specific voxel intensity-value, passing coordinates as primitive types.static voidequalToPrimitiveSlice(Voxels<UnsignedByteBuffer> voxels, int sliceIndex, byte equalToValue, ScalarThreeDimensionalConsumer consumer) static voidequalToReusePoint(Voxels<UnsignedByteBuffer> voxels, byte equalToValue, Consumer<Point3i> consumer) Iterates all points with a specific voxel intensity-value, reusing thePoint3iin each iteration.untilFirstIntensityEqualTo(BoundedVoxels<UnsignedByteBuffer> voxels, byte equalToValue) Iterates each voxel until a specific intensity value is found.
- 
Method Details- 
equalToReusePointpublic static void equalToReusePoint(Voxels<UnsignedByteBuffer> voxels, byte equalToValue, Consumer<Point3i> consumer) Iterates all points with a specific voxel intensity-value, reusing thePoint3iin each iteration.This means that the same Point3iinstance is passed to the consumer each time and is not newly created for each matching voxel.- Parameters:
- voxels- voxels to iterate through
- equalToValue- voxels match if they are equal to this value
- consumer- called for every matching voxel
 
- 
equalToPrimitivepublic 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 through
- equalToValue- voxels match if they are equal to this value
- consumer- called for every matching voxel
 
- 
equalToPrimitiveSlicepublic 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 through
- sliceIndex- which slice to iterate over (z coordinate)
- equalToValue- voxels match if they are equal to this value
- consumer- called for every matching voxel
 
- 
untilFirstIntensityEqualTopublic 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 over
- equalToValue- 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.
 
 
-