Class Cell<A>

java.lang.Object
net.imglib2.img.cell.Cell<A>
All Implemented Interfaces:
Serializable

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

    Fields
    Modifier and Type
    Field
    Description
    protected final int[]
     
    protected final long[]
     
    protected final long[]
     
    protected final int
     
    protected final int[]
     
  • Constructor Summary

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

    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[].
    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
     

    Methods inherited from class java.lang.Object

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

    • 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 Details

    • Cell

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

    • 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 -