Class OpenCVTools.IndexedPixel

java.lang.Object
qupath.opencv.tools.OpenCVTools.IndexedPixel
Enclosing class:
OpenCVTools

public static class OpenCVTools.IndexedPixel extends Object
Class representing the indices of a pixel and its value. This has considerable overhead, so should be used sparingly.
  • Method Details

    • getX

      public int getX()
      Get x index.
      Returns:
    • getY

      public int getY()
      Get y index.
      Returns:
    • getC

      public int getC()
      Get channel index.
      Returns:
    • getInds

      public long[] getInds()
      Get the index array. Note that this returns a clone of the array.
      Returns:
      See Also:
    • getValue

      public double getValue()
      Get the value stored internally for this pixel.
      Returns:
    • getValue

      public double getValue(Indexer idx)
      Get the value from another image via its Indexer. This is equivalent to Indexer.getDouble(IndexedPixel.getInds()) but avoids copying the inds array.
      Parameters:
      idx -
      Returns:
    • distanceSq

      public long distanceSq(OpenCVTools.IndexedPixel p2)
      Get the euclidean distance to another pixel, based upon the inds array and assuming unit spacing for all dimensions.
      Parameters:
      p2 -
      Returns: