Class BufferWrapperRaster

    • Constructor Detail

      • BufferWrapperRaster

        public BufferWrapperRaster​(int width,
                                   int height,
                                   Sector sector,
                                   BufferWrapper buffer,
                                   AVList list)
      • BufferWrapperRaster

        public BufferWrapperRaster​(int width,
                                   int height,
                                   Sector sector,
                                   BufferWrapper buffer)
    • Method Detail

      • getSizeInBytes

        public long getSizeInBytes()
        Description copied from interface: Cacheable
        Retrieves the approximate size of this object in bytes. Implementors are encouraged to calculate the exact size for smaller objects, but use approximate values for objects that include such large components that the approximation would produce an error so small that the extra computation would be wasteful.
        Specified by:
        getSizeInBytes in interface Cacheable
        Returns:
        this Cacheable object's size in bytes
      • dispose

        public void dispose()
        Description copied from interface: Disposable
        Disposes of any internal resources allocated by the object.
        Specified by:
        dispose in interface Disposable
      • getDoubleAtPosition

        public double getDoubleAtPosition​(int row,
                                          int col)
      • setDoubleAtPosition

        public void setDoubleAtPosition​(int row,
                                        int col,
                                        double value)
      • getTransparentValue

        public double getTransparentValue()
      • setTransparentValue

        public void setTransparentValue​(double transparentValue)
      • getExtremes

        public double[] getExtremes()
        Returns a two-element array containing this raster's extreme scalar values, ignoring any values marked as missing-data. This returns null if this raster contains no values, or if it contains only values marked as missing-data.
        Returns:
        a two-element array containing this raster's extreme values, or null if none exist. Entry 0 contains the minimum value; entry 1 contains the maximum value.
      • fill

        public void fill​(double value)
      • drawOnTo

        public void drawOnTo​(DataRaster canvas)
        Description copied from interface: DataRaster
        Copies this raster into a specified raster.
        Specified by:
        drawOnTo in interface DataRaster
        Parameters:
        canvas - - the raster to copy into.
      • createSubRaster

        protected BufferWrapperRaster createSubRaster​(int width,
                                                      int height,
                                                      Sector sector,
                                                      AVList params)
        This returns a new sub-raster initialized with the specified properties. Called from doGetSubRaster to create the sub-raster instance before populating its contents. This does not place any restrictions on the specified width, height, sector or params.

        This returns a BufferWrapper.ByteBufferWrapper, a subclass of BufferWrapperRaster backed by a ByteBuffer.

        Parameters:
        width - the width of the sub-raster, in pixels.
        height - the height of the sub-raster, in pixels.
        sector - the sector the sub-raster occupies.
        params - the parameters associated with the sub-raster.
        Returns:
        a new sub-raster initialized with the specified width, height, sector and params.
      • get

        protected void get​(int x,
                           int y,
                           int length,
                           double[] buffer,
                           int pos)
      • put

        protected void put​(int x,
                           int y,
                           double[] buffer,
                           int pos,
                           int length)
      • indexFor

        protected final int indexFor​(int x,
                                     int y)
      • sample

        protected static void sample​(double[] source,
                                     int x1,
                                     int x2,
                                     double xf,
                                     int y1,
                                     int y2,
                                     double yf,
                                     int width,
                                     double transparent,
                                     double[] dest,
                                     int destPos)
      • createLookupTable

        protected BufferWrapperRaster.InterpolantLookupTable createLookupTable​(int width,
                                                                               int height,
                                                                               double xMin,
                                                                               double xMax,
                                                                               double yMin,
                                                                               double yMax,
                                                                               java.awt.geom.AffineTransform lookupTransform)