public final class OverlayUtil extends Object
Modifier and Type | Field and Description |
---|---|
protected static float[][] |
ARC
Computed (X, Y) pairs for top 1/2 of a unit circle.
|
protected static float |
GLOW_ALPHA
Alpha of the selection layer.
|
protected static Color |
GLOW_COLOR
Color of the selection layer.
|
protected static float |
GLOW_WIDTH
Width of the selection layer beyond the object's boundaries.
|
protected static float |
HLT_ALPHA
Alpha of the highlight layer for noded object.
|
protected static Color |
HLT_COLOR
Color of the highlight layer for noded objects.
|
protected static Color |
OUTLINE_COLOR
Color of the outline layer.
|
static String[] |
OVERLAY_TYPES
List of all OverlayObject subclasses.
|
Modifier and Type | Method and Description |
---|---|
static float[][] |
adjoin(float[][] a,
float[][] b)
Connects a pair of VisAD-style 2D arrays of points.
|
static Vector |
buildNodesSets(RealTupleType domain,
float[][] nodes,
float width)
Given a set of nodes, creates a UnionSet of Gridded2DSets to highlight the
nodes.
|
static double[][] |
floatsToPixelDoubles(DisplayImpl d,
float[][] nodes)
Casts and converts an array of floats in domain coordinates to doubles in
pixel coordinates.
|
static DataImpl |
getArrowLayer(OverlayObject obj,
TransformLink link)
Computes selection layer for OverlayArrow objects.
|
static DataImpl |
getBoxLayer(OverlayObject obj,
TransformLink link)
Computes selection layer for OverlayBox objects.
|
static DataImpl |
getLineLayer(OverlayObject obj,
TransformLink link)
Returns a selection layer for OverlayLine objects.
|
static DataImpl |
getMarkerLayer(OverlayObject obj,
TransformLink link)
Returns a selection layer for OverlayMarker objects.
|
static float |
getMultiplier(DisplayImpl display)
Returns a multiplier suitable for scaling distances to pixel coordinates.
|
static float |
getMultiplier(TransformLink link)
Returns a multiplier suitable for scaling distances to pixel coordinates.
|
static DataImpl |
getNodedLayer(OverlayObject obj,
TransformLink link)
Computes selection layer for OverlayNodedObject objects.
|
static DataImpl |
getOutlineLayer(OverlayObject obj,
TransformLink link)
Computes a standard outline layer for an OverlayObject.
|
static DataImpl |
getOvalLayer(OverlayObject obj,
TransformLink link)
Computes a selection layer for OverlayOval objects.
|
static String[] |
getOverlayTypes()
Get list of all OverlayObject subclasses.
|
static DataImpl |
getSelectionLayer(OverlayObject obj,
TransformLink link,
boolean outline)
Computes a type-specific selection layer for the given OverlayObject.
|
protected static String[] |
getStatTypes(String overlayType)
Returns statistic names for a particular class.
|
static DataImpl |
getTextLayer(OverlayObject obj,
TransformLink link)
Computes a selection layer for OverlayText objects.
|
static Vector |
makeGridded2DSets(RealTupleType domain,
float[][] nodes,
float[][] right,
float[][] left,
float width)
Makes valid Gridded2DSets from the arrays supplied.
|
static void |
print(float[] p)
Prints a point.
|
static void |
print(float[][] points)
Prints a VisAD style group of points.
|
static void |
print(float x,
float y)
Prints a point.
|
static float[] |
smooth(float[] un,
float[] cn1,
float S)
Calculates smoothed coordinates using "single exponential smoothing" as
described in Littlewood and Inman, _Computer-assisted DNA length
measurements..._.
|
protected static final float GLOW_WIDTH
protected static final float GLOW_ALPHA
protected static final Color GLOW_COLOR
protected static final Color HLT_COLOR
protected static final float HLT_ALPHA
protected static final Color OUTLINE_COLOR
protected static final float[][] ARC
public static final String[] OVERLAY_TYPES
public static String[] getOverlayTypes()
protected static String[] getStatTypes(String overlayType)
public static DataImpl getSelectionLayer(OverlayObject obj, TransformLink link, boolean outline)
public static DataImpl getArrowLayer(OverlayObject obj, TransformLink link)
public static DataImpl getBoxLayer(OverlayObject obj, TransformLink link)
public static DataImpl getLineLayer(OverlayObject obj, TransformLink link)
public static DataImpl getMarkerLayer(OverlayObject obj, TransformLink link)
public static DataImpl getNodedLayer(OverlayObject obj, TransformLink link)
public static DataImpl getOvalLayer(OverlayObject obj, TransformLink link)
public static DataImpl getTextLayer(OverlayObject obj, TransformLink link)
public static DataImpl getOutlineLayer(OverlayObject obj, TransformLink link)
public static float getMultiplier(TransformLink link)
public static float getMultiplier(DisplayImpl display)
public static float[][] adjoin(float[][] a, float[][] b)
public static Vector buildNodesSets(RealTupleType domain, float[][] nodes, float width)
public static Vector makeGridded2DSets(RealTupleType domain, float[][] nodes, float[][] right, float[][] left, float width)
nodes
- The nodes of the noded objectright
- The points on the right side of the noded object (supposing
node indices increase from left to right across the screen)left
- The points on the left side of the noded object (again
supposing node indices increase from left to right across the
screen).public static float[] smooth(float[] un, float[] cn1, float S)
public static double[][] floatsToPixelDoubles(DisplayImpl d, float[][] nodes)
public static void print(float[][] points)
public static void print(float x, float y)
public static void print(float[] p)
Copyright © 2015–2022 SciJava. All rights reserved.