Package edu.wisc.ssec.mcidasv.ui
Class McIdasColorTableDefaults
java.lang.Object
edu.wisc.ssec.mcidasv.ui.McIdasColorTableDefaults
A class to provide color tables suitable for data displays.
Uses some code by Ugo Taddei. All methods are static.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ColorTable
createColorTable
(String name, String category, float[][] table) Create a ColorTable and add it to the given liststatic ColorTable
createColorTable
(ArrayList l, String name, String category, float[][] table) _more_static ColorTable
createColorTable
(ArrayList l, String name, String category, float[][] table, boolean tableFlipped) Create a ColorTable and add it to the given liststatic List
makeAwips2ColorTables
(String name, String category, String file) Convert a AWIPS II ".cmap" file to an IDVColorTable
and add the new color table to theMcIdasColorTableManager
.private static ColorTable
makeColorTable
(String name, String cat, ArrayList colors) _more_static final float[][]
makeTableFromASCII
(String name) Read in and process a hydra color tableprivate static float[][]
processFloats
(List reds, List greens, List blues) Convert strings of floats to scaled colors.private static float[][]
processInts
(List reds, List greens, List blues) Convert strings of integers to scaled colors.private static float[][]
Utility to convert list of colors to float array
-
Field Details
-
NAME_AOD
The name of the "aod" color table- See Also:
-
NAME_COT
The name of the "cot" color table- See Also:
-
-
Constructor Details
-
McIdasColorTableDefaults
public McIdasColorTableDefaults()
-
-
Method Details
-
createColorTable
Create a ColorTable and add it to the given list- Parameters:
name
- The CT namecategory
- Its categorytable
- The actual data- Returns:
- The color table
-
createColorTable
public static ColorTable createColorTable(ArrayList l, String name, String category, float[][] table) _more_- Parameters:
l
- _more_name
- _more_category
- _more_table
- _more_- Returns:
- _more_
-
createColorTable
public static ColorTable createColorTable(ArrayList l, String name, String category, float[][] table, boolean tableFlipped) Create a ColorTable and add it to the given list- Parameters:
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- Returns:
- The color table
-
makeTableFromASCII
Read in and process a hydra color table- Parameters:
name
- File name- Returns:
- The processed CT data
- Throws:
IllegalArgumentException
-
makeAwips2ColorTables
Convert a AWIPS II ".cmap" file to an IDVColorTable
and add the new color table to theMcIdasColorTableManager
.- Parameters:
name
- Name to use in the color table manager.category
- Category of the color table.file
- Path to AWIPS II ".cmap" file.- Returns:
- Either a
List
containing the newly createdColorTable
ornull
if the conversion failed.
-
processInts
Convert strings of integers to scaled colors.- Parameters:
reds
- Array containing red strings.greens
- Array containing green strings.blues
- Array containing blue strings.- Returns:
- Color table of scaled floats.
-
processFloats
Convert strings of floats to scaled colors.- Parameters:
reds
- List containing red strings.greens
- List containing green strings.blues
- List containing blue strings.- Returns:
- Color table of scaled floats.
-
toArray
Utility to convert list of colors to float array- Parameters:
colors
- colors- Returns:
- color array
-
makeColorTable
_more_- Parameters:
name
- _more_cat
- _more_colors
- _more_- Returns:
- _more_
-