{ } Raw JSON

bundles / skimage latest / skimage / morphology / _max_tree / _max_tree

fused_cython_function

skimage.morphology._max_tree:_max_tree

Signature

def   _max_tree ( image mask structure offset shape parent sorted_indices )

Summary

Build a max-tree.

Parameters

image : array

The flattened image pixels.

mask : array of int

An array of the same shape as image where each pixel contains a nonzero value if it is to be considered for the filtering. NOTE: it is essential that the border pixels (those with neighbors falling outside the volume) are all set to zero, or segfaults could occur.

structure : array of int

A list of coordinate offsets to compute the raveled coordinates of each neighbor from the raveled coordinates of the current pixel.

parent : array of int

Output image of the same shape as the input image. The value at each pixel is the parent index of this pixel in the max-tree reprentation. This array will be written to in-place.

sorted_indices : array of int

Output "list" of pixel indices, which contains an ordering of elements in the tree such that a parent of a pixel always comes before the element itself. More formally: i < j implies that j cannot be the the parent of i. This array will be written to in-place.

Aliases

  • skimage.morphology._max_tree._max_tree