Class ListImg<T>

Type Parameters:
T - The value type of the pixels. You can us Types or arbitrary Objects. If you use non-Type pixels, note, that you cannot use Type.set(Type) to change the value stored in every reference. Instead, you can use the ListCursor.set(Object) and ListRandomAccess.set(Object) methods to alter the underlying ArrayList.
All Implemented Interfaces:
Iterable<T>, Dimensions, EuclideanSpace, Img<T>, Interval, IterableInterval<T>, IterableRealInterval<T>, RandomAccessible<T>, RandomAccessibleInterval<T>, RealInterval

public class ListImg<T> extends AbstractListImg<T>
This Img stores an image in a single linear ArrayList. Each pixel is stored as an individual object, so ListImg should only be used for images with relatively few pixels. In principle, the number of entities stored is limited to Integer.MAX_VALUE.
Author:
Stephan Preibisch, Stephan Saalfeld, Tobias Pietzsch
  • Constructor Details

    • ListImg

      public ListImg(long[] dim, T type)
    • ListImg

      public ListImg(Collection<T> collection, long... dim)
  • Method Details

    • get

      protected T get(int index)
      Specified by:
      get in class AbstractListImg<T>
    • set

      protected void set(int index, T value)
      Specified by:
      set in class AbstractListImg<T>
    • copy

      public ListImg<T> copy()
      Returns:
      - A copy of the current Img instance, all pixels are duplicated