Interface RangeCopier<T>

Type Parameters:
T - a primitive array type, e.g., byte[].
All Known Implementing Classes:
ArrayImgRangeCopier, CellImgRangeCopier, PlanarImgRangeCopier

interface RangeCopier<T>
RangeCopier does the actual copying work from a NativeImg into a primitive array.

The static create(NativeImg, Ranges, MemCopy, T) method will pick the correct implementation for a given NativeImg.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    copy(long[] srcPos, T dest, int[] size)
    Copy the block starting at srcPos with the given size into the (appropriately sized) dest array.
    static <T> RangeCopier<T>
    create(NativeImg<?,?> img, Ranges findRanges, MemCopy<T> memCopy, T oob)
     
    Return a new independent instance of this RangeCopier.
  • Method Details

    • copy

      void copy(long[] srcPos, T dest, int[] size)
      Copy the block starting at srcPos with the given size into the (appropriately sized) dest array.
      Parameters:
      srcPos - min coordinates of block to copy from src Img.
      dest - destination array. Type is byte[], float[], etc, corresponding to the src Img's native type.
      size - dimensions of block to copy from src Img.
    • newInstance

      RangeCopier<T> newInstance()
      Return a new independent instance of this RangeCopier. This is used for multi-threading. The new instance works on the same source image, but has independent internal state.
      Returns:
      new independent instance of this RangeCopier
    • create

      static <T> RangeCopier<T> create(NativeImg<?,?> img, Ranges findRanges, MemCopy<T> memCopy, T oob)