Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically update agglomerate skeletons during proofreading #7545

Open
4 tasks
Tracked by #7619
philippotto opened this issue Jan 11, 2024 · 0 comments
Open
4 tasks
Tracked by #7619

Automatically update agglomerate skeletons during proofreading #7545

philippotto opened this issue Jan 11, 2024 · 0 comments

Comments

@philippotto
Copy link
Member

philippotto commented Jan 11, 2024

Detailed Description

There are two ways to do volume proofreading:

  • By loading the agglomerate skeletons and deleting/merging edges by interacting with the skeleton nodes. The visible segmentation will update appropriately.
  • By activating a segment with the proofreading tool and then doing a split/merge with the context menu on another segment position (without using skeletons). Here, the agglomerate skeletons won’t update automatically currently.

In the second case, it would make sense to also update the skeletons. Either delete and refetch them or do the appropriate semantic operation (delete/create edges) in the front-end.

Todos:

  • get affected skeleton (e.g., by tree name since we know what to expect as long as the user didn't rename it). E.g., this source code: ¹
  • find edges to delete or remove given the agglomerate positions. in the min-cut case for example, these are easily available. in other cases (such as merge), the back-end probably needs to send the agglomerate positions back
  • ensure that the naming of the trees stays intact
  • disallow renaming of agglomerate trees. or alternatively, store the agglomerate ID as metadata in the tree.
// findTreeByName already exists but can be changed like this:
export function findTreeByName(
  trees: TreeMap,
  treeName: string,
  type?: TreeType | null | undefined,
): Tree | undefined {
  return _.values(trees).find(
    (tree: Tree) => tree.name === treeName && (type == null || tree.type === type),
  );
}


export function getExistingAgglomerateTree(
  skeletonTracing: SkeletonTracing,
  agglomerateId: number,
  mappingName: string,
) {
  // todo: this won't work as soon as the user renames the tree. store the original agglomerateId
  // in the tree?
  const expectedName = getTreeNameForAgglomerateSkeleton(agglomerateId, mappingName);
  return findTreeByName(skeletonTracing.trees, expectedName, "AGGLOMERATE");
}

// within the proofreading sagas:
  const skeleton = yield* select((state) => state.tracing.skeleton);

  const tree =
    clickedTree ||
    (skeleton != null
      ? getExistingAgglomerateTree(skeleton, sourceAgglomerateId, editableMappingId)
      : null);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant