Package qupath.lib.images.servers
Class ImageServerMetadata.ImageResolutionLevel.Builder
java.lang.Object
qupath.lib.images.servers.ImageServerMetadata.ImageResolutionLevel.Builder
- Enclosing class:
- ImageServerMetadata.ImageResolutionLevel
Builder to create a list of
ImageServerMetadata.ImageResolutionLevel to represent pyramidal resolutions.-
Constructor Summary
ConstructorsConstructorDescriptionBuilder(int fullWidth, int fullHeight) Constructor to help build a list ofImageServerMetadata.ImageResolutionLevelobjects to represent pyramidal resolutions. -
Method Summary
Modifier and TypeMethodDescriptionAdd the full-resolution image as a level of the pyramid.addLevel(double downsample, int levelWidth, int levelHeight) Add a new level by providing a downsample value, width and height.addLevel(int levelWidth, int levelHeight) Add a new level based on level dimensions, estimating the corresponding downsample value as required.Add a new level directly.addLevelByDownsample(double downsample) Add a new level, calculating dimensions using a downsample factor applied to the full-resolution image.build()Build a list of ImageResolutionLevels, which can be used with anImageServerMetadataobject.
-
Constructor Details
-
Builder
public Builder(int fullWidth, int fullHeight) Constructor to help build a list ofImageServerMetadata.ImageResolutionLevelobjects to represent pyramidal resolutions.- Parameters:
fullWidth- full-resolution image widthfullHeight- full-resolution image height
-
-
Method Details
-
addLevelByDownsample
Add a new level, calculating dimensions using a downsample factor applied to the full-resolution image.- Parameters:
downsample-- Returns:
-
addFullResolutionLevel
Add the full-resolution image as a level of the pyramid. It is not required that this form part of the pyramid in cases where this image pyramid might be used to provide a smaller overlay of a larger image, and not itself contain pixels at the highest resolution.- Returns:
-
addLevel
public ImageServerMetadata.ImageResolutionLevel.Builder addLevel(double downsample, int levelWidth, int levelHeight) Add a new level by providing a downsample value, width and height. This avoids relying on any rounding decisions made when specifying the dimensions or downsample value only.- Parameters:
downsample-levelWidth-levelHeight-- Returns:
-
addLevel
Add a new level based on level dimensions, estimating the corresponding downsample value as required.- Parameters:
levelWidth-levelHeight-- Returns:
-
addLevel
public ImageServerMetadata.ImageResolutionLevel.Builder addLevel(ImageServerMetadata.ImageResolutionLevel level) Add a new level directly.- Parameters:
level-- Returns:
-
build
Build a list of ImageResolutionLevels, which can be used with anImageServerMetadataobject.- Returns:
-