mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-04 09:54:04 +08:00
unwrap: Change 3D wrapper code from float to double.
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
cdef extern void unwrap3D(float* wrapped_volume,
|
||||
float* unwrapped_volume,
|
||||
cdef extern void unwrap3D(double* wrapped_volume,
|
||||
double* 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 unwrap_3d(float[:, :, ::1] image,
|
||||
def unwrap_3d(double[:, :, ::1] image,
|
||||
unsigned char[:, :, ::1] mask,
|
||||
float[:, :, ::1] unwrapped_image,
|
||||
double[:, :, ::1] unwrapped_image,
|
||||
wrap_around):
|
||||
unwrap3D(&image[0, 0, 0],
|
||||
&unwrapped_image[0, 0, 0],
|
||||
|
||||
@@ -97,6 +97,8 @@ def unwrap_phase(image, wrap_around=False):
|
||||
unwrap_2d(image_not_masked, mask, image_unwrapped,
|
||||
wrap_around)
|
||||
elif image.ndim == 3:
|
||||
image_not_masked = np.asarray(image, dtype=np.float64, order='C')
|
||||
image_unwrapped = np.empty_like(image, dtype=np.float64, order='C')
|
||||
unwrap_3d(image_not_masked, mask, image_unwrapped,
|
||||
wrap_around)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user