@@ -203,9 +203,9 @@ def sdfsq(
203203
204204@ cython.binding (True )
205205def edt (
206- data , anisotropy = None , black_border = False ,
207- int parallel = 1 , voxel_graph = None , order = None ,
208- ):
206+ data , anisotropy = None , black_border = False ,
207+ int parallel = 1 , voxel_graph = None , order = None ,
208+ ):
209209 """
210210 Computes the anisotropic Euclidean Distance Transform (EDT) of 1D, 2D, or 3D numpy arrays.
211211
@@ -399,27 +399,27 @@ def edt1dsq(data, anisotropy=1.0, native_bool black_border=False):
399399 return output
400400
401401def edt2d (
402- data , anisotropy = (1.0 , 1.0 ),
403- native_bool black_border = False ,
404- parallel = 1 , voxel_graph = None
405- ):
402+ data , anisotropy = (1.0 , 1.0 ),
403+ native_bool black_border = False ,
404+ parallel = 1 , voxel_graph = None
405+ ):
406406 result = edt2dsq(data, anisotropy, black_border, parallel, voxel_graph)
407407 return np.sqrt(result, result)
408408
409409def edt2dsq (
410- data , anisotropy = (1.0 , 1.0 ),
411- native_bool black_border = False ,
412- parallel = 1 , voxel_graph = None
413- ):
410+ data , anisotropy = (1.0 , 1.0 ),
411+ native_bool black_border = False ,
412+ parallel = 1 , voxel_graph = None
413+ ):
414414 if voxel_graph is not None :
415415 return __edt2dsq_voxel_graph(data, voxel_graph, anisotropy, black_border)
416416 return __edt2dsq(data, anisotropy, black_border, parallel)
417417
418418def __edt2dsq (
419- data , anisotropy = (1.0 , 1.0 ),
420- native_bool black_border = False ,
421- parallel = 1
422- ):
419+ data , anisotropy = (1.0 , 1.0 ),
420+ native_bool black_border = False ,
421+ parallel = 1
422+ ):
423423 cdef uint8_t[:,:] arr_memview8
424424 cdef uint16_t[:,:] arr_memview16
425425 cdef uint32_t[:,:] arr_memview32
@@ -620,27 +620,27 @@ def __edt2dsq_voxel_graph(
620620 return output.reshape( data.shape, order = order)
621621
622622def edt3d (
623- data , anisotropy = (1.0 , 1.0 , 1.0 ),
624- native_bool black_border = False ,
625- parallel = 1 , voxel_graph = None
626- ):
623+ data , anisotropy = (1.0 , 1.0 , 1.0 ),
624+ native_bool black_border = False ,
625+ parallel = 1 , voxel_graph = None
626+ ):
627627 result = edt3dsq(data, anisotropy, black_border, parallel, voxel_graph)
628628 return np.sqrt(result, result)
629629
630630def edt3dsq (
631- data , anisotropy = (1.0 , 1.0 , 1.0 ),
632- native_bool black_border = False ,
633- int parallel = 1 , voxel_graph = None
634- ):
631+ data , anisotropy = (1.0 , 1.0 , 1.0 ),
632+ native_bool black_border = False ,
633+ int parallel = 1 , voxel_graph = None
634+ ):
635635 if voxel_graph is not None :
636636 return __edt3dsq_voxel_graph(data, voxel_graph, anisotropy, black_border)
637637 return __edt3dsq(data, anisotropy, black_border, parallel)
638638
639639def __edt3dsq (
640- data , anisotropy = (1.0 , 1.0 , 1.0 ),
641- native_bool black_border = False ,
642- int parallel = 1
643- ):
640+ data , anisotropy = (1.0 , 1.0 , 1.0 ),
641+ native_bool black_border = False ,
642+ int parallel = 1
643+ ):
644644 cdef uint8_t[:,:,:] arr_memview8
645645 cdef uint16_t[:,:,:] arr_memview16
646646 cdef uint32_t[:,:,:] arr_memview32
0 commit comments