class neuroglancer.viewer_state.VisibleSegments(MutableSet[int])

Subset of visible segments within a StarredSegments object.

Public members

VisibleSegments(starred_segments: StarredSegments)

Constructs a view of the visible segments within a StarredSegments object.

__len__() -> int

Returns the number of visible segments.

clear()

Unstars all segments.

__contains__(segment_id: Any) -> bool

Checks if a segment is visible.

add(segment_id: int) -> None

Stars a segment and marks it visible.

discard(segment_id) -> None

Unstars a segment if present.

__iter__() -> Iterator[int]

Iterates over the visible segments.

copy() -> VisibleSegments

Returns a copy of the visible segment list.

__repr__()

Return repr(self).