net.imagej.axis

Class DefaultLinearAxis

• Constructor Summary

Constructors
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.
• Method Summary

All Methods
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.
• Methods inherited from class net.imagej.axis.Variable2Axis

`b, setB`
• Methods inherited from class net.imagej.axis.Variable1Axis

`a, setA`
• Methods inherited from class net.imagej.axis.VariableAxis

`get, numVars, particularEquation, set, vars`
• Methods inherited from class net.imagej.axis.AbstractCalibratedAxis

`averageScale, equals, hashCode, setUnit, unit`
• Methods inherited from class net.imagej.axis.DefaultTypedAxis

`setType, type`
• Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`
• Methods inherited from interface net.imagej.axis.CalibratedAxis

`averageScale, particularEquation, setUnit, unit`
• Methods inherited from interface net.imagej.axis.TypedAxis

`setType, type`
• Constructor Detail

• DefaultLinearAxis

`public DefaultLinearAxis()`
Construct a default LinearAxis. Axis type is unknown, unit is null, slope is 1.0 and intercept is 0.0.
• DefaultLinearAxis

`public DefaultLinearAxis(double scale)`
Construct a LinearAxis of specified scale. Axis type is unknown, unit is null, slope is the specified scale and intercept is 0.0.
• DefaultLinearAxis

```public DefaultLinearAxis(double scale,
double origin)```
Construct a LinearAxis of specified scale and origin. Axis type is unknown, unit is null, slope is specified scale and intercept is specified origin.
• DefaultLinearAxis

`public DefaultLinearAxis(AxisType type)`
Construct a LinearAxis of specified type. Axis type is as specified, unit is null, slope is 1.0 and intercept is 0.0.
• DefaultLinearAxis

```public DefaultLinearAxis(AxisType type,
double scale)```
Construct a LinearAxis of specified type and scale. Axis type is as specified, unit is null, slope is the specified scale and intercept is 0.0.
• DefaultLinearAxis

```public DefaultLinearAxis(AxisType type,
double scale,
double origin)```
Construct a LinearAxis of specified type, scale, and origin. Axis type is as specified, unit is null, slope is the specified scale and intercept is specified origin.
• DefaultLinearAxis

```public DefaultLinearAxis(AxisType type,
String unit)```
Construct a LinearAxis of specified type and unit. Axis type is as specified, unit is as specified, slope is 1.0 and intercept is 0.0.
• DefaultLinearAxis

```public DefaultLinearAxis(AxisType type,
String unit,
double scale)```
Construct a LinearAxis of specified type, unit, and scale. Axis type is as specified, unit is as specified, slope is the specified scale and intercept is 0.0.
• DefaultLinearAxis

```public DefaultLinearAxis(AxisType type,
String unit,
double scale,
double origin)```
Construct a LinearAxis of specified type, unit, scale, and origin. Axis type is as specified, unit is as specified, slope is the specified scale and intercept is the specified origin.
• Method Detail

• slope

```public static double slope(double x1,
double y1,
double x2,
double y2)```
Returns the slope of the line connecting two points.
• intercept

```public static double intercept(double x1,
double y1,
double x2,
double y2)```
Returns the y intercept of the line connecting two points.
• setScale

`public void setScale(double scale)`
Specified by:
`setScale` in interface `LinearAxis`
• scale

`public double scale()`
Specified by:
`scale` in interface `LinearAxis`
• setOrigin

`public void setOrigin(double origin)`
Specified by:
`setOrigin` in interface `LinearAxis`
• origin

`public double origin()`
Specified by:
`origin` in interface `LinearAxis`
• calibratedValue

`public double calibratedValue(double rawValue)`
Description copied from interface: `CalibratedAxis`
Returns a calibrated value given a raw position along the axis.
Specified by:
`calibratedValue` in interface `CalibratedAxis`
• rawValue

`public double rawValue(double calibratedValue)`
Description copied from interface: `CalibratedAxis`
Returns a raw value given a calibrated position along the axis. Returns Double.NaN if the calibrated value maps to more than one point along axis.
Specified by:
`rawValue` in interface `CalibratedAxis`
• generalEquation

`public String generalEquation()`
Description copied from interface: `CalibratedAxis`
Gets the general equation representing values along this axis; for instance: `y = m*x + b`.
Specified by:
`generalEquation` in interface `CalibratedAxis`
• copy

`public DefaultLinearAxis copy()`
Description copied from interface: `CalibratedAxis`
Creates an exact duplicate of this axis.
Specified by:
`copy` in interface `CalibratedAxis`
Specified by:
`copy` in interface `LinearAxis`