Class Streams

java.lang.Object
net.imglib2.stream.Streams

public class Streams extends Object
Utilities for creating "localizable Streams".
  • Constructor Details

    • Streams

      public Streams()
  • Method Details

    • localizable

      public static <T> Stream<RealLocalizableSampler<T>> localizable(IterableRealInterval<T> interval)
      Create a sequential Stream of the elements (value and location) of the given interval.

      Element locations are computed on demand only, which is suited for usages where location is only needed for a few elements. (Also see localizing(IterableRealInterval)).

      Type Parameters:
      T - pixel type
      Parameters:
      interval - interval over which to provide a Stream.
      Returns:
      a Stream<RealLocalizableSampler<T>> over the elements of the given interval.
    • localizing

      public static <T> Stream<RealLocalizableSampler<T>> localizing(IterableRealInterval<T> interval)
      Create a sequential Stream of the elements (value and location) of the given interval.

      Element location is tracked preemptively on every step, which is suited for usages where location is needed for all elements. (Also see localizable(IterableRealInterval)).

      Type Parameters:
      T - pixel type
      Parameters:
      interval - interval over which to provide a Stream.
      Returns:
      a Stream<RealLocalizableSampler<T>> over the elements of the given interval.
    • localizable

      public static <T> Stream<LocalizableSampler<T>> localizable(IterableInterval<T> interval)
      Create a sequential Stream of the elements (value and location) of the given interval.

      Element locations are computed on demand only, which is suited for usages where location is only needed for a few elements. (Also see localizing(IterableInterval)).

      Type Parameters:
      T - pixel type
      Parameters:
      interval - interval over which to provide a Stream.
      Returns:
      a Stream<LocalizableSampler<T>> over the elements of the given interval.
    • localizing

      public static <T> Stream<LocalizableSampler<T>> localizing(IterableInterval<T> interval)
      Create a sequential Stream of the elements (value and location) of the given interval.

      Element location is tracked preemptively on every step, which is suited for usages where location is needed for all elements. (Also see localizable(IterableInterval)).

      Type Parameters:
      T - pixel type
      Parameters:
      interval - interval over which to provide a Stream.
      Returns:
      a Stream<LocalizableSampler<T>> over the elements of the given interval.