Class CircleCursor3D<T>

java.lang.Object
sc.fiji.snt.util.CircleCursor3D<T>
All Implemented Interfaces:
Iterator<T>, net.imglib2.Cursor<T>, net.imglib2.EuclideanSpace, net.imglib2.Iterator, net.imglib2.Localizable, net.imglib2.RealCursor<T>, net.imglib2.RealLocalizable, net.imglib2.Sampler<T>, net.imglib2.Typed<T>
Direct Known Subclasses:
DiskCursor3D

public class CircleCursor3D<T> extends Object implements net.imglib2.Cursor<T>
Iterate the pixels of an oriented circle in 3-space using Bresenham's algorithm, where the circle is constructed from the unit normal to the circle plane, the center point, and radius. Alternatively, x and y basis vectors may be used in place of the circle normal.
Author:
Cameron Arshadi
See Also:
  • Field Details

    • rai

      protected final net.imglib2.RandomAccessible<T> rai
    • ra

      protected final net.imglib2.RandomAccess<T> ra
    • centerPoint

      protected final net.imglib2.Localizable centerPoint
    • center

      protected final double[] center
    • xBasis

      protected final double[] xBasis
    • yBasis

      protected final double[] yBasis
    • radius

      protected final long radius
    • xVec

      protected double[] xVec
    • yVec

      protected double[] yVec
    • longPos

      protected long[] longPos
    • doublePos

      protected double[] doublePos
    • x

      protected long x
    • y

      protected long y
    • hasNext

      protected boolean hasNext
  • Constructor Details

    • CircleCursor3D

      public CircleCursor3D(net.imglib2.RandomAccessible<T> rai, net.imglib2.Localizable center, long radius, double[] circleNorm)
      Iterates over a Bresenham circle in the target RandomAccessible. Each point of the circle is iterated exactly once, and there is no "hole" in the circle.
      Parameters:
      rai - the random accessible. It is the caller's responsibility to ensure it can be accessed everywhere the circle will be iterated.
      center - the circle center. Must be at least of dimension 3. Dimensions 0, 1 and 2 are used to specify the circle center.
      radius - the circle radius.
      circleNorm - the unit normal to the circle plane, must be 3-dimensional. The "new" x and y basis vectors will be constructed from this vector.
    • CircleCursor3D

      public CircleCursor3D(net.imglib2.RandomAccessible<T> rai, net.imglib2.Localizable center, long radius, double[] xBasis, double[] yBasis)
      Iterates over a Bresenham circle in the target RandomAccessible. Each point of the circle is iterated exactly once, and there is no "hole" in the circle.
      Parameters:
      rai - the random accessible. It is the caller responsibility to ensure it can be accessed everywhere the circle will be iterated.
      center - the circle center.
      radius - the circle radius.
      xBasis - the vector representing the "new" x-axis of the circle plane. Should be orthogonal to both the circle normal and the yBasis
      yBasis - the vector representing the "new" y-axis of the circle plane. Should be orthogonal to both the circle normal and the xBasis
  • Method Details