mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-28 11:25:42 +08:00
unwrap: added 3D unwrapping (untested)
This commit is contained in:
committed by
Jostein Bø Fløystad
parent
cf04965d21
commit
1b3b6985f1
File diff suppressed because it is too large
Load Diff
+7
-1
@@ -11,12 +11,18 @@ ext_modules = [
|
||||
],
|
||||
include_dirs = [np.get_include(),],
|
||||
),
|
||||
Extension('unwrap3D',
|
||||
['unwrap3D.pyx',
|
||||
'Hussein_3D_unwrapper_with_mask_and_wrap_around_option.c',
|
||||
],
|
||||
include_dirs = [np.get_include(),],
|
||||
),
|
||||
]
|
||||
|
||||
import numpy as np
|
||||
|
||||
setup(
|
||||
name = 'unwrp2D',
|
||||
name = 'unwrap',
|
||||
#ext_modules = cythonize(['cytransient.pyx',],
|
||||
# include_path = [np.get_include(),],
|
||||
# ),
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
cdef extern unwrap3D(float* wrapped_volume,
|
||||
float* unwrapped_volume,
|
||||
unsigned char* input_mask,
|
||||
int image_width, int image_height, int volume_depth,
|
||||
int wrap_around_x, int wrap_around_y, int wrap_around_z)
|
||||
|
||||
def _unwrap3D(float[:,:,::1] array,
|
||||
unsigned char[:,:,::1] mask,
|
||||
float[:,:,::1] unwrapped_array,
|
||||
wrap_around_x, wrap_around_y, wrap_around_z):
|
||||
unwrap3D(&array[0,0,0],
|
||||
&unwrapped_array[0,0,0],
|
||||
&mask[0,0,0],
|
||||
array.shape[0], array.shape[1], array.shape[2],
|
||||
wrap_around_x, wrap_around_y, wrap_around_z,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user