unwrap: added 3D unwrapping (untested)

This commit is contained in:
Gregor Thalhammer
2013-11-22 10:42:27 +01:00
committed by Jostein Bø Fløystad
parent cf04965d21
commit 1b3b6985f1
3 changed files with 842 additions and 857 deletions
File diff suppressed because it is too large Load Diff
+7 -1
View File
@@ -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(),],
# ),
+18
View File
@@ -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,
)