Package qupath.lib.images.servers
Class ImageServerMetadata.Builder
java.lang.Object
qupath.lib.images.servers.ImageServerMetadata.Builder
- Enclosing class:
- ImageServerMetadata
Builder to create a new 
ImageServerMetadata object.- 
Constructor SummaryConstructorsConstructorDescriptionBuilder()Minimal builder for a new ImageServerMetadata; further properties must be set.Builder(Class<? extends ImageServer<?>> serverClass, String path, int width, int height) Builder for a new ImageServerMetadata; further properties must be set.Builder(ImageServerMetadata metadata) Builder for a new ImageServerMetadata object that takes an existing metadata object as a starting point, but allows individual properties to be overridden.
- 
Method SummaryModifier and TypeMethodDescriptionbuild()Build anImageServerMetadata.channels(Collection<ImageChannel> channels) Specify the image channels.Specify the interpretation of channels.classificationLabels(Map<Integer, PathClass> classificationLabels) Specify the interpretation of classification labels.height(int height) Specify the full-resolution image height.Specify resolution levels, where the largest image should come first.levelsFromDownsamples(double... downsamples) Specify downsample values for pyramidal levels.magnification(double magnification) Specify a magnification value for the highest-resolution image.Specify the maximum value supported by this image.Specify the minimum value supported by this image.Specify the image name.pixelSizeMicrons(Number pixelWidthMicrons, Number pixelHeightMicrons) Specify the pixel sizes, in microns.Specify the bit-depth of the image.preferredTileSize(int tileWidth, int tileHeight) Specify the preferred tile height and width.rgb(boolean isRGB) Specify that the image stores pixels in (A)RGB form.sizeT(int sizeT) Specify the number of time points.sizeZ(int sizeZ) Specify the number of z-slices.timepoints(TimeUnit timeUnit, double... timepoints) Specify the time unit and individual time points.width(int width) Specify the full-resolution image width.zSpacingMicrons(Number zSpacingMicrons) Specify the spacing between z-slices, in microns.
- 
Constructor Details- 
BuilderBuilder for a new ImageServerMetadata object that takes an existing metadata object as a starting point, but allows individual properties to be overridden.The existing metadata will be duplicated, therefore later changes in one metadata object will not be reflected in the other. - Parameters:
- metadata-
 
- 
Builderpublic Builder()Minimal builder for a new ImageServerMetadata; further properties must be set.
- 
BuilderBuilder for a new ImageServerMetadata; further properties must be set.- Parameters:
- serverClass-
- path-
- width-
- height-
 
 
- 
- 
Method Details- 
widthSpecify the full-resolution image width.- Parameters:
- width-
- Returns:
 
- 
heightSpecify the full-resolution image height.- Parameters:
- height-
- Returns:
 
- 
minValueSpecify the minimum value supported by this image. If not provided, this will be taken from thePixelType.- Parameters:
- val-
- Returns:
- See Also:
 
- 
maxValueSpecify the maximum value supported by this image. If not provided, this will be taken from thePixelType. This purpose of this method is to support other effective bit-depths (e.g. 12-bit, 14-bit).- Parameters:
- val-
- Returns:
- See Also:
 
- 
channelTypeSpecify the interpretation of channels. If this isImageServerMetadata.ChannelType.CLASSIFICATIONit will also set the channels to be the default for this kind of server, i.e. a single channel withImageServerMetadata.DEFAULT_CLASSIFICATION_LABELS_CHANNEL.- Parameters:
- type-
- Returns:
 
- 
classificationLabelspublic ImageServerMetadata.Builder classificationLabels(Map<Integer, PathClass> classificationLabels) Specify the interpretation of classification labels. Only relevant forImageServerMetadata.ChannelType.CLASSIFICATION.- Parameters:
- classificationLabels-
- Returns:
 
- 
rgbSpecify that the image stores pixels in (A)RGB form.- Parameters:
- isRGB-
- Returns:
 
- 
pixelTypeSpecify the bit-depth of the image.- Parameters:
- pixelType-
- Returns:
 
- 
levelsFromDownsamplesSpecify downsample values for pyramidal levels. The appropriate image sizes will be computed based upon these.- Parameters:
- downsamples-
- Returns:
- See Also:
 
- 
levelspublic ImageServerMetadata.Builder levels(Collection<ImageServerMetadata.ImageResolutionLevel> levels) Specify resolution levels, where the largest image should come first.Normally level[0].width == width && level[0].height == height, but this is not strictly required; for example, it is permissible for the server to supply only resolutions lower than the full image if these ought to be upsampled elsewhere.In other words, the widthandheightencode the size of the image as it should be interpreted, while thelevelsrefer to the size of the rasters actually available here.- Parameters:
- levels-
- Returns:
 
- 
sizeZSpecify the number of z-slices.- Parameters:
- sizeZ-
- Returns:
 
- 
sizeTSpecify the number of time points.- Parameters:
- sizeT-
- Returns:
 
- 
pixelSizeMicronspublic ImageServerMetadata.Builder pixelSizeMicrons(Number pixelWidthMicrons, Number pixelHeightMicrons) Specify the pixel sizes, in microns.- Parameters:
- pixelWidthMicrons-
- pixelHeightMicrons-
- Returns:
 
- 
zSpacingMicronsSpecify the spacing between z-slices, in microns.- Parameters:
- zSpacingMicrons-
- Returns:
 
- 
timepointsSpecify the time unit and individual time points.- Parameters:
- timeUnit-
- timepoints- time points, defined in terms of timeUnits.
- Returns:
 
- 
magnificationSpecify a magnification value for the highest-resolution image.- Parameters:
- magnification-
- Returns:
 
- 
preferredTileSizeSpecify the preferred tile height and width.- Parameters:
- tileWidth-
- tileHeight-
- Returns:
 
- 
channelsSpecify the image channels.- Parameters:
- channels-
- Returns:
 
- 
nameSpecify the image name.- Parameters:
- name-
- Returns:
 
- 
buildBuild anImageServerMetadata. Note that the builder should only be used once. If a second builder is required, a new one should be initialized from an existing ImageServerMetadata object.- Returns:
 
 
-