Package qupath.opencv.ops
Interface ImageDataOp
- All Superinterfaces:
UriResource
Request pixels from an image, potentially applying further transforms.
- Author:
- Pete Bankhead
-
Method Summary
Modifier and TypeMethodDescriptionAppend one or more additionalImageOp
s sequentially.apply
(ImageData<BufferedImage> imageData, RegionRequest request) Apply the operation to the requested region of the image.getChannels
(ImageData<BufferedImage> imageData) Get appropriate channels to reflect the output of this transform, given the input.getOutputType
(PixelType inputType) Get the output pixel type.boolean
supportsImage
(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
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
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
Get appropriate channels to reflect the output of this transform, given the input.- Parameters:
imageData
-- Returns:
-
appendOps
Append one or more additionalImageOp
s sequentially. ThisImageDataOp
is unchanged, and a new one is created with the additional op appended.- Parameters:
ops
-- Returns:
-
getOutputType
Get the output pixel type.- Parameters:
inputType
- the pixel type of the input image- Returns:
- the output pixel type
-