Package net.imglib2

Class AbstractLocalizable

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected long[] position
      The Localizable interface is implemented using the position stored here.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
        AbstractLocalizable​(int n)  
      protected AbstractLocalizable​(long[] position)
      Protected constructor that re-uses the passed position array.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getDoublePosition​(int d)
      Return the current position in a given dimension.
      float getFloatPosition​(int d)
      Return the current position in a given dimension.
      int getIntPosition​(int d)
      Return the current position in a given dimension.
      long getLongPosition​(int d)
      Return the current position in a given dimension.
      void localize​(double[] pos)
      Write the current position into the passed array.
      void localize​(float[] pos)
      Write the current position into the passed array.
      void localize​(int[] pos)
      Write the current position into the passed array.
      void localize​(long[] pos)
      Write the current position into the passed array.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • position

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

      • AbstractLocalizable

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

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

      • 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