Class OpenSlide
java.lang.Object
qupath.lib.images.servers.openslide.jna.OpenSlide
- All Implemented Interfaces:
Closeable
,AutoCloseable
Minimal Java wrapper for OpenSlide.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Exception thrown whenever a request is made after the OpenSlide object has been closed. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close; this is important for cleanup.void
dispose()
Dispose the OpenSlide object; this is equivalent toclose()
.getAssociatedImage
(String name) Get a named associated image.Get a list of all associated image names.byte[]
Request the bytes for an ICC profile.long
Get the height of the full-resolution image (level 0).long
Get the width of the full-resolution image (level 0).int
Get the total number of pyramid levels.long
getLevelHeight
(int level) Get the image height at the specified level.long
getLevelWidth
(int level) Get the image width at the specified level.Get an unmodifiable map of all available properties.void
paintRegionARGB
(int[] dest, long x, long y, int level, int w, int h)
-
Field Details
-
PROPERTY_NAME_COMMENT
- See Also:
-
PROPERTY_NAME_VENDOR
- See Also:
-
PROPERTY_NAME_QUICKHASH1
- See Also:
-
PROPERTY_NAME_BACKGROUND_COLOR
- See Also:
-
PROPERTY_NAME_OBJECTIVE_POWER
- See Also:
-
PROPERTY_NAME_MPP_X
- See Also:
-
PROPERTY_NAME_MPP_Y
- See Also:
-
PROPERTY_NAME_BOUNDS_X
- See Also:
-
PROPERTY_NAME_BOUNDS_Y
- See Also:
-
PROPERTY_NAME_BOUNDS_WIDTH
- See Also:
-
PROPERTY_NAME_BOUNDS_HEIGHT
- See Also:
-
-
Method Details
-
dispose
public void dispose()Dispose the OpenSlide object; this is equivalent toclose()
. -
getLevelCount
public int getLevelCount()Get the total number of pyramid levels.- Returns:
-
getLevel0Width
public long getLevel0Width()Get the width of the full-resolution image (level 0).- Returns:
-
getLevel0Height
public long getLevel0Height()Get the height of the full-resolution image (level 0).- Returns:
-
getLevelWidth
public long getLevelWidth(int level) Get the image width at the specified level.- Parameters:
level
-- Returns:
-
getLevelHeight
public long getLevelHeight(int level) Get the image height at the specified level.- Parameters:
level
-- Returns:
-
paintRegionARGB
- Throws:
IOException
-
getProperties
Get an unmodifiable map of all available properties.- Returns:
-
getAssociatedImage
Get a named associated image.- Parameters:
name
-- Returns:
- Throws:
IOException
-
getAssociatedImages
Get a list of all associated image names.- Returns:
-
close
public void close()Close; this is important for cleanup.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
getICCProfileBytes
Request the bytes for an ICC profile.- Returns:
- the bytes of an ICC profile is available, or null otherwise.
- Throws:
UnsupportedOperationException
- if an unsatisfied link error occurred, which indicates that the OpenSlide version is not compatible (it should be 4.0.0 or greater).
-