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

Make isosurfaces more robust #5102

Merged
merged 7 commits into from
Jan 28, 2021
Merged

Make isosurfaces more robust #5102

merged 7 commits into from
Jan 28, 2021

Conversation

philippotto
Copy link
Member

@philippotto philippotto commented Jan 27, 2021

  • don't crash front-end if isosurface request fails
  • retry isosurface requests if they fail
  • indicate loading state of isosurfaces also on initial request

URL of deployed dev instance (used for testing):

Steps to test:

  • open a dataset with segmentation
  • set network speed to slow
  • request an isosurface --> a loading icon should be visible as long as the request is pending
  • set network setting to offline
  • request an isosurface --> a loading icon should appear and the console should log details about retries
  • set network setting to online --> the isosurface generation should succeed on the next retry

Issues:


@philippotto philippotto self-assigned this Jan 27, 2021
@@ -207,9 +212,10 @@ function* loadIsosurfaceWithNeighbors(
seedPosition != null ? seedPosition : yield* select(state => getFlooredPosition(state.flycam));
const clippedPosition = clipPositionToCubeBoundary(position, zoomStep, resolutionInfo);
let positionsToRequest = [clippedPosition];
if (seedPosition) {
Copy link
Member Author

Choose a reason for hiding this comment

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

@grittaweisheit do you know why addIsosurfaceAction is only dispatched if there is a seedPosition ? 1) The used position is set to the current annotation position and used as a seed if seedPosition == null, so it should be fine to use that here, too? 2) I'm not really sure in which cases seedPosition is null anyway. The signature states seedPosition: ?Vector, but all callers seem to pass it if I'm not missing anything?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it is because ensureSuitableIsosurface is also called at every flycam movement, but we don't really want to add an isosurface then. And since there is no seed position in that case, that is the way I decided whether to dispatch the addIsosurfaceAction or not.

Copy link
Member Author

@philippotto philippotto Jan 28, 2021

Choose a reason for hiding this comment

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

Ok, makes sense. Good point with the flycam-movement listener! I missed that. However, the "if seed position is null, we know it was caused by a flycam movement"-logic is a bit too hidden for me. I just changed the code to simply dispatch addIsosurfaceAction everytime unless it already exists in the store. This is bit more intuitive and safer in my opinion.

@philippotto philippotto mentioned this pull request Jan 27, 2021
6 tasks
Copy link
Member

@daniel-wer daniel-wer 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, LGTM once your question was answered 👍

@bulldozer-boy bulldozer-boy bot merged commit a324d04 into master Jan 28, 2021
@bulldozer-boy bulldozer-boy bot deleted the robust-isosurfaces branch January 28, 2021 16:00
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.

3 participants