public class McIdasColorTableDefaults extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME_AOD
The name of the "aod" color table
|
static java.lang.String |
NAME_COT
The name of the "cot" color table
|
Constructor and Description |
---|
McIdasColorTableDefaults() |
Modifier and Type | Method and Description |
---|---|
static ucar.unidata.util.ColorTable |
createColorTable(java.util.ArrayList l,
java.lang.String name,
java.lang.String category,
float[][] table)
_more_
|
static ucar.unidata.util.ColorTable |
createColorTable(java.util.ArrayList l,
java.lang.String name,
java.lang.String category,
float[][] table,
boolean tableFlipped)
Create a ColorTable and add it to the given list
|
static ucar.unidata.util.ColorTable |
createColorTable(java.lang.String name,
java.lang.String category,
float[][] table)
Create a ColorTable and add it to the given list
|
static java.util.List |
makeAwips2ColorTables(java.lang.String name,
java.lang.String category,
java.lang.String file)
Convert a AWIPS II ".cmap" file to an IDV
ColorTable
and add the new color table to the McIdasColorTableManager . |
private static ucar.unidata.util.ColorTable |
makeColorTable(java.lang.String name,
java.lang.String cat,
java.util.ArrayList colors)
_more_
|
static float[][] |
makeTableFromASCII(java.lang.String name)
Read in and process a hydra color table
|
private static float[][] |
processFloats(java.util.List reds,
java.util.List greens,
java.util.List blues)
Convert strings of floats to scaled colors.
|
private static float[][] |
processInts(java.util.List reds,
java.util.List greens,
java.util.List blues)
Convert strings of integers to scaled colors.
|
private static float[][] |
toArray(java.util.List colors)
Utility to convert list of colors to float array
|
public static final java.lang.String NAME_AOD
public static final java.lang.String NAME_COT
public McIdasColorTableDefaults()
public static ucar.unidata.util.ColorTable createColorTable(java.lang.String name, java.lang.String category, float[][] table)
name
- The CT namecategory
- Its categorytable
- The actual datapublic static ucar.unidata.util.ColorTable createColorTable(java.util.ArrayList l, java.lang.String name, java.lang.String category, float[][] table)
l
- _more_name
- _more_category
- _more_table
- _more_public static ucar.unidata.util.ColorTable createColorTable(java.util.ArrayList l, java.lang.String name, java.lang.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 orderpublic static final float[][] makeTableFromASCII(java.lang.String name) throws java.lang.IllegalArgumentException
name
- File namejava.lang.IllegalArgumentException
public static java.util.List makeAwips2ColorTables(java.lang.String name, java.lang.String category, java.lang.String file)
ColorTable
and add the new color table to the McIdasColorTableManager
.name
- Name to use in the color table manager.category
- Category of the color table.file
- Path to AWIPS II ".cmap" file.List
containing the newly created
ColorTable
or null
if the conversion failed.private static float[][] processInts(java.util.List reds, java.util.List greens, java.util.List blues)
reds
- Array containing red strings.greens
- Array containing green strings.blues
- Array containing blue strings.private static float[][] processFloats(java.util.List reds, java.util.List greens, java.util.List blues)
reds
- List containing red strings.greens
- List containing green strings.blues
- List containing blue strings.private static float[][] toArray(java.util.List colors)
colors
- colorsprivate static ucar.unidata.util.ColorTable makeColorTable(java.lang.String name, java.lang.String cat, java.util.ArrayList colors)
name
- _more_cat
- _more_colors
- _more_