Package qupath.lib.experimental.pixels
Class PixelProcessor<S,T,U>
java.lang.Object
qupath.lib.experimental.pixels.PixelProcessor<S,T,U>
- Type Parameters:
S
- The type of image to processT
- The type of mask to use; often the same asS
U
- The type of output to generate
A class for tiled image processing.
The aim of this class is to make it easy to write pixel-based processing algorithms using a variety of different image representations, and also to run these in parallel.
There are four main components:
- An
ImageSupplier
that provides the image data - A
MaskSupplier
that can generate binary masks that correspond to the image - A
Processor
that processes the image data - An
OutputHandler
that handles the output of theProcessor
Processor
is the only component that needs to be written for a specific task...
and it is usually the fun bit to work on.
The other components are often very tedious to write and hard to get working correctly; also, there is much overlap in the functionality required for different tasks. For these reasons, we provide several default implementations here, written to support different image representations.
- Since:
- v0.5.0
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <S,
T, U> PixelProcessor.Builder <S, T, U> builder()
Create a new builder to construct aPixelProcessor
.void
processObjects
(ImageData<BufferedImage> imageData, Collection<? extends PathObject> pathObjects) Process objects using the defaultTaskRunner
.void
processObjects
(TaskRunner runner, ImageData<BufferedImage> imageData, Collection<? extends PathObject> pathObjects) Process objects using the specifiedTaskRunner
.
-
Method Details
-
processObjects
public void processObjects(ImageData<BufferedImage> imageData, Collection<? extends PathObject> pathObjects) Process objects using the defaultTaskRunner
.- Parameters:
imageData
-pathObjects
-
-
processObjects
public void processObjects(TaskRunner runner, ImageData<BufferedImage> imageData, Collection<? extends PathObject> pathObjects) Process objects using the specifiedTaskRunner
.- Parameters:
runner
-imageData
-pathObjects
-
-
builder
Create a new builder to construct aPixelProcessor
.- Type Parameters:
S
- the image typeT
- the mask typeU
- the output type- Returns:
-