mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-29 11:01:19 +08:00
STY: Rename returned image to distinguish input from output.
This commit is contained in:
@@ -136,15 +136,13 @@ def reconstruction(image, mask, selem=None, offset=None):
|
||||
|
||||
# Create a rank-order value array so that the Cython inner-loop
|
||||
# can operate on a uniform data type
|
||||
# fragile: `reconstruction_loop` needs 'uint32' conversion by `rank_order`
|
||||
values, value_map = rank_order(values)
|
||||
rec_img, value_map = rank_order(values)
|
||||
current = value_sort[0]
|
||||
|
||||
reconstruction_loop(values, prev, next, nb_strides, current, image_stride)
|
||||
reconstruction_loop(rec_img, prev, next, nb_strides, current, image_stride)
|
||||
|
||||
# Reshape the values array to the shape of the padded image
|
||||
# and return the unpadded portion of that result
|
||||
values = value_map[values[:image_stride]]
|
||||
values.shape = np.array(image.shape) + 2 * padding
|
||||
return values[inside_slices]
|
||||
# Reshape reconstructed image to original image shape and remove padding.
|
||||
rec_img = value_map[rec_img[:image_stride]]
|
||||
rec_img.shape = np.array(image.shape) + 2 * padding
|
||||
return rec_img[inside_slices]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user