public class EnumeratedAxis extends AbstractCalibratedAxis
CalibratedAxis whose coordinate values are explicitly enumerated by
a list. Out-of-bounds calibrated values are linearly extrapolated from the
two nearest known coordinates. Non-integer calibrated values are linearly
interpolated from the two nearest integer indices.| Constructor and Description |
|---|
EnumeratedAxis(AxisType type,
double[] values)
Creates an axis whose calibrated values are defined by the given
values array. |
EnumeratedAxis(AxisType type,
List<? extends Number> values)
Creates an axis whose calibrated values are defined by the given list of
values. |
EnumeratedAxis(AxisType type,
String unit,
double[] values)
Creates an axis whose calibrated values are defined by the given
values array. |
| Modifier and Type | Method and Description |
|---|---|
double |
calibratedValue(double rawValue)
Returns a calibrated value given a raw position along the axis.
|
EnumeratedAxis |
copy()
Creates an exact duplicate of this axis.
|
boolean |
equals(Object o) |
String |
generalEquation()
Gets the general equation representing values along this axis; for
instance:
y = m*x + b. |
int |
hashCode() |
String |
particularEquation()
Gets the particular equation representing values along this axis; for
instance:
y = (14)*x + (4). |
double |
rawValue(double calibratedValue)
Returns a raw value given a calibrated position along the axis.
|
void |
setValues(double[] values)
Sets the axis's calibrated values.
|
averageScale, setUnit, unitsetType, typepublic EnumeratedAxis(AxisType type, List<? extends Number> values)
values. This is a convenience constructor which copies the list
values to a new array internally.type - The type of axis (e.g. Axes.X or Axes.TIME.values - List of calibrated values. The first element of the list is
the calibrated value at raw position 0, the second element is the
calibrated value at raw position 1, and so forth. Intermediate and
out-of-bounds calibrated values are inferred by linear
interpolation or extrapolation, respectively.public EnumeratedAxis(AxisType type, double[] values)
values array.type - The type of axis (e.g. Axes.X or Axes.TIME.values - Array of calibrated values. The first element of the array is
the calibrated value at raw position 0, the second element is the
calibrated value at raw position 1, and so forth. Intermediate and
out-of-bounds calibrated values are inferred by linear
interpolation or extrapolation, respectively.public EnumeratedAxis(AxisType type, String unit, double[] values)
values array.type - The type of axis (e.g. Axes.X or Axes.TIME.unit - The unit of the axis (e.g. microns or seconds).values - Array of calibrated values. The first element of the array is
the calibrated value at raw position 0, the second element is the
calibrated value at raw position 1, and so forth. Intermediate and
out-of-bounds calibrated values are inferred by linear
interpolation or extrapolation, respectively.public void setValues(double[] values)
values - Array of calibrated values. The first element of the array is
the calibrated value at raw position 0, the second element is the
calibrated value at raw position 1, and so forth. Intermediate and
out-of-bounds calibrated values are inferred by linear
interpolation or extrapolation, respectively.public int hashCode()
hashCode in class AbstractCalibratedAxispublic boolean equals(Object o)
equals in class AbstractCalibratedAxispublic double calibratedValue(double rawValue)
CalibratedAxispublic double rawValue(double calibratedValue)
CalibratedAxispublic String generalEquation()
CalibratedAxisy = m*x + b.public String particularEquation()
CalibratedAxisy = (14)*x + (4).public EnumeratedAxis copy()
CalibratedAxisCopyright © 2014–2022 ImageJ. All rights reserved.