mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-02 19:39:55 +08:00
unwrap: Whitespace fixes and comment removal.
This commit is contained in:
@@ -1,18 +1,16 @@
|
||||
cdef extern void unwrap2D(float* wrapped_image,
|
||||
float* unwrapped_image,
|
||||
unsigned char* input_mask,
|
||||
cdef extern void unwrap2D(float* wrapped_image,
|
||||
float* unwrapped_image,
|
||||
unsigned char* input_mask,
|
||||
int image_width, int image_height,
|
||||
int wrap_around_x, int wrap_around_y)
|
||||
|
||||
def _unwrap2D(float[:,::1] array,
|
||||
def _unwrap2D(float[:,::1] array,
|
||||
unsigned char[:,::1] mask,
|
||||
float[:,::1] unwrapped_array,
|
||||
wrap_around):
|
||||
unwrap2D(&array[0,0],
|
||||
&unwrapped_array[0,0],
|
||||
&mask[0,0],
|
||||
unwrap2D(&array[0,0],
|
||||
&unwrapped_array[0,0],
|
||||
&mask[0,0],
|
||||
array.shape[1], array.shape[0],
|
||||
wrap_around[1], wrap_around[0],
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
cdef extern void unwrap3D(float* wrapped_volume,
|
||||
float* unwrapped_volume,
|
||||
unsigned char* input_mask,
|
||||
cdef extern void 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,
|
||||
def _unwrap3D(float[:,:,::1] array,
|
||||
unsigned char[:,:,::1] mask,
|
||||
float[:,:,::1] unwrapped_array,
|
||||
wrap_around):
|
||||
unwrap3D(&array[0,0,0],
|
||||
&unwrapped_array[0,0,0],
|
||||
&mask[0,0,0],
|
||||
unwrap3D(&array[0,0,0],
|
||||
&unwrapped_array[0,0,0],
|
||||
&mask[0,0,0],
|
||||
array.shape[2], array.shape[1], array.shape[0], #TODO: check!!!
|
||||
wrap_around[2], wrap_around[1], wrap_around[0],
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -71,7 +71,3 @@ def unwrap(image, wrap_around=False):
|
||||
return np.ma.array(image_unwrapped, mask=mask)
|
||||
else:
|
||||
return image_unwrapped
|
||||
|
||||
#TODO: set_fill to minimum value
|
||||
#TODO: check for empty mask, not a single contiguous pixel
|
||||
|
||||
|
||||
Reference in New Issue
Block a user