Class CellImgFactory<T extends NativeType<T>>


  • public class CellImgFactory<T extends NativeType<T>>
    extends NativeImgFactory<T>
    Factory for creating CellImgs. The cell dimensions for a standard cell can be supplied in the constructor of the factory. If no cell dimensions are given, the factory creates cells of size 10 x 10 x ... x 10.
    • Field Detail

      • defaultCellDimensions

        private final int[] defaultCellDimensions
    • Constructor Detail

      • CellImgFactory

        public CellImgFactory​(T type)
      • CellImgFactory

        public CellImgFactory​(T type,
                              int... cellDimensions)
      • CellImgFactory

        @Deprecated
        public CellImgFactory()
        Deprecated.
      • CellImgFactory

        @Deprecated
        public CellImgFactory​(int... cellDimensions)
        Deprecated.
    • Method Detail

      • getCellDimensions

        public static int[] getCellDimensions​(int[] defaultCellDimensions,
                                              int n,
                                              Fraction entitiesPerPixel)
                                       throws java.lang.IllegalArgumentException
        Computes cell size array by truncating or expanding defaultCellDimensions to length n. Then verifies that a cell does not contain more than Integer.MAX_VALUE entities.
        Parameters:
        defaultCellDimensions -
        n -
        entitiesPerPixel -
        Returns:
        Throws:
        java.lang.IllegalArgumentException
      • create

        public CellImg<T,​?> create​(int[] dimensions)
        Description copied from class: NativeImgFactory
        Create an Img<T> with the specified dimensions.

        Note: This is not a vararg function because the underlying int[] based methods already copies the int[] dimensions into a disposable long[] anyways. This would be an unnecessary copy for int... varargs.

        Overrides:
        create in class NativeImgFactory<T extends NativeType<T>>
        Returns:
        new image with the specified dimensions.
      • verifyDimensions

        @Deprecated
        public static void verifyDimensions​(int[] dimensions)
                                     throws java.lang.IllegalArgumentException
        Deprecated.
        This method has been deprecated in favor of Dimensions.verify(int...).
        Throws:
        java.lang.IllegalArgumentException
      • verifyDimensions

        @Deprecated
        public static void verifyDimensions​(long[] dimensions)
                                     throws java.lang.IllegalArgumentException
        Deprecated.
        This method has been deprecated in favor of Dimensions.verify(long...).
        Throws:
        java.lang.IllegalArgumentException