Class ColorMapCanvas

All Implemented Interfaces:
Styleable, EventTarget

public class ColorMapCanvas extends Canvas
Canvas to show the range of a ColorMap (i.e. look-up table).
  • Property Details

  • Constructor Details

    • ColorMapCanvas

      public ColorMapCanvas(double height, qupath.lib.color.ColorMaps.ColorMap colorMap, Function<Double,String> fun)
      Create a canvas that displays the range of the specified ColorMaps.ColorMap with key tooltips.
      Parameters:
      height -
      colorMap -
      fun - function to map the 256 values of the color map to a displayable string
    • ColorMapCanvas

      public ColorMapCanvas(double height, qupath.lib.color.ColorMaps.ColorMap colorMap)
      Parameters:
      height -
      colorMap -
  • Method Details

    • minHeight

      public double minHeight(double width)
      Overrides:
      minHeight in class Node
    • maxHeight

      public double maxHeight(double width)
      Overrides:
      maxHeight in class Node
    • prefHeight

      public double prefHeight(double width)
      Overrides:
      prefHeight in class Node
    • minWidth

      public double minWidth(double width)
      Overrides:
      minWidth in class Node
    • maxWidth

      public double maxWidth(double width)
      Overrides:
      maxWidth in class Node
    • isResizable

      public boolean isResizable()
      Overrides:
      isResizable in class Node
    • resize

      public void resize(double width, double height)
      Overrides:
      resize in class Node
    • setColorMap

      public void setColorMap(qupath.lib.color.ColorMaps.ColorMap ColorMap)
      Set the ColorMaps.ColorMap to display to the one with the specified list index.
      Parameters:
      ColorMap -
    • getColorMap

      public qupath.lib.color.ColorMaps.ColorMap getColorMap()
      Return the currently displayed ColorMaps.ColorMap.
      Returns:
      ColorMap
    • colorMapProperty

      public ObjectProperty<qupath.lib.color.ColorMaps.ColorMap> colorMapProperty()
      Return the ColorMap property of this canvas.
      Returns:
      ColorMap property
      See Also:
    • setTooltipFunction

      public void setTooltipFunction(Function<Double,String> fun)
      Set the function that will take a value between 0 and 255 (from the color map) and output a displayable string
      Parameters:
      fun -