funtracks.user_actions.user_update_segmentation
UserUpdateSegmentation
UserUpdateSegmentation(
tracks: SolutionTracks,
new_value: int,
updated_pixels: list[tuple[tuple[ndarray, ...], int]],
current_track_id: int,
force: bool = False,
)
Bases: ActionGroup
Assumes that the pixels have already been updated in the project.segmentation NOTE: Re discussion with Kasia: we should have a basic action that updates the segmentation, and that is the only place the segmentation is updated. The basic add_node action doesn't have anything with pixels.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tracks
|
SolutionTracks
|
The solution tracks that the user is updating. |
required |
new_value
|
int
|
The new value that the user painted with |
required |
updated_pixels
|
list[tuple[tuple[ndarray, ...], int]]
|
A list of node update actions, consisting of a numpy multi-index, pointing to the array elements that were changed (a tuple with len ndims), and the value before the change |
required |
current_track_id
|
int
|
The track id to use if adding a new node, usually the currently selected track id in the viewer. |
required |
force
|
bool
|
Whether to force the operation by removing conflicting edges. Defaults to False. |
False
|