Skip to content

Simplify the segmentation workflow #929

Description

@PaulHax

Simplify the segmentation workflow

This is a first step toward a simpler, shared model for segmentation work in VolView. It
establishes common Segmentation and Segment identities that Polygon, Rectangle, and potentially
Ruler tools can target in later work. That shared foundation will also allow contours to become an
editable representation of a segment instead of remaining separate tool geometry.

Problem

VolView currently asks users to manage segment groups as well as individual segments. This
exposes storage details that most users should not need to understand:

  • Users must choose or create a segment group before working with segments.
  • Segments are split across multiple lists based on how they are stored.
  • Rendering controls are attached to groups rather than to the segmentation users think they are
    editing.
  • Tools such as Paint and Polygon must indirectly target a group and label value instead of simply
    targeting a segment.

Proposed experience

Present one Segmentation panel for the current image with one list of segments.

Users should be able to:

  • Select a segment as the target for Paint, Erase, Fill Holes, and Polygon rasterization.
  • Add and reorder individual segments.
  • Select one or more segments, then rename, recolor, lock, show, hide, delete, or change their
    rendering properties together.
  • Paint or erase a segment without removing overlapping content from other segments.
  • Use Center on segmentation to move the current image's slice views to the center of the visible
    segmentation.
  • Import or export the segmentation without choosing a segment group.

VolView should automatically manage any labelmaps, label values, layers, or other backing storage
required for those operations. When segments overlap, VolView should separate or arrange their
backing storage automatically rather than asking the user to create a group.

Center on segmentation

The Segmentation panel should include a Center on segmentation button. It should find the
world-space bounds of all visible segments and move each slice view for the current image to the
nearest slice through the center of those bounds.

The action should preserve each view's orientation and zoom. It should be disabled when the
segmentation has no visible voxels.

Rendering controls

Replace the current group controls with display settings owned by individual segments:

  • Fill opacity is adjustable per segment.
  • Outline opacity is adjustable per segment.
  • Outline thickness is adjustable per segment and is measured in pixels.
  • Visibility remains per segment.

When one segment is selected, the controls edit that segment. When multiple segments are selected,
the same controls batch-edit all selected segments, following the selection behavior used by the
vector tools and measurement list. A control should show a mixed state when the selected segments
have different values; changing it applies the new value to every selected segment without changing
their other properties.

Users should not get different rendering controls merely because segments happen to use different
backing storage.

Vector tools

Polygon remains an annotation tool in this change. Rasterizing a polygon should write to the
currently selected segment without asking the user to choose a group.

This does not yet make polygons a persistent contour representation of a segment. That can be added
later without changing the flat segmentation workflow introduced here.

Compatibility

  • Existing segment-group files and saved sessions should continue to load.
  • Their segments should appear in one flat list in a deterministic order.
  • Existing overlaps should be preserved, and newly edited segments should be allowed to overlap.
  • Existing group rendering values should become the initial values for each segment formerly in that
    group.
  • Saving should use the new segmentation-oriented state.
  • Existing painting, rendering, import, and export behavior should remain available through the new
    workflow.

Not included in this first step

  • Sparse/bounded mask storage.
  • Contours as an editable segment representation.
  • Derived segmentation surfaces in the 3D view.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions