Class ColorMaps

java.lang.Object
sc.fiji.snt.util.ColorMaps

public class ColorMaps extends Object
Utilities for colormaps and IJ lookup tables
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.imglib2.display.ColorTable
     
    static final net.imglib2.display.ColorTable
     
    static final net.imglib2.display.ColorTable
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    applyPlasma(ij.ImagePlus imp)
    Applies the "plasma" colormap to the specified (non-RGB) image
    static void
    applyPlasma(ij.ImagePlus imp, int backgroundGray, boolean inverted)
    Applies the "plasma" colormap to the specified (non-RGB) image
    static void
    applyViridis(ij.ImagePlus imp)
    Applies the "viridis" colormap to the specified (non-RGB) image
    static void
    applyViridis(ij.ImagePlus imp, int backgroundGray, boolean inverted)
    Applies the "viridis" colormap to the specified (non-RGB) image
    static org.scijava.util.ColorRGB[]
    discreteColors(net.imglib2.display.ColorTable colorTable, int n)
     
    static Color[]
    discreteColorsAWT(net.imglib2.display.ColorTable colorTable, int n)
     
    static net.imglib2.display.ColorTable
    get(String name)
    Returns a 'core' color table from its title
    static Color[]
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ICE

      public static final net.imglib2.display.ColorTable ICE
    • VIRIDIS

      public static final net.imglib2.display.ColorTable VIRIDIS
    • PLASMA

      public static final net.imglib2.display.ColorTable PLASMA
  • Constructor Details

    • ColorMaps

      public ColorMaps()
  • Method Details

    • applyViridis

      public static void applyViridis(ij.ImagePlus imp)
      Applies the "viridis" colormap to the specified (non-RGB) image
      Parameters:
      imp - A non-RGB image
    • applyViridis

      public static void applyViridis(ij.ImagePlus imp, int backgroundGray, boolean inverted)
      Applies the "viridis" colormap to the specified (non-RGB) image
      Parameters:
      imp - A non-RGB image
      backgroundGray - The gray value (8-bit scale) to be used as the first entry of the LUT. It is ignored if negative.
      inverted - If the LUT should be inverted
    • applyPlasma

      public static void applyPlasma(ij.ImagePlus imp)
      Applies the "plasma" colormap to the specified (non-RGB) image
      Parameters:
      imp - A non-RGB image
    • applyPlasma

      public static void applyPlasma(ij.ImagePlus imp, int backgroundGray, boolean inverted)
      Applies the "plasma" colormap to the specified (non-RGB) image
      Parameters:
      imp - A non-RGB image
      backgroundGray - The gray value (8-bit scale) to be used as the first entry of the LUT. It is ignored if negative.
      inverted - If the LUT should be inverted
    • get

      public static net.imglib2.display.ColorTable get(String name)
      Returns a 'core' color table from its title
      Parameters:
      name - the color table name (e.g., "fire", "viridis", etc)
      Returns:
      the color table
    • discreteColors

      public static org.scijava.util.ColorRGB[] discreteColors(net.imglib2.display.ColorTable colorTable, int n)
    • discreteColorsAWT

      public static Color[] discreteColorsAWT(net.imglib2.display.ColorTable colorTable, int n)
    • glasbeyColorsAWT

      public static Color[] glasbeyColorsAWT(int n)