Package net.imglib2

Class FinalDimensions

  • All Implemented Interfaces:
    Dimensions, EuclideanSpace

    public final class FinalDimensions
    extends java.lang.Object
    implements Dimensions
    An implementation of dimensionality that can wrap a long[] array. The same principle for wrapping as in Point is used.
    Author:
    Stephan Preibisch
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
        FinalDimensions​(int... dimensions)
      Create a FinalDimensions with a defined size
        FinalDimensions​(long... dimensions)
      Create a FinalDimensions with a defined size
      protected FinalDimensions​(long[] dimensions, boolean copy)
      Protected constructor that can re-use the passed position array.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long dimension​(int d)
      Get the number of pixels in a given dimension d.
      void dimensions​(long[] dims)
      Write the number of pixels in each dimension into long[].
      int numDimensions()
      Gets the space's number of dimensions.
      static FinalDimensions wrap​(long[] dimensions)
      Create a FinalDimensions object that stores its coordinates in the provided position array.
      • Methods inherited from class java.lang.Object

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

      • FinalDimensions

        protected FinalDimensions​(long[] dimensions,
                                  boolean copy)
        Protected constructor that can re-use the passed position array.
        Parameters:
        dimensions - array used to store the position.
        copy - flag indicating whether position array should be duplicated.
      • FinalDimensions

        public FinalDimensions​(long... dimensions)
        Create a FinalDimensions with a defined size
        Parameters:
        dimensions - the size
      • FinalDimensions

        public FinalDimensions​(int... dimensions)
        Create a FinalDimensions with a defined size
        Parameters:
        dimensions - the size
    • Method Detail

      • dimensions

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

        public long dimension​(int d)
        Description copied from interface: Dimensions
        Get the number of pixels in a given dimension d.
        Specified by:
        dimension in interface Dimensions
      • wrap

        public static FinalDimensions wrap​(long[] dimensions)
        Create a FinalDimensions object that stores its coordinates in the provided position array.
        Parameters:
        dimensions - array to use for storing the position.