|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.ui.colortable.ColorTableDefaults
public class ColorTableDefaults
A class to provide color tables suitable for data displays. Uses some code by Ugo Taddei. All methods are static.
| Field Summary | |
|---|---|
static String |
NAME_DEFAULT
The name of the "default" color table |
| Constructor Summary | |
|---|---|
ColorTableDefaults()
|
|
| Method Summary | |
|---|---|
static float[][] |
allOneColor(Color color)
Make a color table representing this color. |
static float[][] |
allOneColor(Color color,
boolean addAlpha)
Make a color table representing this color. |
static float[][] |
bright12()
Make 12 color bright spectrum; blue (lo) to red (hi) |
static float[][] |
bright14()
Make 14 color bright spectrum; blue (lo) to red (hi) |
static float[][] |
bright16()
Make 16 color bright spectrum; blue (lo) to red (hi) |
static float[][] |
bright38()
Make a 38-color bright spectrum; blue (low values) to red (high values). |
static ColorTable |
createColorTable(ArrayList l,
String name,
String category,
float[][] table)
Create a ColorTable and add it to the given list |
static ColorTable |
createColorTable(ArrayList l,
String name,
String category,
float[][] table,
boolean tableFlipped)
Create a ColorTable and add it to the given list |
static ColorTable |
createColorTable(ArrayList l,
String name,
String category,
float[][] table,
boolean tableFlipped,
Range range)
Create a ColorTable and add it to the given list |
static ColorTable |
createColorTable(String name,
String category,
float[][] table)
Create a ColorTable and add it to the given list |
static ArrayList |
createColorTables()
Create the default color tables |
static float[][] |
DZ1()
Make a color table for radar reflectivity as close as possible to the one used by the NWS in their web page displays of same. |
static float[][] |
DZ2()
A 2nd color table for radar reflectivity, better than DZ1 for VisAD. |
static float[][] |
grayTable(int numColors,
boolean inverse)
Make a color table ranging from black to white; linear changes in RGB amounts. |
static float[][] |
grayTable1(int len)
Make a color table ranging from black to white; linear changes in RGB amounts. |
static float[][] |
invRainbow(int len)
Make the standard VisAD inverse rainbow (red to blue) table with definable length; created by by Ugo Taddei. |
static void |
main(String[] args)
Main method |
static List |
makeGempakColorTables(String name,
String category,
String file)
Make GEMPAK color tables |
static List |
makeNclRgbColorTables(String name,
String cat,
String file,
String contents)
Make ColorTables from NCAR Command Language (NCL) RGB files |
static List |
makeRgbColorTables(String name,
String cat,
String file)
Make color tables from RGB files |
static List |
makeRgbColorTables(String name,
String cat,
String file,
List lines,
String delimiter)
Make color tables from RGB tuples in a file |
static float[][] |
makeTableFromAct(String name)
Read in and process the act color table |
static float[][] |
makeTableFromET(String name)
Read in and process the mcidas color table |
static float[][] |
makeTableFromET(String name,
boolean fromAuxdata)
Read in and process the mcidas color table |
static float[][] |
makeTableFromPal(String name)
Read in and process the pal color table |
static float[][] |
makeTableFromPal1(String name)
Read in and process the pal1 color table |
static float[][] |
makeTableFromPal2(String name)
Read in and process the pal2 color table |
static float[][] |
percentBlue(int len)
Make a color table ranging from white to dark blue, typically for parms with 0 to 100%. |
static float[][] |
percentYelGrnBlue(int len)
Make a color table ranging from yellow to blue, through green; typically for parms with values spanning 0 to 100 %. |
static float[][] |
percentYellowBlue(int len)
Make a color table ranging from yellow to dark blue, typically for parms with 0 to 100%. |
static float[][] |
precipCT1()
Make The first standard Unidata MetApps liquid precip amount color table. |
static float[][] |
rainbow(int len)
Make the standard VisAD rainbow (blue lo to red high) color table with definable length. |
static float[][] |
temperatureCT1()
Make the first temperature color table. |
static float[][] |
temperatureCT2()
Make a bright temperature spectrum; blue (lo) to red (hi) 5 deg C steps or bands; some duplicate colors below 0 Length is fixed at 21 for now. |
static float[][] |
temperatureCT3()
Make a third temperature spectrum; NEEDS WORK setRange() to -55 to 50 Celsius |
static float[][] |
temperatureCT4()
Make the fourth temperature color table. |
static float[][] |
topographyCT()
Provide a color table suitable for topography |
static float[][] |
windspeed()
make the nominal wind speed color table, based on color table temperatureCT4. |
static float[][] |
windSpeed(int len)
Make a color table ranging from white to dark blue (negatives); white to green going 0 to large positive. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String NAME_DEFAULT
| Constructor Detail |
|---|
public ColorTableDefaults()
| Method Detail |
|---|
public static ColorTable createColorTable(String name,
String category,
float[][] table)
name - The CT namecategory - Its categorytable - The actual data
public static ColorTable createColorTable(ArrayList l,
String name,
String category,
float[][] table)
l - List to add the ColorTable toname - The CT namecategory - Its categorytable - The actual data
public static ColorTable createColorTable(ArrayList l,
String name,
String category,
float[][] table,
boolean tableFlipped)
l - List to add the ColorTable toname - The CT namecategory - Its categorytable - The actual datatableFlipped - If true then the table data is not in row major order
public static ColorTable createColorTable(ArrayList l,
String name,
String category,
float[][] table,
boolean tableFlipped,
Range range)
l - List to add the ColorTable toname - The CT namecategory - Its categorytable - The actual datatableFlipped - If true then the table data is not in row major orderrange - the color table range
public static ArrayList createColorTables()
public static final float[][] rainbow(int len)
throws IllegalArgumentException
len - length; how many entries desired in the color table.
IllegalArgumentException - from construction of VisAd objects
public static final float[][] temperatureCT1()
throws IllegalArgumentException
IllegalArgumentException - from construction of VisAd objects
public static final float[][] temperatureCT4()
throws IllegalArgumentException
IllegalArgumentException - from construction of VisAd objectspublic static final float[][] temperatureCT2()
public static final float[][] temperatureCT3()
public static final float[][] precipCT1()
throws IllegalArgumentException
IllegalArgumentException - from construction of VisAd objects
public static final float[][] invRainbow(int len)
throws IllegalArgumentException
len - length; how many entries desired in the color table.
IllegalArgumentException - from construction of VisAd objects
public static final float[][] percentBlue(int len)
throws IllegalArgumentException
len - length; how many entries desired in the color table.
IllegalArgumentException - from construction of VisAd objects
public static final float[][] grayTable(int numColors,
boolean inverse)
throws IllegalArgumentException
numColors - number of descrete colors for the tableinverse - true for white to black instead of black to white
IllegalArgumentException - from construction of VisAd objects
public static final float[][] grayTable1(int len)
throws IllegalArgumentException
len - length; how many entries desired in the color table.
IllegalArgumentException - from construction of VisAd objects
public static final float[][] percentYellowBlue(int len)
throws IllegalArgumentException
len - length; how many entries desired in the color table.
IllegalArgumentException - from construction of VisAd objects
public static final float[][] percentYelGrnBlue(int len)
throws IllegalArgumentException
len - length; how many entries desired in the color table.
IllegalArgumentException - from construction of VisAd objects
public static final float[][] windSpeed(int len)
throws IllegalArgumentException
len - length; how many entries desired in the color table.
IllegalArgumentException - from construction of VisAd objectspublic static final float[][] bright38()
public static final float[][] bright16()
public static final float[][] bright14()
public static final float[][] bright12()
public static final float[][] topographyCT()
public static final float[][] allOneColor(Color color)
color - color to use
public static final float[][] allOneColor(Color color,
boolean addAlpha)
color - color to useaddAlpha - true to add an alpha channel
public static final float[][] DZ1()
public static final float[][] DZ2()
public static final float[][] windspeed()
throws IllegalArgumentException
IllegalArgumentException - from construction of VisAd objects
public static final float[][] makeTableFromET(String name)
throws IllegalArgumentException
name - File name
IllegalArgumentException
public static final float[][] makeTableFromET(String name,
boolean fromAuxdata)
throws IllegalArgumentException
name - File namefromAuxdata - Is this file from the auxdata dir
IllegalArgumentException - When bad things happen
public static final float[][] makeTableFromPal1(String name)
throws IOException
name - File name
IOException - On badness
public static final float[][] makeTableFromPal2(String name)
throws IOException
name - File name
IOException - On badness
public static List makeGempakColorTables(String name,
String category,
String file)
name - name of the tablecategory - the categoryfile - the file to read
public static void main(String[] args)
throws Exception
args - arguments
Exception - something bad happened
public static List makeNclRgbColorTables(String name,
String cat,
String file,
String contents)
throws IOException
name - name of tablecat - categoryfile - the filecontents - the file contents
IOException - problem opening file
public static List makeRgbColorTables(String name,
String cat,
String file,
List lines,
String delimiter)
name - the name of the color tablecat - the categoryfile - the file to readlines - the linesdelimiter - the rgb tuple delimiters
public static List makeRgbColorTables(String name,
String cat,
String file)
throws IOException
name - name of the color tablecat - categoryfile - the file to read
IOException - problem reading the file
public static final float[][] makeTableFromAct(String name)
throws IOException
name - File name
IOException - On badness
public static final float[][] makeTableFromPal(String name)
throws IOException
name - File name
IOException - On badness
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||