public class Contour2D extends Object
Modifier and Type | Field and Description |
---|---|
static byte |
CLOCKWISE |
static byte |
CNTRCLOCKWISE |
protected int |
cols |
protected Contour2D |
con |
static int |
DIFFICULTY_THRESHOLD |
static float |
DIMENSION_THRESHOLD |
protected int[] |
num1 |
protected int[] |
num2 |
protected int[] |
num3 |
protected int[] |
num4 |
protected int |
rows |
protected int |
scale |
protected boolean |
showgrid |
static byte |
SIDE_BOTTOM |
static byte |
SIDE_LEFT |
static byte |
SIDE_NONE |
static byte |
SIDE_RIGHT |
static byte |
SIDE_TOP |
static boolean |
TRUEVALUE |
static int |
vertexCnt |
protected float[][] |
vx1 |
protected float[][] |
vy1 |
protected int |
whichlabels |
Constructor and Description |
---|
Contour2D() |
Modifier and Type | Method and Description |
---|---|
static visad.Contour2D.ContourOutput |
contour(float[] g,
int nr,
int nc,
float[] values,
float lowlimit,
float highlimit,
float base,
boolean dash,
byte[][] auxValues,
boolean[] swap,
boolean fill,
float[][][] grd_normals,
byte[][] interval_colors,
double[] scale,
double scale_ratio,
int label_freq,
int label_line_skip,
double label_size,
boolean labelAlign,
byte[] labelColor,
Object labelFont,
boolean sphericalDisplayCS,
Gridded3DSet spatial_set) |
static void |
contour(float[] g,
int nr,
int nc,
float interval,
float lowlimit,
float highlimit,
float base,
float[][] vx1,
float[][] vy1,
int[] numv1,
byte[][] auxValues,
boolean[] swap,
boolean fill,
float[][][] grd_normals,
byte[][] interval_colors,
float[][][][] lbl_vv,
byte[][][][] lbl_cc,
float[][][] lbl_loc,
double[] scale,
double scale_ratio,
int label_freq,
int label_line_skip,
double label_size,
boolean labelAlign,
byte[] labelColor,
Object labelFont,
boolean sphericalDisplayCS,
Gridded3DSet spatial_set)
Compute contour lines for a 2-D array.
|
static int[] |
getTriOrientation(float[][] verts) |
static float[] |
intervalToLevels(float interval,
float low,
float high,
float ba,
boolean[] dash)
Returns an array of contour values and an indication on whether to use
dashed lines below the base value.
|
protected Contour2D con
protected int whichlabels
protected boolean showgrid
protected int rows
protected int cols
protected int scale
protected int[] num1
protected int[] num2
protected int[] num3
protected int[] num4
protected float[][] vx1
protected float[][] vy1
public static final int DIFFICULTY_THRESHOLD
public static final float DIMENSION_THRESHOLD
public static final byte SIDE_LEFT
public static final byte SIDE_RIGHT
public static final byte SIDE_TOP
public static final byte SIDE_BOTTOM
public static final byte SIDE_NONE
public static final byte CLOCKWISE
public static final byte CNTRCLOCKWISE
public static int vertexCnt
public static boolean TRUEVALUE
public static void contour(float[] g, int nr, int nc, float interval, float lowlimit, float highlimit, float base, float[][] vx1, float[][] vy1, int[] numv1, byte[][] auxValues, boolean[] swap, boolean fill, float[][][] grd_normals, byte[][] interval_colors, float[][][][] lbl_vv, byte[][][][] lbl_cc, float[][][] lbl_loc, double[] scale, double scale_ratio, int label_freq, int label_line_skip, double label_size, boolean labelAlign, byte[] labelColor, Object labelFont, boolean sphericalDisplayCS, Gridded3DSet spatial_set) throws VisADException
lowlimit <= V <= highlimitand
V = base + n*interval for some integer nNote that the input array, g, should be in column-major (FORTRAN) order.
g
- the 2-D array to contour.nr
- size of 2-D array in rowsnc
- size of 2-D array in columns.interval
- contour intervallowlimit
- the lower limit on values to contour.highlimit
- the upper limit on values to contour.base
- base value to start contouring at.vx1
- array to put contour line vertices (x value)vy1
- array to put contour line vertices (y value)numv1
- pointer to int to return number of vertices in vx1,vy1auxValues
- colors corresponding to grid pointsswap
- fill
- true if filling contoursgrd_normals
- interval_colors
- lbl_vv
- values for label line segmentslbl_cc
- label color tripleslbl_loc
- center points for label locationsscale_ratio
- label_size
- labelColor
- spatial_set
- VisADException
public static float[] intervalToLevels(float interval, float low, float high, float ba, boolean[] dash) throws VisADException
interval
- The contouring interval. Must be non-zero. If the interval is
negative, then contour lines less than the base will be drawn
as dashed lines. Must not be NaN.low
- The minimum contour value. The returned array will not contain
a value below this. Must not be NaN.high
- The maximum contour value. The returned array will not contain
a value above this. Must not be NaN.ba
- The base contour value. The returned values will be integer
multiples of the interval away from this this value. Must not
be NaN. dash Whether or not contour lines less than the base
should be drawn as dashed lines. This is a computed and
returned value.dash
- VisADException
- The contour interval is zero or too small.public static visad.Contour2D.ContourOutput contour(float[] g, int nr, int nc, float[] values, float lowlimit, float highlimit, float base, boolean dash, byte[][] auxValues, boolean[] swap, boolean fill, float[][][] grd_normals, byte[][] interval_colors, double[] scale, double scale_ratio, int label_freq, int label_line_skip, double label_size, boolean labelAlign, byte[] labelColor, Object labelFont, boolean sphericalDisplayCS, Gridded3DSet spatial_set) throws VisADException
VisADException
public static int[] getTriOrientation(float[][] verts)
Copyright © 1996–2023 The SSEC Visualization Project. All rights reserved.