Module org.scijava.ops.image
Class Octant<B extends BooleanType<B>>
- java.lang.Object
-
- org.scijava.ops.image.topology.eulerCharacteristic.Octant<B>
-
public class Octant<B extends BooleanType<B>> extends Object
A convenience class for storing a 2x2x2 voxel neighborhood in an image- Author:
- Richard Domander (Royal Veterinary College, London), Mark Hiner
-
-
Constructor Summary
Constructors Constructor Description Octant(RandomAccessibleInterval<B> interval)Constructs a new 2x2x2 neighborhood
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetNeighborCount()Returns the number of foreground voxels in the neighborhoodbooleanisNeighborForeground(int n)Check if the nth neighbor in the 8-neighborhood is foregroundbooleanisNeighborhoodEmpty()True if none of the elements in the neighborhood are foreground (true)voidsetNeighborhood(long x, long y, long z)Set the starting coordinates of the neighborhood in the interval NB: All voxels outside the image bounds are considered 0
-
-
-
Constructor Detail
-
Octant
public Octant(RandomAccessibleInterval<B> interval)
Constructs a new 2x2x2 neighborhoodNB: Copies reference
- Parameters:
interval- Image space where the neighborhood is located
-
-
Method Detail
-
getNeighborCount
public int getNeighborCount()
Returns the number of foreground voxels in the neighborhood
-
isNeighborForeground
public boolean isNeighborForeground(int n)
Check if the nth neighbor in the 8-neighborhood is foreground- Parameters:
n- number of neighbor, 1 <= n <= 8
-
isNeighborhoodEmpty
public boolean isNeighborhoodEmpty()
True if none of the elements in the neighborhood are foreground (true)
-
setNeighborhood
public void setNeighborhood(long x, long y, long z)Set the starting coordinates of the neighborhood in the interval NB: All voxels outside the image bounds are considered 0
-
-