Documentation of 'org.jplot2d.data.ImageDataBuffer' Java class
ImageDataBuffer
org.jplot2d.data

Class ImageDataBuffer

  • Direct Known Subclasses:
    ByteDataBuffer, DoubleDataBuffer, FloatDataBuffer, IntDataBuffer, ShortDataBuffer


    public abstract class ImageDataBuffer
    extends java.lang.Object
    Warp a band of image data. The data can be in a array, a 2d array , or a nio Buffer. The ImageDataBuffer can optionally take an offset, so that data in an existing array can be used even if the interesting data doesn't start at array location zero. It can also associate with an ImageMaskBuffer, to determines whether a element is valid or not.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      abstract double[] calcMinMax(int w, int h)
      Calculate the min and max value in the given rectangle for this data buffer, and return them in a double array.
      abstract double countValid(int w, int h)
      Count the number of valid values in the given rectangle for this data buffer.
      abstract byte getByte(int x, int y)
      Returns the sample for the pixel located at (x,y) as a double.
      abstract double getDouble(int x, int y)
      Returns the sample for the pixel located at (x,y) as a double.
      abstract float getFloat(int x, int y)
      Returns the sample for the pixel located at (x,y) as a double.
      abstract int getInt(int x, int y)
      Returns the sample for the pixel located at (x,y) as a double.
      abstract short getShort(int x, int y)
      Returns the sample for the pixel located at (x,y) as a double.
      boolean hasMasks() 
      boolean isMasked(int x, int y)
      A boolean that determines for the associated element whether the value is valid or not.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • hasMasks

        public boolean hasMasks()
      • isMasked

        public boolean isMasked(int x,
                                int y)
        A boolean that determines for the associated element whether the value is valid or not. When an element of the mask is False, the corresponding element is valid and is said to be unmasked. When an element of the mask is True, the corresponding element is said to be masked (invalid).
        Parameters:
        x - The X coordinate of the pixel location
        y - The Y coordinate of the pixel location
        Returns:
        an boolean
      • getByte

        public abstract byte getByte(int x,
                                     int y)
        Returns the sample for the pixel located at (x,y) as a double.
        Parameters:
        x - The X coordinate of the pixel location
        y - The Y coordinate of the pixel location
        Returns:
        the sample for the specified pixel
      • getShort

        public abstract short getShort(int x,
                                       int y)
        Returns the sample for the pixel located at (x,y) as a double.
        Parameters:
        x - The X coordinate of the pixel location
        y - The Y coordinate of the pixel location
        Returns:
        the sample for the specified pixel
      • getInt

        public abstract int getInt(int x,
                                   int y)
        Returns the sample for the pixel located at (x,y) as a double.
        Parameters:
        x - The X coordinate of the pixel location
        y - The Y coordinate of the pixel location
        Returns:
        the sample for the specified pixel
      • getFloat

        public abstract float getFloat(int x,
                                       int y)
        Returns the sample for the pixel located at (x,y) as a double.
        Parameters:
        x - The X coordinate of the pixel location
        y - The Y coordinate of the pixel location
        Returns:
        the sample for the specified pixel
      • getDouble

        public abstract double getDouble(int x,
                                         int y)
        Returns the sample for the pixel located at (x,y) as a double.
        Parameters:
        x - The X coordinate of the pixel location
        y - The Y coordinate of the pixel location
        Returns:
        the sample for the specified pixel
      • countValid

        public abstract double countValid(int w,
                                          int h)
        Count the number of valid values in the given rectangle for this data buffer. For double and float data, NaN, POSITIVE_INFINITY and NEGATIVE_INFINITY are considered as invalid.
        Parameters:
        w - the width of the given rectangle
        h - the height of the given rectangle
        Returns:
        the number of valid values
      • calcMinMax

        public abstract double[] calcMinMax(int w,
                                            int h)
        Calculate the min and max value in the given rectangle for this data buffer, and return them in a double array. For double and float data, NaN, POSITIVE_INFINITY and NEGATIVE_INFINITY are considered as invalid and ignored.
        Parameters:
        w - the width of the given rectangle
        h - the height of the given rectangle
        Returns:
        the min and max values

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.