Class IntervalChunks

java.lang.Object
net.imglib2.loops.IntervalChunks

public class IntervalChunks extends Object
  • Constructor Details

    • IntervalChunks

      public IntervalChunks()
  • Method Details

    • chunkInterval

      public static List<Interval> chunkInterval(Interval interval, int numberOfChunks)
      Returns a list of disjoint intervals, that covers the given interval.

      Due to the divisibility of whole numbers, it not always easy to return the correct number of intervals, in that case this method returns a larger number of intervals.

    • suggestChunkSize

      static long[] suggestChunkSize(long[] dimensions, long numberOfChunks)
      Suggest a chunk size that can be used, to divide an interval of the given dimensions, into the given number of chunks.
    • generateGrid

      static List<Interval> generateGrid(Interval interval, long[] cellDimensions)
      Returns a list of disjoint intervals, that covers the given interval. The dimension of returned intervals are equal to the given cellDimensions. With the exception of the intervals that are at the border of the given interval. These can be smaller.
    • divideAndRoundUp

      static long divideAndRoundUp(long a, long b)
      Returns a divided by b, and round up.