Skip to content

Commit 969f7ab

Browse files
elevanshinerm
authored andcommitted
Remove unnecessary to_java() call on coords
1 parent 3543e59 commit 969f7ab

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

src/imagej/dims.py

+5-11
Original file line numberDiff line numberDiff line change
@@ -215,22 +215,16 @@ def _assign_axes(
215215
if cal_axis_type == "DefaultLinearAxis":
216216
origin = xarr.attrs["imagej"][ij_dim + "_origin"]
217217
scale = xarr.attrs["imagej"][ij_dim + "_scale"]
218-
jaxis = _str_to_cal_axis(cal_axis_type)(
219-
ax_type, scale, origin
220-
) # EE: Might need to case scale and origin as jc.Double
218+
jaxis = _str_to_cal_axis(cal_axis_type)(ax_type, scale, origin)
221219
else:
222220
try:
223-
jaxis = _str_to_cal_axis(cal_axis_type)(
224-
ax_type, sj.to_java(doub_coords)
225-
)
221+
jaxis = _str_to_cal_axis(cal_axis_type)(ax_type, doub_coords)
226222
except (JException, TypeError):
227-
jaxis = _get_fallback_linear_axis(
228-
ax_type, sj.to_java(doub_coords)
229-
)
223+
jaxis = _get_fallback_linear_axis(ax_type, doub_coords)
230224
else:
231-
jaxis = _get_fallback_linear_axis(ax_type, sj.to_java(doub_coords))
225+
jaxis = _get_fallback_linear_axis(ax_type, doub_coords)
232226
else:
233-
jaxis = _get_fallback_linear_axis(ax_type, sj.to_java(doub_coords))
227+
jaxis = _get_fallback_linear_axis(ax_type, doub_coords)
234228

235229
axes[ax_num] = jaxis
236230

0 commit comments

Comments
 (0)