Class PathObjectImageViewers

java.lang.Object
qupath.lib.gui.tools.PathObjectImageViewers

public class PathObjectImageViewers extends Object
Helper class for working with thumbnail images relating to path objects.

This handles fetching images, and then working with an ImageView or Canvas.

Since:
v0.6.0 (previously non-public)
  • Constructor Details

    • PathObjectImageViewers

      public PathObjectImageViewers()
  • Method Details

    • createTableCell

      public static <S, T extends PathObject> TableCell<S,T> createTableCell(QuPathViewer viewer, ImageServer<BufferedImage> server, boolean paintObject, double padding)
      Create a table cell to show an object.
      Type Parameters:
      S - generic type for the table
      T - generic type for the value in the table cell
      Parameters:
      viewer - the viewer used to get rendering settings and region store
      server - the server over which the object should be displayed
      paintObject - the object to display
      padding - amount of padding to add around the ROI
      Returns:
      a new table cell
    • createCanvasViewer

      public static PathObjectImageViewers.ItemViewer<PathObject,Canvas> createCanvasViewer(QuPathViewer viewer, ImageServer<BufferedImage> server, boolean paintObject)
      Create an item viewer to display a PathObject using a canvas.
      Parameters:
      viewer - the viewer used to get rendering settings and region store
      server - the image to display
      paintObject - if true, paint the object itself. Otherwise, paint only the corresponding image patch.
      Returns:
      the item viewer
    • createImageViewer

      public static PathObjectImageViewers.ItemViewer<PathObject,ImageView> createImageViewer(QuPathViewer viewer, ImageServer<BufferedImage> server, boolean paintObject)
      Create an item viewer to display a PathObject using an ImageView.
      Parameters:
      viewer - the viewer used to get rendering settings and region store
      server - the image to display
      paintObject - if true, paint the object itself. Otherwise, paint only the corresponding image patch.
      Returns:
      the item viewer