bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / skimage / morphology / _grayreconstruct / reconstruction_loop
fused_cython_function
skimage.morphology._grayreconstruct:reconstruction_loop
Signature
def reconstruction_loop ( ranks , prev , next , strides , current_idx , image_stride ) Summary
The inner loop for reconstruction.
Extended Summary
This algorithm uses the rank-order of pixels. If low intensity pixels have a low rank and high intensity pixels have a high rank, then this loop performs reconstruction by dilation. If this ranking is reversed, the result is reconstruction by erosion.
For each pixel in the seed image, check its neighbors. If its neighbor's rank is below that of the current pixel, replace the neighbor's rank with the rank of the current pixel. This dilation is limited by the mask, i.e. the rank at each pixel cannot exceed the mask as that pixel.
Parameters
ranks: arrayThe rank order of the flattened seed and mask images.
prev, next: arraysIndices of previous and next pixels in rank sorted order.
strides: arrayStrides to neighbors of the current pixel.
current_idx: intIndex of highest-ranked pixel used as starting point in loop.
image_stride: intStride between seed image and mask image in
aranks.
Aliases
-
skimage.morphology._grayreconstruct.reconstruction_loop