Package qupath.lib.images.servers
Interface FileFormatInfo.ImageCheckType
- Enclosing class:
FileFormatInfo
public static interface FileFormatInfo.ImageCheckType
Interface defining some basic image metadata that may be extracted from an image file
to help ascertain whether an
ImageServerBuilder
can handle it.-
Method Summary
Modifier and TypeMethodDescriptionGet the image description, as stored in a TIFF, or null if no description is available.getFile()
Get a File object representing the local image file - or null if no file could be found.long
Get the height of the largest image, if known.long
Get the width of the largest image, if known.boolean
Returns true if URI is for a local file known/expected to be a BigTIFF image.boolean
isNotRGB()
Returns true if we can say with reasonable confidence that the image is not RGB.boolean
isTiff()
Returns true if URI is for a local file known/expected to be a TIFF image.boolean
isURL()
Return true if URI has a scheme beginning with http.int
nImages()
Return an estimate of the number of images if known, or -1 if unknown.int
Return the number of images with the largest image size, if known, or -1 if unknown.
-
Method Details
-
isURL
boolean isURL()Return true if URI has a scheme beginning with http.- Returns:
-
isTiff
boolean isTiff()Returns true if URI is for a local file known/expected to be a TIFF image.- Returns:
-
isBigTiff
boolean isBigTiff()Returns true if URI is for a local file known/expected to be a BigTIFF image.- Returns:
-
getDescription
String getDescription()Get the image description, as stored in a TIFF, or null if no description is available.- Returns:
-
getFile
File getFile()Get a File object representing the local image file - or null if no file could be found.- Returns:
-
nImages
int nImages()Return an estimate of the number of images if known, or -1 if unknown.Note that the maximum value returned may be less than the total number of images, if scanning the full file risks being prohibitively expensive (this has been found to be the case with some non-standard TIFF images).
- Returns:
-
nImagesLargest
int nImagesLargest()Return the number of images with the largest image size, if known, or -1 if unknown.This can be used to help distinguish images that contain multiple images where each image is really another z-slice, channel or time point - rather than a macro or label, for example.
- Returns:
-
isNotRGB
boolean isNotRGB()Returns true if we can say with reasonable confidence that the image is not RGB.This information can be used to prevent readers that only support RGB images from trying to read this one. However, note that it is permissible to return false in cases where the RGB status of the image is unclear.
- Returns:
-
getLargestImageWidth
long getLargestImageWidth()Get the width of the largest image, if known.- Returns:
- the width of the largest image, or -1 if this is not known
-
getLargestImageHeight
long getLargestImageHeight()Get the height of the largest image, if known.- Returns:
- the height of the largest image, or -1 if this is not known
-