Class CountIntersectingVoxels

Object
org.anchoranalysis.mpp.overlap.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 Summary

    Constructors 
    Constructor Description
    CountIntersectingVoxels​(byte regionMembershipFlag)
    Creates a new instance with a specific region membership flag.
    CountIntersectingVoxels​(org.anchoranalysis.mpp.overlap.PredicateRegionMembership predicate)  
  • Method Summary

    Modifier and Type Method Description
    int count​(org.anchoranalysis.image.voxel.BoundedVoxels<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer> voxels1, org.anchoranalysis.image.voxel.BoundedVoxels<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer> voxels2)
    Counts the number of intersecting voxels between two bounded voxel sets.
    int countMasked​(org.anchoranalysis.image.voxel.BoundedVoxels<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer> voxels1, org.anchoranalysis.image.voxel.BoundedVoxels<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer> voxels2, org.anchoranalysis.image.voxel.Voxels<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer> maskGlobal, byte onMaskGlobal)
    Counts the number of intersecting voxels between two bounded voxel sets, considering a global mask.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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​(org.anchoranalysis.mpp.overlap.PredicateRegionMembership predicate)
  • Method Details

    • count

      public int count​(org.anchoranalysis.image.voxel.BoundedVoxels<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer> voxels1, org.anchoranalysis.image.voxel.BoundedVoxels<org.anchoranalysis.image.voxel.buffer.primitive.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​(org.anchoranalysis.image.voxel.BoundedVoxels<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer> voxels1, org.anchoranalysis.image.voxel.BoundedVoxels<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer> voxels2, org.anchoranalysis.image.voxel.Voxels<org.anchoranalysis.image.voxel.buffer.primitive.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