Class AbstractImg<T>

java.lang.Object
net.imglib2.img.AbstractImg<T>
All Implemented Interfaces:
Iterable<T>, Dimensions, EuclideanSpace, Img<T>, Interval, IterableInterval<T>, IterableRealInterval<T>, RandomAccessible<T>, RandomAccessibleInterval<T>, RealInterval, Typed<T>
Direct Known Subclasses:
AbstractListImg, AbstractLongListImg, AbstractNativeImg

public abstract class AbstractImg<T> extends Object implements Img<T>
TODO
  • Field Details

    • n

      protected final int n
    • numPixels

      protected long numPixels
    • dimension

      protected final long[] dimension
    • max

      protected final long[] max
  • Constructor Details

    • AbstractImg

      public AbstractImg(long[] size)
  • Method Details

    • numElements

      public static long numElements(long[] dim)
    • numDimensions

      public int numDimensions()
      Description copied from interface: EuclideanSpace
      Gets the space's number of dimensions.
      Specified by:
      numDimensions in interface EuclideanSpace
    • dimensions

      public void dimensions(long[] s)
      Description copied from interface: Dimensions
      Write the number of pixels in each dimension into long[].
      Specified by:
      dimensions in interface Dimensions
      Parameters:
      s -
    • dimension

      public long dimension(int d)
      Description copied from interface: Interval
      Default implementation of Dimensions.dimension(int).
      Specified by:
      dimension in interface Dimensions
      Specified by:
      dimension in interface Interval
      Parameters:
      d -
    • size

      public long size()
      Description copied from interface: IterableRealInterval

      Returns the number of elements in this Function.

      Specified by:
      size in interface IterableRealInterval<T>
      Specified by:
      size in interface RandomAccessibleInterval<T>
      Returns:
      number of elements
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • realMax

      public double realMax(int d)
      Description copied from interface: RealInterval
      Get the maximum in dimension d.
      Specified by:
      realMax in interface Interval
      Specified by:
      realMax in interface RealInterval
      Parameters:
      d - dimension
      Returns:
      maximum in dimension d.
    • realMax

      public void realMax(double[] m)
      Description copied from interface: RealInterval
      Write the maximum of each dimension into double[].
      Specified by:
      realMax in interface RealInterval
      Parameters:
      m -
    • realMax

      public void realMax(RealPositionable m)
      Description copied from interface: RealInterval
      Sets a RealPositionable to the maximum of this Interval
      Specified by:
      realMax in interface RealInterval
      Parameters:
      m -
    • realMin

      public double realMin(int d)
      Description copied from interface: RealInterval
      Get the minimum in dimension d.
      Specified by:
      realMin in interface Interval
      Specified by:
      realMin in interface RealInterval
      Parameters:
      d - dimension
      Returns:
      minimum in dimension d.
    • realMin

      public void realMin(double[] m)
      Description copied from interface: RealInterval
      Write the minimum of each dimension into double[].
      Specified by:
      realMin in interface RealInterval
      Parameters:
      m -
    • realMin

      public void realMin(RealPositionable m)
      Description copied from interface: RealInterval
      Sets a RealPositionable to the minimum of this Interval
      Specified by:
      realMin in interface RealInterval
      Parameters:
      m -
    • max

      public long max(int d)
      Description copied from interface: Interval
      Get the maximum in dimension d.
      Specified by:
      max in interface Interval
      Parameters:
      d - dimension
      Returns:
      maximum in dimension d.
    • max

      public void max(long[] m)
      Description copied from interface: Interval
      Write the maximum of each dimension into long[].
      Specified by:
      max in interface Interval
      Parameters:
      m -
    • max

      public void max(Positionable m)
      Description copied from interface: Interval
      Sets a Positionable to the maximum of this Interval
      Specified by:
      max in interface Interval
      Parameters:
      m -
    • min

      public void min(long[] m)
      Description copied from interface: Interval
      Write the minimum of each dimension into long[].
      Specified by:
      min in interface Interval
      Parameters:
      m -
    • min

      public long min(int d)
      Description copied from interface: Interval
      Get the minimum in dimension d.
      Specified by:
      min in interface Interval
      Parameters:
      d - dimension
      Returns:
      minimum in dimension d.
    • min

      public void min(Positionable m)
      Description copied from interface: Interval
      Sets a Positionable to the minimum of this Interval
      Specified by:
      min in interface Interval
      Parameters:
      m -
    • randomAccess

      public RandomAccess<T> randomAccess(Interval interval)
      Description copied from interface: RandomAccessible
      Create a random access sampler for integer coordinates.

      The returned random access is intended to be used in the specified interval only. Thus, the RandomAccessible may provide optimized versions. If the interval is completely contained in the domain, the random access is guaranteed to provide the same values as that obtained by RandomAccessible.randomAccess() within the interval.

      Specified by:
      randomAccess in interface RandomAccessible<T>
      Parameters:
      interval - in which interval you intend to use the random access.
      Returns:
      random access sampler