Package qupath.lib.gui.images.servers
Class RenderedImageServer.Builder
java.lang.Object
qupath.lib.gui.images.servers.RenderedImageServer.Builder
- Enclosing class:
RenderedImageServer
Builder to create an ImageServer to display rendered images, with optional overlay layers.
This provides more fine-grained control of how the rendering is performed than
RenderedImageServer.createRenderedServer(QuPathViewer)
.-
Constructor Summary
ConstructorDescriptionBuilder
(QuPathViewer viewer) Create a rendered image server build using viewer defaults.Builder
(ImageData<BufferedImage> imageData) Create a rendered image server for the specifiedImageData
; -
Method Summary
Modifier and TypeMethodDescriptionbackgroundColor
(int rgb, boolean keepAlpha) Specify a base color.backgroundColor
(Color color) Specify a base color.build()
Create the rendered image server.display
(ImageDisplay display) Deprecated.downsamples
(double... downsamples) Specify downsamples; this is especially important for 'thick' objects (annotations, TMA cores) because the downsamples define the resolutions at which these will be rendered.layers
(Collection<PathOverlay> layers) Specify one or more overlay layers as a collection.layers
(PathOverlay... layers) Specify one or more overlay layers.overlayOpacity
(double opacity) Specify the opacity for overlay layers.renderer
(ImageRenderer renderer) Specify theImageRenderer
that controls conversion to RGB.settings
(ImageDisplaySettings settings) Specify theImageDisplaySettings
that control conversion to RGB.store
(DefaultImageRegionStore store) Specify the region store used to paint the underlying image.
-
Constructor Details
-
Builder
Create a rendered image server build using viewer defaults.- Parameters:
viewer
-
-
Builder
Create a rendered image server for the specifiedImageData
;- Parameters:
imageData
-
-
-
Method Details
-
downsamples
Specify downsamples; this is especially important for 'thick' objects (annotations, TMA cores) because the downsamples define the resolutions at which these will be rendered.- Parameters:
downsamples
-- Returns:
-
display
Deprecated.Specify theImageDisplay
that controls conversion to RGB.- Parameters:
display
-- Returns:
-
settings
Specify theImageDisplaySettings
that control conversion to RGB. This will only be applied if no renderer has been set.- Parameters:
settings
-- Returns:
- Since:
- v0.5.0
- See Also:
-
renderer
Specify theImageRenderer
that controls conversion to RGB.- Parameters:
renderer
-- Returns:
- See Also:
-
overlayOpacity
Specify the opacity for overlay layers. This will be clipped to the range 0 (transparent) and 1 (opaque).- Parameters:
opacity
-- Returns:
-
layers
Specify one or more overlay layers.- Parameters:
layers
-- Returns:
-
layers
Specify one or more overlay layers as a collection.- Parameters:
layers
-- Returns:
-
store
Specify the region store used to paint the underlying image.- Parameters:
store
-- Returns:
-
backgroundColor
Specify a base color. This is useful if transparent overlays or renderers will be used.- Parameters:
color
-- Returns:
-
backgroundColor
Specify a base color. This is useful if transparent overlays or renderers will be used.- Parameters:
rgb
- packed (A)RGB version of the colorkeepAlpha
- true if the packed color contains an alpha value- Returns:
-
build
Create the rendered image server.- Returns:
- Throws:
IOException
-
renderer(ImageRenderer)
instead (since anImageDisplay
is also anImageRenderer
.