Package net.imglib2

Class AbstractLocalizableInt

java.lang.Object
net.imglib2.AbstractEuclideanSpace
net.imglib2.AbstractLocalizableInt
All Implemented Interfaces:
EuclideanSpace, Localizable, RealLocalizable
Direct Known Subclasses:
AbstractLocalizingCursorInt, ArrayRandomAccess, ListRandomAccess, PlanarRandomAccess

public abstract class AbstractLocalizableInt extends AbstractEuclideanSpace implements Localizable
An abstract class that implements the Localizable interface using an int[] array to maintain position.

This is identical to AbstractLocalizable, except that the position is limited to Integer.MAX_VALUE in every dimension.

Author:
Stephan Preibisch, Stephan Saalfeld, Tobias Pietzsch
  • Field Details

    • position

      protected final int[] position
      The Localizable interface is implemented using the position stored here. Positionable subclasses, such as Point, modify this array.
  • Constructor Details

    • AbstractLocalizableInt

      public AbstractLocalizableInt(int n)
      Parameters:
      n - number of dimensions.
    • AbstractLocalizableInt

      protected AbstractLocalizableInt(int[] position)
      Protected constructor that re-uses the passed position array. This is intended to allow subclasses to provide a way to wrap a int[] array.
      Parameters:
      position - position array to use.
  • Method Details

    • localize

      public void localize(float[] pos)
      Description copied from interface: RealLocalizable
      Write the current position into the passed array.
      Specified by:
      localize in interface RealLocalizable
      Parameters:
      pos - receives current position
    • localize

      public void localize(double[] pos)
      Description copied from interface: RealLocalizable
      Write the current position into the passed array.
      Specified by:
      localize in interface RealLocalizable
      Parameters:
      pos - receives current position
    • localize

      public void localize(int[] pos)
      Description copied from interface: Localizable
      Write the current position into the passed array.
      Specified by:
      localize in interface Localizable
      Parameters:
      pos - receives current position
    • localize

      public void localize(long[] pos)
      Description copied from interface: Localizable
      Write the current position into the passed array.
      Specified by:
      localize in interface Localizable
      Parameters:
      pos - receives current position
    • getFloatPosition

      public float getFloatPosition(int d)
      Description copied from interface: RealLocalizable
      Return the current position in a given dimension.
      Specified by:
      getFloatPosition in interface RealLocalizable
      Parameters:
      d - dimension
      Returns:
      dimension of current position
    • getDoublePosition

      public double getDoublePosition(int d)
      Description copied from interface: RealLocalizable
      Return the current position in a given dimension.
      Specified by:
      getDoublePosition in interface RealLocalizable
      Parameters:
      d - dimension
      Returns:
      dimension of current position
    • getIntPosition

      public int getIntPosition(int d)
      Description copied from interface: Localizable
      Return the current position in a given dimension.
      Specified by:
      getIntPosition in interface Localizable
      Parameters:
      d - dimension
      Returns:
      dimension of current position
    • getLongPosition

      public long getLongPosition(int d)
      Description copied from interface: Localizable
      Return the current position in a given dimension.
      Specified by:
      getLongPosition in interface Localizable
      Parameters:
      d - dimension
      Returns:
      dimension of current position