Class cam.visuals.contours.ColorContourCanvas

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----cam.visuals.contours.ColorContourCanvas

public class ColorContourCanvas
extends Canvas
This class creates a color contour for a two dimensional (rectangular) data set. The color contour is created by coloring squares of a grid with colors that are associated with the data set function values. The grid used for the contour need not match the size of the data set - the data set is bi-linearly interpolated to get any needed function values.


Constructor Index

 o ColorContourCanvas()

Method Index

 o getColorCount()
Returns the number of colors used in the color table.
 o getMinimumSize()
 o getPreferredSize()
 o getResolution()
Returns the number of panels of the color contour grid.
 o paint(Graphics)
 o setColorCount(int)
Sets the number of colors used in the color table.
 o setColorTableEntry(int, double, double, double)
Sets a specific color table entry.
 o setData(double[], int, int)
Sets the data to be contoured.
 o setData(double[][])
Sets the data to be contoured.
 o setDataRange()
Determines and then sets the data range to be the maximal and minimal values of contour data.
 o setDataRange(double, double)
Sets the maximal and minimal values of the data range that will be contoured.
 o setResolution(int)
Sets the resolution of the color contour plot
 o setupColors()
Sets up a default color table.
 o setupColorTable(double[], double[], double[])
Sets up color table with values from the r,g and b arrays.

Constructors

 o ColorContourCanvas
 public ColorContourCanvas()

Methods

 o setData
 public void setData(double inputData[],
                     int xCount,
                     int yCount)
Sets the data to be contoured.

Parameters:
inputData - one dimensional array of doubles containing the two dimensional data set values. It is assumed that the two dimensional data is stored by rows
xCount - the number of data values in the x direction
yCount - the number of data values in the y direction
 o setData
 public void setData(double inputData[][])
Sets the data to be contoured.

Parameters:
inputData - two dimensional array of doubles containing the data set values.
 o setDataRange
 public void setDataRange(double dMin,
                          double dMax)
Sets the maximal and minimal values of the data range that will be contoured.

Parameters:
dMin - the minimum data set value to be contoured
dMax - the maximum data set value to be contoured
 o setResolution
 public void setResolution(int PanelCount)
Sets the resolution of the color contour plot

Parameters:
PanelCount - the number of panels in the x and y directions to be used for the color contour grid.
 o getResolution
 public int getResolution()
Returns the number of panels of the color contour grid.

 o setDataRange
 public void setDataRange()
Determines and then sets the data range to be the maximal and minimal values of contour data.

 o getPreferredSize
 public Dimension getPreferredSize()
Overrides:
getPreferredSize in class Component
 o getMinimumSize
 public Dimension getMinimumSize()
Overrides:
getMinimumSize in class Component
 o paint
 public void paint(Graphics g)
Overrides:
paint in class Canvas
 o setupColorTable
 public void setupColorTable(double r[],
                             double g[],
                             double b[])
Sets up color table with values from the r,g and b arrays.

Parameters:
r,g,b - double arrays with values in the range [0.0, 1.0] specifying the red, green and blue components of the colors to be used in the contour.
 o getColorCount
 public int getColorCount()
Returns the number of colors used in the color table.

 o setColorCount
 public void setColorCount(int cCount)
Sets the number of colors used in the color table.

 o setColorTableEntry
 public void setColorTableEntry(int index,
                                double r,
                                double g,
                                double b)
Sets a specific color table entry.

 o setupColors
 public void setupColors()
Sets up a default color table.