unwrap: rename cython functions.

This commit is contained in:
Jostein Bø Fløystad
2013-11-22 10:42:29 +01:00
parent e8fa4998ad
commit 676ba5a07e
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ cdef extern void unwrap2D(float* wrapped_image,
int image_width, int image_height,
int wrap_around_x, int wrap_around_y)
def _unwrap2D(float[:,::1] array,
def unwrap_2d(float[:,::1] array,
unsigned char[:,::1] mask,
float[:,::1] unwrapped_array,
wrap_around):
+1 -1
View File
@@ -4,7 +4,7 @@ cdef extern void unwrap3D(float* wrapped_volume,
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,
def unwrap_3d(float[:,:,::1] array,
unsigned char[:,:,::1] mask,
float[:,:,::1] unwrapped_array,
wrap_around):
+4 -4
View File
@@ -1,7 +1,7 @@
import numpy as np
from . import _unwrap_2d
from . import _unwrap_3d
from ._unwrap_2d import unwrap_2d
from ._unwrap_3d import unwrap_3d
def unwrap(image, wrap_around=False):
@@ -61,10 +61,10 @@ def unwrap(image, wrap_around=False):
image_unwrapped = np.empty(image.shape, dtype=np.float32)
if image.ndim == 2:
_unwrap_2d._unwrap2D(image_not_masked, mask, image_unwrapped,
unwrap_2d(image_not_masked, mask, image_unwrapped,
wrap_around)
elif image.ndim == 3:
_unwrap_3d._unwrap3D(image_not_masked, mask, image_unwrapped,
unwrap_3d(image_not_masked, mask, image_unwrapped,
wrap_around)
if np.ma.isMaskedArray(image):