Interface ImageDataOp

All Superinterfaces:
qupath.lib.io.UriResource

public interface ImageDataOp extends qupath.lib.io.UriResource
Request pixels from an image, potentially applying further transforms.
  • Method Summary

    Modifier and Type
    Method
    Description
    Append one or more additional ImageOps sequentially.
    apply(qupath.lib.images.ImageData<BufferedImage> imageData, qupath.lib.regions.RegionRequest request)
    Apply the operation to the requested region of the image.
    List<qupath.lib.images.servers.ImageChannel>
    getChannels(qupath.lib.images.ImageData<BufferedImage> imageData)
    Get appropriate channels to reflect the output of this transform, given the input.
    qupath.lib.images.servers.PixelType
    getOutputType(qupath.lib.images.servers.PixelType inputType)
    Get the output pixel type.
    boolean
    supportsImage(qupath.lib.images.ImageData<BufferedImage> imageData)
    Query whether this transform can be applied to the specified image.

    Methods inherited from interface qupath.lib.io.UriResource

    getUris, getURIs, updateUris, updateURIs
  • Method Details

    • apply

      Mat apply(qupath.lib.images.ImageData<BufferedImage> imageData, qupath.lib.regions.RegionRequest request) throws IOException
      Apply the operation to the requested region of the image.

      The data and region are provided, rather than specified pixels, because the operation might require additional information available within the ImageData, and optionally adjust the request (e.g. to incorporate padding to remove boundary artifacts).

      Note for implementers: Any such padding must be removed from the output before it is returned.

      Parameters:
      imageData -
      request -
      Returns:
      Throws:
      IOException
    • supportsImage

      boolean supportsImage(qupath.lib.images.ImageData<BufferedImage> imageData)
      Query whether this transform can be applied to the specified image. Reasons why it may not be include the type or channel number being incompatible.
      Parameters:
      imageData -
      Returns:
    • getChannels

      List<qupath.lib.images.servers.ImageChannel> getChannels(qupath.lib.images.ImageData<BufferedImage> imageData)
      Get appropriate channels to reflect the output of this transform, given the input.
      Parameters:
      imageData -
      Returns:
    • appendOps

      ImageDataOp appendOps(ImageOp... ops)
      Append one or more additional ImageOps sequentially. This ImageDataOp is unchanged, and a new one is created with the additional op appended.
      Parameters:
      ops -
      Returns:
    • getOutputType

      qupath.lib.images.servers.PixelType getOutputType(qupath.lib.images.servers.PixelType inputType)
      Get the output pixel type.
      Parameters:
      inputType - the pixel type of the input image
      Returns:
      the output pixel type