Class Cell<A>

  • All Implemented Interfaces:
    java.io.Serializable

    public class Cell<A>
    extends java.lang.Object
    implements java.io.Serializable
    A cell of an AbstractCellImg.
    Author:
    Tobias Pietzsch
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int[] dimensions  
      protected long[] max  
      protected long[] min  
      protected int n  
      protected int[] steps  
    • Constructor Summary

      Constructors 
      Constructor Description
      Cell​(int[] dimensions, long[] min, A data)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int dimension​(int d)
      Get the number of pixels in a given dimension d.
      void dimensions​(int[] dim)
      Write the number of pixels in each dimension into long[].
      A getData()
      Get the basic type array that stores this cells pixels.
      int globalPositionToIndex​(long[] position)
      Compute the index in the underlying flat array of this cell which corresponds to the specified global position.
      long indexToGlobalPosition​(int index, int d)  
      void indexToGlobalPosition​(int index, long[] position)  
      long min​(int d)  
      void min​(long[] minimum)
      Write the minimum of each dimension into long[].
      long size()  
      • Methods inherited from class java.lang.Object

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

      • n

        protected final int n
      • dimensions

        protected final int[] dimensions
      • steps

        protected final int[] steps
      • min

        protected final long[] min
      • max

        protected final long[] max
    • Constructor Detail

      • Cell

        public Cell​(int[] dimensions,
                    long[] min,
                    A data)
    • Method Detail

      • getData

        public A getData()
        Get the basic type array that stores this cells pixels.
        Returns:
        underlying basic type array.
      • size

        public long size()
      • indexToGlobalPosition

        public long indexToGlobalPosition​(int index,
                                          int d)
      • indexToGlobalPosition

        public void indexToGlobalPosition​(int index,
                                          long[] position)
      • globalPositionToIndex

        public int globalPositionToIndex​(long[] position)
        Compute the index in the underlying flat array of this cell which corresponds to the specified global position.
        Parameters:
        position - a global position
        Returns:
        corresponding index
      • min

        public long min​(int d)
        Parameters:
        d - dimension
        Returns:
        minimum
      • min

        public void min​(long[] minimum)
        Write the minimum of each dimension into long[].
        Parameters:
        minimum -
      • dimension

        public int dimension​(int d)
        Get the number of pixels in a given dimension d.
        Parameters:
        d -
      • dimensions

        public void dimensions​(int[] dim)
        Write the number of pixels in each dimension into long[].
        Parameters:
        dim -