Class RgbAccessor


public class RgbAccessor extends VectorAccessor
A special vector-valued image accessor for RGB images (direct subclass of VectorAccessor) with depth = 3 color components.
Version:
2022/09/22
  • Constructor Details

  • Method Details

    • create

    • getPix

      public float[] getPix(int u, int v)
      Description copied from class: ImageAccessor
      Returns the pixel value for the specified floating-point position as a float[] with either 1 element for scalar-valued images and or more elements (e.g., 3 for for RGB images).
      Specified by:
      getPix in class ImageAccessor
      Parameters:
      u - the x-coordinate
      v - the y-coordinate
      Returns:
      the pixel value (float[])
    • getPix

      public float[] getPix(double x, double y)
      Description copied from class: ImageAccessor
      Returns the interpolated pixel value for the specified floating-point position as a float[] with either 1 element for scalar-valued images and or more elements (e.g., 3 for for RGB images). Interpolation is used non-integer coordinates.
      Specified by:
      getPix in class ImageAccessor
      Parameters:
      x - the x-coordinate
      y - the y-coordinate
      Returns:
      the interpolated pixel value (float[])
    • setPix

      public void setPix(int u, int v, float[] valf)
      Description copied from class: ImageAccessor
      Sets the pixel value at the specified integer position. The new value must be provided as float[] with 1 element for scalar-valued images or 3 elements for RGB images.
      Specified by:
      setPix in class ImageAccessor
      Parameters:
      u - the x-coordinate
      v - the y-coordinate
      valf - the new pixel value (float[])
    • getProcessor

      Description copied from class: ImageAccessor
      Returns the source ImageProcessor associated with this ImageAccessor.
      Overrides:
      getProcessor in class ImageAccessor
      Returns:
      the image processor