Class CountIntersectingVoxels

Object
CountIntersectingVoxels

public class CountIntersectingVoxels extends Object
Counts the number of intersecting voxels where bytes are encoded as region memberships.

This class provides methods to count intersecting voxels between two bounded voxel sets, optionally considering a global mask.

Author:
Owen Feehan
  • Constructor Details

    • CountIntersectingVoxels

      public CountIntersectingVoxels(byte regionMembershipFlag)
      Creates a new instance with a specific region membership flag.
      Parameters:
      regionMembershipFlag - the byte value representing region membership
    • CountIntersectingVoxels

      public CountIntersectingVoxels(PredicateRegionMembership predicate)
  • Method Details

    • count

      public int count(BoundedVoxels<UnsignedByteBuffer> voxels1, BoundedVoxels<UnsignedByteBuffer> voxels2)
      Counts the number of intersecting voxels between two bounded voxel sets.
      Parameters:
      voxels1 - the first set of bounded voxels
      voxels2 - the second set of bounded voxels
      Returns:
      the count of intersecting voxels
    • countMasked

      public int countMasked(BoundedVoxels<UnsignedByteBuffer> voxels1, BoundedVoxels<UnsignedByteBuffer> voxels2, Voxels<UnsignedByteBuffer> maskGlobal, byte onMaskGlobal)
      Counts the number of intersecting voxels between two bounded voxel sets, considering a global mask.
      Parameters:
      voxels1 - the first set of bounded voxels
      voxels2 - the second set of bounded voxels
      maskGlobal - the global mask to apply during counting
      onMaskGlobal - the value in the global mask that indicates a voxel should be considered
      Returns:
      the count of intersecting voxels that also satisfy the global mask condition