Class OpenSlide

java.lang.Object
qupath.lib.images.servers.openslide.jna.OpenSlide
All Implemented Interfaces:
Closeable, AutoCloseable

public final class OpenSlide extends Object implements Closeable
Minimal Java wrapper for OpenSlide.
  • Field Details

  • Method Details

    • dispose

      public void dispose()
      Dispose the OpenSlide object; this is equivalent to close().
    • 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

      public void paintRegionARGB(int[] dest, long x, long y, int level, int w, int h) throws IOException
      Throws:
      IOException
    • getProperties

      public Map<String,String> getProperties()
      Get an unmodifiable map of all available properties.
      Returns:
    • getAssociatedImage

      public BufferedImage getAssociatedImage(String name) throws IOException
      Get a named associated image.
      Parameters:
      name -
      Returns:
      Throws:
      IOException
    • getAssociatedImages

      public List<String> getAssociatedImages()
      Get a list of all associated image names.
      Returns:
    • close

      public void close()
      Close; this is important for cleanup.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • getICCProfileBytes

      public byte[] getICCProfileBytes() throws UnsupportedOperationException
      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).