edu.asu.cri.MirkE.gui
Class DataSetColorModel

java.lang.Object
  extended byedu.asu.cri.MirkE.gui.DataSetColorModel

public class DataSetColorModel
extends java.lang.Object

Version:
0.3.0, 2 februrary, 2004
Author:
Scott Menor

Constructor Summary
DataSetColorModel()
          Default constructor
 
Method Summary
static java.util.Map getWavelengthToCIE_XYZ()
           
static java.awt.Color observableToMeanValueMapToColor(java.util.Map observableToMeanValueMap)
           
static java.awt.Color toColor(MirkE mirke, java.util.Map observableToMinValueMap, java.util.Map observableToMeanValueMap, java.util.Map observableToMaxValueMap)
           
static java.awt.Color toColor(MirkE mirke, java.lang.String query)
           
static java.util.Vector toVector(float[] values)
          Simple conversion from an array of floats to a Vector
static float[] wavelengthToCIE_XYZcomponents(java.lang.Integer wavelength)
           
static java.awt.Color wavelengthToColor(double wavelength, double alpha)
          Convert from a wavelength of monochromatic light to an approximate Color
static java.awt.Color wavelengthToColor(java.lang.Integer wavelength, double alpha)
          Convert from a wavelength of monochromatic light to an approximate Color
static java.awt.Color wavelengthToColor(java.lang.Integer wavelength, float alpha)
          Convert from a wavelength of monochromatic light to an approximate Color
static java.awt.Color xyzToColor(float[] xyzValues)
          Convert from XYZ values to a Color
static java.awt.Color xyzToColor(float[] xyzValues, float alpha)
          Convert from XYZ values to a Color
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSetColorModel

public DataSetColorModel()
Default constructor

Method Detail

toColor

public static java.awt.Color toColor(MirkE mirke,
                                     java.lang.String query)
Parameters:
mirke -
query - HQL query
Returns:
color

toColor

public static java.awt.Color toColor(MirkE mirke,
                                     java.util.Map observableToMinValueMap,
                                     java.util.Map observableToMeanValueMap,
                                     java.util.Map observableToMaxValueMap)
                              throws MirkESystemException
Parameters:
mirke -
observableToMinValueMap -
observableToMeanValueMap -
observableToMaxValueMap -
Returns:
color
Throws:
MirkEApplicationException
MirkESystemException

getWavelengthToCIE_XYZ

public static java.util.Map getWavelengthToCIE_XYZ()
                                            throws MirkEFileNotFoundException
Returns:
wavelengthToCIE_XYZ Map from wavelength in nm to a Vector containing components of a corresponding CIE_XYZ color
Throws:
MirkEFileNotFoundException

wavelengthToCIE_XYZcomponents

public static float[] wavelengthToCIE_XYZcomponents(java.lang.Integer wavelength)
                                             throws MirkEApplicationException,
                                                    MirkEFileNotFoundException
Parameters:
wavelength -
Returns:
CIE XYZ components corresponding to a specific wavelength of monochromatic light at a standard intensity
Throws:
MirkEApplicationException
MirkEFileNotFoundException

wavelengthToColor

public static java.awt.Color wavelengthToColor(double wavelength,
                                               double alpha)
                                        throws MirkEApplicationException,
                                               MirkEFileNotFoundException
Convert from a wavelength of monochromatic light to an approximate Color

Parameters:
wavelength - an double wavelength (in nm)
alpha - The alpha channel component of the returned Color
Returns:
color
Throws:
MirkEApplicationException
MirkEFileNotFoundException

wavelengthToColor

public static java.awt.Color wavelengthToColor(java.lang.Integer wavelength,
                                               double alpha)
                                        throws MirkEApplicationException,
                                               MirkEFileNotFoundException
Convert from a wavelength of monochromatic light to an approximate Color

Parameters:
wavelength - an Integer wavelength (in nm)
alpha - The alpha channel component of the returned Color
Returns:
color
Throws:
MirkEApplicationException
MirkEFileNotFoundException

xyzToColor

public static java.awt.Color xyzToColor(float[] xyzValues)
                                 throws MirkEApplicationException
Convert from XYZ values to a Color

Parameters:
xyzValues -
Returns:
color
Throws:
MirkEApplicationException

xyzToColor

public static java.awt.Color xyzToColor(float[] xyzValues,
                                        float alpha)
                                 throws MirkEApplicationException
Convert from XYZ values to a Color

Parameters:
xyzValues -
alpha -
Returns:
color
Throws:
MirkEApplicationException

wavelengthToColor

public static java.awt.Color wavelengthToColor(java.lang.Integer wavelength,
                                               float alpha)
                                        throws MirkEApplicationException,
                                               MirkEFileNotFoundException
Convert from a wavelength of monochromatic light to an approximate Color

Parameters:
wavelength - an Integer wavelength (in nm)
alpha - The alpha channel component of the returned Color
Returns:
color
Throws:
MirkEApplicationException
MirkEFileNotFoundException

observableToMeanValueMapToColor

public static java.awt.Color observableToMeanValueMapToColor(java.util.Map observableToMeanValueMap)
                                                      throws MirkEApplicationException,
                                                             MirkEFileNotFoundException
Parameters:
observableToMeanValueMap -
Returns:
a representative Color for the observable
Throws:
MirkEApplicationException
MirkEFileNotFoundException

toVector

public static java.util.Vector toVector(float[] values)
Simple conversion from an array of floats to a Vector

Parameters:
values -
Returns:
vector


Copyright © 2004-2005 Arizona State University - Cancer Research Institute - hosted by Sourceforge. All Rights Reserved.