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

Extend JS api for segment (groups) #7332

Merged
merged 9 commits into from
Sep 18, 2023
Merged

Extend JS api for segment (groups) #7332

merged 9 commits into from
Sep 18, 2023

Conversation

philippotto
Copy link
Member

@philippotto philippotto commented Sep 14, 2023

URL of deployed dev instance (used for testing):

  • https://___.webknossos.xyz

Steps to test:

  • create a new volume annotation
  • execute this code line by line:
const tracingId = webknossos.apiInterface.data.getVolumeTracingLayerIds()[0];

webknossos.apiInterface.tracing.registerSegment(1, [2712, 2712, 992], null, tracingId)
webknossos.apiInterface.tracing.removeSegment(1, tracingId)
webknossos.apiInterface.tracing.registerSegment(1, [2712, 2712, 992], null, tracingId)
webknossos.apiInterface.tracing.updateSegment(1, {name: "Special Segment"}, tracingId)

webknossos.apiInterface.tracing.createSegmentGroup("Test Group 1", null, tracingId)
webknossos.apiInterface.tracing.createSegmentGroup("Test Group 2", null, tracingId)
webknossos.apiInterface.tracing.createSegmentGroup("Test Group 3", 1, tracingId)
webknossos.apiInterface.tracing.updateSegment(1, {name: "Special Segment", groupId: 2}, tracingId)
webknossos.apiInterface.tracing.updateSegment(1, {name: "Special Segment", groupId: 3}, tracingId)
webknossos.apiInterface.tracing.renameSegmentGroup(1, "New Group Name", tracingId)
webknossos.apiInterface.tracing.deleteSegmentGroup(-1, true, tracingId)

Issues:


(Please delete unneeded items, merge only when none are left open)

@philippotto philippotto self-assigned this Sep 15, 2023
@philippotto philippotto changed the title [WIP] Extend JS api for segment (groups) Extend JS api for segment (groups) Sep 15, 2023
@philippotto philippotto marked this pull request as ready for review September 15, 2023 12:25
Copy link
Member

@normanrz normanrz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

@philippotto philippotto enabled auto-merge (squash) September 18, 2023 11:27
@philippotto philippotto merged commit 6d2a4b0 into master Sep 18, 2023
2 checks passed
@philippotto philippotto deleted the segments-api branch September 18, 2023 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add segment groups to Frontend-API
2 participants