-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add UI for segment statistics (volume and bbox) #7249
Conversation
@dieknolle3333 I added a draft for the route for the segment bounding box. Find it at I did not build the real implementation in the backend yet, so for now the route will always return this json: I hope to get it to return the correct numbers soon. Note that the bounding box (just as the volume) will be in voxels in the requested mag. |
I added the backend implementation now. We may in the future decide to optimize the performance further by doing both statistics in one route or use backend-internal caching, but I didn’t do that yet. @normanrz could you have a look at the backend changes? Or should we wait for Felix? |
frontend/javascripts/oxalis/view/right-border-tabs/segments_tab/segments_view.tsx
Show resolved
Hide resolved
@philippotto so it would be easily possible for me to spend another day testing and reviewing my own code. we planned that I'd finish this PR by yesterday so that I can move on to the next issue, so I fixed bigger issues that occured to me. Having this in mind I am looking forward to your feedback! |
frontend/javascripts/oxalis/view/right-border-tabs/segments_tab/segments_view.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice stuff :) I already left some feedback. let me know in case you have questions 🤙
frontend/javascripts/oxalis/view/right-border-tabs/segments_tab/segment_statistics_modal.tsx
Outdated
Show resolved
Hide resolved
frontend/javascripts/oxalis/view/right-border-tabs/segments_tab/segment_statistics_modal.tsx
Show resolved
Hide resolved
frontend/javascripts/oxalis/view/right-border-tabs/segments_tab/segment_statistics_modal.tsx
Outdated
Show resolved
Hide resolved
frontend/javascripts/oxalis/view/right-border-tabs/segments_tab/segment_statistics_modal.tsx
Outdated
Show resolved
Hide resolved
frontend/javascripts/oxalis/view/right-border-tabs/segments_tab/segment_statistics_modal.tsx
Outdated
Show resolved
Hide resolved
...os-datastore/app/com/scalableminds/webknossos/datastore/helpers/ProtoGeometryImplicits.scala
Outdated
Show resolved
Hide resolved
frontend/javascripts/oxalis/view/right-border-tabs/segments_tab/segment_statistics_modal.tsx
Outdated
Show resolved
Hide resolved
frontend/javascripts/oxalis/view/right-border-tabs/segments_tab/segments_view.tsx
Outdated
Show resolved
Hide resolved
frontend/javascripts/oxalis/view/right-border-tabs/segments_tab/segments_view.tsx
Outdated
Show resolved
Hide resolved
frontend/javascripts/oxalis/view/right-border-tabs/segments_tab/segments_view.tsx
Outdated
Show resolved
Hide resolved
const segmentStatisticsAsString = segmentInformation | ||
.map( | ||
(segmentInfo) => | ||
`${segmentInfo.segmentId},${segmentInfo.segmentName},${segmentInfo.groupId},${segmentInfo.groupName},${segmentInfo.volumeInVoxel},${segmentInfo.volumeInNm3},${segmentInfo.boundingBoxTopLeft},${segmentInfo.boundingBoxPosition}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, it's fine, but two things:
- please add a usage for
replaceAll
infrontend/javascripts/libs/browser_feature_check.tsx
so that we can warn users about it - in tsconfig you used es2022. however, you wrote above that es2021 would also suffice. I'd go with 2021 to keep things as backwards-compatible as possible for now (of course, it doesn't make a difference for the compilation output now, but other incompatibilities might sneak in later)
The CI currently fails. One error seems related to your code. The other might be due to the changed tsconfig. I think, it would be fine to add a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome :) I only changed some small details. Also, I made a performance optimization which is actually independent of your changes, but it caught my eye during testing and it was easy to realize.
Will merge as a next step 🚢
…ment-volume-route
Steps to test:
for a single segment
in segments tab
Show Segment Statistics
TODOs:
Issues:
(Please delete unneeded items, merge only when none are left open)