Modifier and Type | Class and Description |
---|---|
static class |
ColorMaps.CommonLabelMaps
A collection of color maps useful for displaying label images.
|
Modifier | Constructor and Description |
---|---|
protected |
ColorMaps()
Protected constructor to prevent class instantiation while allowing
sub-classing for retro-compatibility.
|
Modifier and Type | Method and Description |
---|---|
static byte[][] |
circularLut(byte[][] baseLut,
int nColors)
Creates a cyclic LUT from base LUT values such that the result array has
the specified number of colors.
|
static ColorModel |
createColorModel(byte[][] cmap)
Creates a Java.awt.image.ColorModel from a color map given as an triplet
of byte arrays.
|
static ColorModel |
createColorModel(byte[][] cmap,
Color bg)
Creates a Java.awt.image.ColorModel from a color map given as an triplet
of byte arrays, and a color for the background that will be associated
to label 0.
|
static byte[][] |
createFireLut()
Creates a byte array representing the Fire LUT.
|
static byte[][] |
createFireLut(int nColors)
Creates a byte array representing the Fire LUT.
|
static byte[][] |
createGlasbeyBrightLut()
Create lookup table with a maximally distinct sets of colors, retaining
only colors with high luminance, making it useful for displaying
categorical data or label maps over a black background.
|
static byte[][] |
createGlasbeyDarkLut()
Create lookup table with a maximally distinct sets of colors, retaining
only colors with low luminance, making it useful for displaying
categorical data or label maps over a white background.
|
static byte[][] |
createGlasbeyLut()
Create lookup table with a maximally distinct sets of colors (copied
from Fiji's Glasbey LUT).
|
static byte[][] |
createGoldenAngleLut(int nColors)
Make lookup table with esthetically pleasing colors based on the golden
angle
|
static byte[][] |
createGrayLut()
Creates a byte array representing the gray LUT.
|
static byte[][] |
createIceLut()
Creates a byte array representing the Ice LUT.
|
static byte[][] |
createIceLut(int nColors)
Creates a byte array representing the Ice LUT.
|
static byte[][] |
createJetLut()
Creates a byte array representing the Jet LUT.
|
static byte[][] |
createJetLut(int nColors)
Creates a byte array representing the Jet LUT.
|
static byte[][] |
createMainColorsLut()
Returns a LUT with only the 6 main colors.
|
static byte[][] |
createMixedColorsLut()
Returns a LUT with only the main colors and their mixture.
|
static byte[][] |
createRedGreenLut()
Creates a byte array representing a color gradient from red to green.
|
static byte[][] |
createRGB332Lut()
Creates a byte array representing the RGB332 LUT.
|
static byte[][] |
createSpectrumLut()
Creates a byte array representing the Spectrum LUT.
|
static byte[][] |
interpolateLut(byte[][] baseLut,
int nColors)
Interpolates between LUT values such that the result array has the
specified number of colors.
|
static byte[][] |
shuffleLut(byte[][] lut)
Creates a new LUT by applying a random permutation to the colors within the original LUT.
|
static byte[][] |
shuffleLut(byte[][] lut,
long seed)
Shuffles the LUT, using the specified seed for initializing the random
generator.
|
protected ColorMaps()
public static final ColorModel createColorModel(byte[][] cmap)
cmap
- a colormap given as a triplet of byte arrayspublic static final ColorModel createColorModel(byte[][] cmap, Color bg)
cmap
- a colormap given as a triplet of byte arraysbg
- the color associated to the backgroundpublic static final byte[][] createFireLut(int nColors)
nColors
- number of colorspublic static final byte[][] createFireLut()
public static final byte[][] createGlasbeyLut()
public static final byte[][] createGlasbeyDarkLut()
public static final byte[][] createGlasbeyBrightLut()
public static final byte[][] createGoldenAngleLut(int nColors)
nColors
- number of colors to generatepublic static final byte[][] createGrayLut()
public static final byte[][] createJetLut(int nColors)
nColors
- number of colorspublic static final byte[][] createJetLut()
public static final byte[][] createIceLut(int nColors)
nColors
- number of colorspublic static final byte[][] createIceLut()
public static final byte[][] createSpectrumLut()
public static final byte[][] createRGB332Lut()
public static final byte[][] createRedGreenLut()
public static final byte[][] createMainColorsLut()
public static final byte[][] createMixedColorsLut()
public static final byte[][] interpolateLut(byte[][] baseLut, int nColors)
baseLut
- the LUT to interpolatednColors
- the number of colors of the new LUTpublic static final byte[][] circularLut(byte[][] baseLut, int nColors)
baseLut
- the LUT to sample colors fromnColors
- the number of colors of the new LUTpublic static final byte[][] shuffleLut(byte[][] lut)
lut
- the LUT to sample colors frompublic static final byte[][] shuffleLut(byte[][] lut, long seed)
lut
- the initial values of the look-up tableseed
- the value used to initialize the random number generatorCopyright © 2014–2023 INRA-IJPB Modeling and Digital Imaging lab. All rights reserved.