Class ColorModels

java.lang.Object
qupath.lib.analysis.heatmaps.ColorModels

public class ColorModels extends Object
Helper class for creating a JSON-serializable way to generate a ColorModel.
  • Constructor Details

    • ColorModels

      public ColorModels()
  • Method Details

    • createColorModelBuilder

      public static ColorModels.ColorModelBuilder createColorModelBuilder(ColorModels.DisplayBand mainChannel, ColorModels.DisplayBand alphaChannel)
      Create a ColorModels.ColorModelBuilder with a main channel and an optional alpha channel.
      Parameters:
      mainChannel - the main channel to display (colormap will be used)
      alphaChannel - an optional alpha channel (colormap will be ignored)
      Returns:
      the ColorModels.ColorModelBuilder
    • createBand

      public static ColorModels.DisplayBand createBand(String colorMapName, int band, double minDisplay, double maxDisplay)
      Create a ColorModels.DisplayBand to define the colormap associated with an image band (channel).
      Parameters:
      colorMapName - name of the ColorMaps.ColorMap
      band - image band (the BufferedImage term - QuPath often refers to this as a channel)
      minDisplay - value associated with the first entry in the ColorMaps.ColorMap
      maxDisplay - value associated with the last entry in the ColorMaps.ColorMap
      Returns:
      See Also:
    • createBand

      public static ColorModels.DisplayBand createBand(String colorMapName, int band, double minDisplay, double maxDisplay, double gamma)
      Create a ColorModels.DisplayBand to define the colormap associated with an image band (channel).
      Parameters:
      colorMapName - name of the ColorMaps.ColorMap
      band - image band (the BufferedImage term - QuPath often refers to this as a channel)
      minDisplay - value associated with the first entry in the ColorMaps.ColorMap
      maxDisplay - value associated with the last entry in the ColorMaps.ColorMap, used to adjust the value nonlinearly when requesting a color
      gamma - gamma value associated with the ColorMaps.ColorMap
      Returns:
      See Also: