Package qupath.lib.experimental.pixels
Class PixelProcessor.Builder<S,T,U>
java.lang.Object
qupath.lib.experimental.pixels.PixelProcessor.Builder<S,T,U>
- Type Parameters:
S- the image typeT- the mask typeU- the output type
- Enclosing class:
- PixelProcessor<S,
T, U>
Builder class for a
PixelProcessor-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build aPixelProcessorfrom the current state of the builder.downsample(double downsample) Set the downsample factor to use with requesting image regions.imageSupplier(ImageSupplier<S> imageSupplier) Set the image supplier.maskSupplier(MaskSupplier<S, T> maskSupplier) Set the mask supplier.merger(ObjectMerger merger) Set a merger to use.mergeSharedBoundaries(double threshold) Convenience method to set a merger that merges objects based on their shared boundary.outputHandler(OutputHandler<S, T, U> outputHandler) Set the output handler.padding(int size) Set the padding to use when extracting regions, using a symmetric padding.Set the padding to use when extracting regions.pixelSize(double pixelSize) Set the requested pixel size to use with requesting image regions.Set the processor.tile(int tileWidth, int tileHeight) Set a default tiler to use, with a specified tile size.Set a tiler to use.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
imageSupplier
Set the image supplier. This is required if the processor is to have access to pixels.- Parameters:
imageSupplier-- Returns:
-
maskSupplier
Set the mask supplier. This is optional, but without it masks will be null.- Parameters:
maskSupplier-- Returns:
-
outputHandler
Set the output handler. This is optional, for cases where the processor does not make updates to the parent object itself.- Parameters:
outputHandler-- Returns:
-
processor
Set the processor. This is required to do any interesting work.- Parameters:
processor-- Returns:
-
padding
Set the padding to use when extracting regions. Note that this is defined in pixels at the full image resolution, not the downsampled resolution.- Parameters:
padding-- Returns:
-
padding
Set the padding to use when extracting regions, using a symmetric padding. Note that this is defined in pixels at the full image resolution, not the downsampled resolution.- Parameters:
size-- Returns:
-
downsample
Set the downsample factor to use with requesting image regions.- Parameters:
downsample-- Returns:
-
pixelSize
Set the requested pixel size to use with requesting image regions. This will be converted to a downsample factor based on the image calibration.- Parameters:
pixelSize-- Returns:
-
tiler
Set a tiler to use. This is required for large regions, so that the image can be processed in tiles.- Parameters:
tiler-- Returns:
-
tile
Set a default tiler to use, with a specified tile size.- Parameters:
tileWidth-tileHeight-- Returns:
-
merger
Set a merger to use. This is currently only relevant when using a tiler.- Parameters:
merger-- Returns:
- See Also:
-
build
Build aPixelProcessorfrom the current state of the builder. This will throw an exception if any of the required components are missing.- Returns:
-