Skip to content

Commit

Permalink
Remove deprecated Linear and Enumerated axis func
Browse files Browse the repository at this point in the history
  • Loading branch information
elevans committed Jun 15, 2023
1 parent 77a2602 commit 145aa16
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/imagej/dims.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,16 +294,6 @@ def _is_numeric_scale(coords_array: np.ndarray) -> bool:
return np.issubdtype(coords_array.dtype, np.number)


def _get_enumerated_axis():
"""Get EnumeratedAxis.
EnumeratedAxis is only in releases later than March 2020. If using
an older version of ImageJ without EnumeratedAxis, use
_get_linear_axis() instead.
"""
return sj.jimport("net.imagej.axis.EnumeratedAxis")


def _get_default_linear_axis(axis_type: "jc.AxisType", values):
"""
Get an instance of a DefaultLinearAxis.
Expand All @@ -318,19 +308,6 @@ def _get_default_linear_axis(axis_type: "jc.AxisType", values):
return jc.DefaultLinearAxis(axis_type, scale, origin)


def _get_linear_axis(axis_type: "jc.AxisType", values):
"""Get linear axis.
This is used if no EnumeratedAxis is found. If EnumeratedAxis
is available, use _get_enumerated_axis() instead.
"""
DefaultLinearAxis = sj.jimport("net.imagej.axis.DefaultLinearAxis")
origin = values[0]
scale = values[1] - values[0]
axis = DefaultLinearAxis(axis_type, scale, origin)
return axis


def _dataset_to_imgplus(rai: "jc.RandomAccessibleInterval") -> "jc.ImgPlus":
"""Get an ImgPlus from a Dataset.
Expand Down

0 comments on commit 145aa16

Please sign in to comment.