Skip to content

Commit 0737af9

Browse files
fix: add in non-functional order parameter for edt, sdf, edtsq
Widespread use of this parameter means lots of breakage if we just strip it.
1 parent 276c6dd commit 0737af9

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/edt.pyx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,18 +120,14 @@ def nvl(val, default_val):
120120
@cython.binding(True)
121121
def sdf(
122122
data, anisotropy=None, black_border=False,
123-
int parallel = 1, voxel_graph=None
123+
int parallel = 1, voxel_graph=None, order=None
124124
):
125125
"""
126126
Computes the anisotropic Signed Distance Function (SDF) using the Euclidean
127127
Distance Transform (EDT) of up to 3D numpy arrays. The SDF is the same as the
128128
EDT except that the background (zero) color is also processed and assigned a
129129
negative distance.
130130
131-
data is assumed to be memory contiguous in either C (XYZ) or Fortran (ZYX) order.
132-
The algorithm works both ways, however you'll want to reverse the order of the
133-
anisotropic arguments for Fortran order.
134-
135131
Supported Data Types:
136132
(u)int8, (u)int16, (u)int32, (u)int64,
137133
float32, float64, and boolean
@@ -146,7 +142,7 @@ def sdf(
146142
black_border: (boolean) if true, consider the edge of the
147143
image to be surrounded by zeros.
148144
parallel: number of threads to use (only applies to 2D and 3D)
149-
145+
order: no longer functional, for backwards compatibility
150146
Returns: SDF of data
151147
"""
152148
def fn(labels):
@@ -206,7 +202,7 @@ def sdfsq(
206202
@cython.binding(True)
207203
def edt(
208204
data, anisotropy=None, black_border=False,
209-
int parallel=1, voxel_graph=None,
205+
int parallel=1, voxel_graph=None, order=None,
210206
):
211207
"""
212208
Computes the anisotropic Euclidean Distance Transform (EDT) of 1D, 2D, or 3D numpy arrays.
@@ -236,6 +232,7 @@ def edt(
236232
237233
See https://github.com/seung-lab/connected-components-3d/blob/master/cc3d.pyx#L743-L783
238234
for details.
235+
order: no longer functional, for backwards compatibility
239236
240237
Returns: EDT of data
241238
"""
@@ -245,7 +242,7 @@ def edt(
245242
@cython.binding(True)
246243
def edtsq(
247244
data, anisotropy=None, native_bool black_border=False,
248-
int parallel=1, voxel_graph=None
245+
int parallel=1, voxel_graph=None, order=None,
249246
):
250247
"""
251248
Computes the squared anisotropic Euclidean Distance Transform (EDT) of 1D, 2D, or 3D numpy arrays.
@@ -270,6 +267,7 @@ def edtsq(
270267
black_border: (boolean) if true, consider the edge of the
271268
image to be surrounded by zeros.
272269
parallel: number of threads to use (only applies to 2D and 3D)
270+
order: no longer functional, for backwards compatibility
273271
274272
Returns: Squared EDT of data
275273
"""

0 commit comments

Comments
 (0)