Class IconFactory

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

public class IconFactory extends Object
Factory class for creating icons.
Author:
Pete Bankhead
  • Constructor Details

    • IconFactory

      public IconFactory()
  • Method Details

    • createPathObjectIcon

      public static Node createPathObjectIcon(PathObject pathObject, int width, int height)
      Create an icon depicting a PathObject.
      Parameters:
      pathObject - the region of interest
      width - the preferred icon width
      height - the preferred icon height
      Returns:
      a node that may be used as an icon resembling the shapes of an object's ROI(s)
    • createROIIcon

      public static Node createROIIcon(ROI roi, int width, int height, Color color)
      Create an icon depicting a ROI.
      Parameters:
      roi - the region of interest
      width - the preferred icon width
      height - the preferred icon height
      color - the icon (line) color
      Returns:
      a node that may be used as an icon resembling the shape of the ROI
    • createNode

      public static Node createNode(int width, int height, IconFactory.PathIcons type)
      Create a node from a default icon glyph.
      Parameters:
      width - preferred width of the icon node
      height - preferred height of the icon node
      type - enum identifying the icon
      Returns:
      a node that may be used as an icon
    • createIconImage

      public static Image createIconImage(IconFactory.PathIcons icon, int size)
      Create an image from a default icon glyph.
      Parameters:
      icon - the icon to use
      size - the requested size of the image
      Returns: