Class PixelImageIJ

java.lang.Object
qupath.imagej.tools.PixelImageIJ
All Implemented Interfaces:
SimpleImage, SimpleModifiableImage

public class PixelImageIJ extends Object implements SimpleModifiableImage
Very simple wrapper that allows some non-ImageJ-oriented QuPath commands to access ImageProcessor pixel values.
Author:
Pete Bankhead
  • Constructor Details

    • PixelImageIJ

      public PixelImageIJ(ImageProcessor ip)
      Constructor.
      Parameters:
      ip - ImageProcessor to wrap
  • Method Details

    • getValue

      public float getValue(int x, int y)
      Description copied from interface: SimpleImage
      Get the value of a single pixel as a float.
      Specified by:
      getValue in interface SimpleImage
      Parameters:
      x - x-coordinate of the pixel
      y - y-coordinate of the pixel
      Returns:
    • setValue

      public void setValue(int x, int y, float val)
      Description copied from interface: SimpleModifiableImage
      Set the value of a single pixel.
      Specified by:
      setValue in interface SimpleModifiableImage
      Parameters:
      x - x-coordinate of the pixel to set
      y - y-coordinate of the pixel to set
      val - new pixel value
    • getWidth

      public int getWidth()
      Description copied from interface: SimpleImage
      Get the image width.
      Specified by:
      getWidth in interface SimpleImage
      Returns:
    • getHeight

      public int getHeight()
      Description copied from interface: SimpleImage
      Get the image height.
      Specified by:
      getHeight in interface SimpleImage
      Returns:
    • getArray

      public float[] getArray(boolean direct)
      Description copied from interface: SimpleModifiableImage
      Request the pixel array representing all the pixels in this image, returned row-wise.
      Specified by:
      getArray in interface SimpleModifiableImage
      Parameters:
      direct - if true, the internal array will be returned if possible
      Returns: