Class CountVoxelsIntersectingBounded

Object
CountVoxelsIntersectingBounded

public class CountVoxelsIntersectingBounded extends Object
Like IterateVoxelsBoundingBox but counts voxels matching a predicate rather than iterating.
Author:
Owen Feehan
  • Method Details

    • countByte

      public static int countByte(BoundedVoxels<UnsignedByteBuffer> voxels1, BoundedVoxels<UnsignedByteBuffer> voxels2, PredicateTwoBytes predicate)
      Counts all voxels in the intersection of two bounded-voxels of type BoundedVoxels that match a predicate.
      Parameters:
      voxels1 - the first bounded-voxels
      voxels2 - the second bounded-voxels
      predicate - determines if a particular voxel should be counted or not?
      Returns:
      the number of voxels that match the predicate.
    • countByteMasked

      public static int countByteMasked(Voxels<UnsignedByteBuffer> maskGlobal, byte onMaskGlobal, BoundedVoxels<UnsignedByteBuffer> voxels1, BoundedVoxels<UnsignedByteBuffer> voxels2, PredicateTwoBytes predicate)
      Counts all voxels intersection of two bounded-voxels of type BoundedVoxels but only voxels that lie on an object-mask and match a predicate.
      Parameters:
      maskGlobal - a mask defined on the entire global space, and all matching voxels must have an on value in this mask, in addition to being part of the intersection of voxels1 and voxels2.
      onMaskGlobal - the on value in maskGlobal.
      voxels1 - the first bounded-voxels
      voxels2 - the second bounded-voxels
      predicate - determines if a particular voxel should be counted or not?
      Returns:
      the number of voxels that match the predicate.