Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

pymrm.segmentation.Segmentation

Back to module page · Back to alphabetical overview

Signature

Segmentation()

Summary

Per-cell integer labelling of one region of the spatial grid.

Documentation

Produced by segment_domain (connected components of a signed distance field) or by pymrm.construct_ibm_particles (one label per particle, which keeps touching particles distinct). The per-segment helpers (crossing_segments, segment_values, combine_interface_conditions, wall_patch, wall_values, segment_field) work with either source.

Attributes

Source

View on GitHub

class Segmentation:
    """Per-cell integer labelling of one region of the spatial grid.

    Produced by :func:`segment_domain` (connected components of a signed
    distance field) or by :func:`pymrm.construct_ibm_particles` (one label per
    particle, which keeps touching particles distinct).  The per-segment
    helpers (:func:`crossing_segments`, :func:`segment_values`,
    :func:`combine_interface_conditions`, :func:`wall_patch`,
    :func:`wall_values`, :func:`segment_field`) work with either source.

    Attributes
    ----------
    labels : ndarray of int
        Integer label field with the shape of the spatial grid.  ``0`` marks
        the *other* region; the labelled region carries ``1 .. n_segments``.
    n_segments : int
        Number of disjoint segments.
    region : {'negative', 'positive'}
        Which side of the interface was labelled (``sdf < 0`` or ``sdf >= 0``).
    connectivity : int
        Connectivity used for labelling (``1`` = faces, ``labels.ndim`` =
        including diagonals).  Reported as ``1`` for the particle path.
    sizes : ndarray of int, shape (n_segments,)
        Number of cells in each segment; ``sizes[s - 1]`` is the size of the
        segment with label ``s``.
    """

    labels: np.ndarray
    n_segments: int
    region: str
    connectivity: int
    sizes: np.ndarray

Members

connectivity

View source on GitHub

labels

View source on GitHub

n_segments

View source on GitHub

region

View source on GitHub

sizes

View source on GitHub