Class PixelIterator.DoubleWindow

java.lang.Object
org.apache.sis.image.PixelIterator.Window<DoubleBuffer>
org.apache.sis.image.PixelIterator.DoubleWindow
Enclosing class:
PixelIterator

private final class PixelIterator.DoubleWindow extends PixelIterator.Window<DoubleBuffer>
PixelIterator.Window implementation backed by an array of double[]. This is the implementation used by Apache SIS for most computations.
Performance note Java2D has numerous optimizations for the integer cases, with no equivalent for the floating point cases. Consequently, if the data buffer is known to use some integer type, it is faster to get integer values and convert them to double values instead of to request directly floating-point values. However, the improvement is not as much as using BandedIterator as least for small windows. For that reason, we do not provide the "integers converted to doubles" performance workaround for now. Even if we provided it, this DoubleWindow would still be necessary for the general case (non-integer data buffers).
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final double[]
    Sample values in the window (data) and a temporary array (transfer).
    private final double[]
    Sample values in the window (data) and a temporary array (transfer).

    Fields inherited from class org.apache.sis.image.PixelIterator.Window

    DIRECT, TRANSFER, TRANSFER_FROM_OTHER, values
  • Constructor Summary

    Constructors
    Constructor
    Description
    DoubleWindow(double[] data, double[] transfer)
    Creates a new window which will store the sample values in the given data array.
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) Object
    getPixels(Raster raster, int subX, int subY, int subWidth, int subHeight, int mode)
    Performs the transfer between the underlying raster and this window.
    (package private) final PixelIterator
    Returns the iterator that created this window.
    void
    Updates this window with the sample values in the region starting at current iterator position.

    Methods inherited from class org.apache.sis.image.PixelIterator.Window

    getSize

    Methods inherited from class java.lang.Object

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

    • data

      private final double[] data
      Sample values in the window (data) and a temporary array (transfer). Those arrays are overwritten when update() is invoked.
    • transfer

      private final double[] transfer
      Sample values in the window (data) and a temporary array (transfer). Those arrays are overwritten when update() is invoked.
  • Constructor Details

    • DoubleWindow

      DoubleWindow(double[] data, double[] transfer)
      Creates a new window which will store the sample values in the given data array.
  • Method Details