Class NtreeCursor<T extends NativeType<T>>

All Implemented Interfaces:
Iterator<T>, Cursor<T>, Dimensions, EuclideanSpace, NtreeImg.PositionProvider, Interval, Iterator, Localizable, RealCursor<T>, RealInterval, RealLocalizable, Sampler<T>, Typed<T>

public final class NtreeCursor<T extends NativeType<T>> extends LocalizingIntervalIterator implements Cursor<T>, NtreeImg.PositionProvider
  • Field Details

  • Constructor Details

    • NtreeCursor

      public NtreeCursor(NtreeImg<T,?> img)
    • NtreeCursor

      private NtreeCursor(NtreeCursor<T> cursor)
  • Method Details

    • get

      public T get()
      Description copied from interface: Sampler
      Access the actual T instance providing access to a pixel, sub-pixel or integral region value the Sampler points at.
      Specified by:
      get in interface Sampler<T extends NativeType<T>>
    • getType

      public T getType()
      Description copied from interface: Typed
      Get an instance of T.

      It should not be assumed that the returned T instance is an independent copy. In particular, repeated calls to getType() may return the same instance.

      Specified by:
      getType in interface Sampler<T extends NativeType<T>>
      Specified by:
      getType in interface Typed<T extends NativeType<T>>
      Returns:
      an instance of T
    • copy

      public NtreeCursor<T> copy()
      Specified by:
      copy in interface Cursor<T extends NativeType<T>>
      Specified by:
      copy in interface RealCursor<T extends NativeType<T>>
      Specified by:
      copy in interface Sampler<T extends NativeType<T>>
      Returns:
      - A new Sampler in the same state accessing the same values. It does NOT copy T, just the state of the Sampler. Otherwise use T.copy() if available. Sampler.copy().get() == Sampler.get(), i.e. both hold the same value, not necessarily the same instance (this is the case for an ArrayCursor for example)
    • getPosition

      public long[] getPosition()
      Specified by:
      getPosition in interface NtreeImg.PositionProvider