public class DefaultLinearAxis extends Variable2Axis implements LinearAxis
LinearAxis
.Constructor and Description |
---|
DefaultLinearAxis()
Construct a default LinearAxis.
|
DefaultLinearAxis(AxisType type)
Construct a LinearAxis of specified type.
|
DefaultLinearAxis(AxisType type,
double scale)
Construct a LinearAxis of specified type and scale.
|
DefaultLinearAxis(AxisType type,
double scale,
double origin)
Construct a LinearAxis of specified type, scale, and origin.
|
DefaultLinearAxis(AxisType type,
String unit)
Construct a LinearAxis of specified type and unit.
|
DefaultLinearAxis(AxisType type,
String unit,
double scale)
Construct a LinearAxis of specified type, unit, and scale.
|
DefaultLinearAxis(AxisType type,
String unit,
double scale,
double origin)
Construct a LinearAxis of specified type, unit, scale, and origin.
|
DefaultLinearAxis(double scale)
Construct a LinearAxis of specified scale.
|
DefaultLinearAxis(double scale,
double origin)
Construct a LinearAxis of specified scale and origin.
|
Modifier and Type | Method and Description |
---|---|
double |
calibratedValue(double rawValue)
Returns a calibrated value given a raw position along the axis.
|
DefaultLinearAxis |
copy()
Creates an exact duplicate of this axis.
|
String |
generalEquation()
Gets the general equation representing values along this axis; for
instance:
y = m*x + b . |
static double |
intercept(double x1,
double y1,
double x2,
double y2)
Returns the y intercept of the line connecting two points.
|
double |
origin() |
double |
rawValue(double calibratedValue)
Returns a raw value given a calibrated position along the axis.
|
double |
scale() |
void |
setOrigin(double origin) |
void |
setScale(double scale) |
static double |
slope(double x1,
double y1,
double x2,
double y2)
Returns the slope of the line connecting two points.
|
b, setB
a, setA
get, numVars, particularEquation, set, vars
averageScale, equals, hashCode, setUnit, unit
setType, type
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
averageScale, particularEquation, setUnit, unit
public DefaultLinearAxis()
public DefaultLinearAxis(double scale)
public DefaultLinearAxis(double scale, double origin)
public DefaultLinearAxis(AxisType type)
public DefaultLinearAxis(AxisType type, double scale)
public DefaultLinearAxis(AxisType type, double scale, double origin)
public DefaultLinearAxis(AxisType type, String unit)
public DefaultLinearAxis(AxisType type, String unit, double scale)
public static double slope(double x1, double y1, double x2, double y2)
public static double intercept(double x1, double y1, double x2, double y2)
public void setScale(double scale)
setScale
in interface LinearAxis
public double scale()
scale
in interface LinearAxis
public void setOrigin(double origin)
setOrigin
in interface LinearAxis
public double origin()
origin
in interface LinearAxis
public double calibratedValue(double rawValue)
CalibratedAxis
calibratedValue
in interface CalibratedAxis
public double rawValue(double calibratedValue)
CalibratedAxis
rawValue
in interface CalibratedAxis
public String generalEquation()
CalibratedAxis
y = m*x + b
.generalEquation
in interface CalibratedAxis
public DefaultLinearAxis copy()
CalibratedAxis
copy
in interface CalibratedAxis
copy
in interface LinearAxis
Copyright © 2014–2022 ImageJ. All rights reserved.