The image is considered to be in (z, y, x) order, which can be surprising. More commonly, the order (x, y, z) is used. However, in 3D image analysis, 'z' is usually the "special" dimension, with, for example, a different effective resolution than the other two axes. Therefore, x and y are often processed together, or viewed as a cut-plane through the volume. So, if the order was (x, y, z) and we wanted to look at the 5th cut plane, we would write:
my_z_plane = img3d[:, :, 5]
but, assuming a C-contiguous array, this would grab a discontiguous slice of memory, which is bad for performance. In contrast, if we see the image as (z, y, x) ordered, we would do:
my_z_plane = img3d[5]
and get back a contiguous block of memory. This is better both for performance and for readability.
The input image.
The input mask.
The initial centroids obtained by SLIC as [Z, Y, X, C...].
The size of the step between two seeds in voxels.
The maximum number of k-means iterations.
The voxel spacing along each image dimension. This parameter controls the weights of the distances along z, y, and x during k-means clustering.
True to run SLIC-zero, False to run original SLIC.
The label indexing start value.
True to update centroid positions without considering pixels color.
The label field/superpixels found by SLIC.
Helper function for SLIC segmentation.
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them