-
Notifications
You must be signed in to change notification settings - Fork 26
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 Largest Segment ID Optional #6414
Conversation
@philippotto Would you be interested in implementing the front-end todos here? @jstriebel Would you be interested in adapting the python client? I think the important part is that the segmentation layers in the info request may no longer contain the largestSegmentId, which might break existing requests? If the typing is that strict in the front-end. |
|
Yes, I think, I can do that. Not sure when exactly I'll get to it, though 🙈 |
...re/app/com/scalableminds/webknossos/tracingstore/tracings/volume/VolumeTracingDefaults.scala
Outdated
Show resolved
Hide resolved
… so that the user is forced to input it if necessary
@philippotto I changed the proto file to allow None for largestSegmentIds. Note that in the update actions they are still not nullable. |
Can we make the property in the update action nullable? Or does something speak against it?
Yes, sorry, there was an error in the front-end when I introduced a temporary logic to handle |
I was still assuming that volume annotating was essentially impossible while no largestSegmentId exists. But from what you mentioned in the meeting, it sounds like you want to only forbid those actions that reaally need it. So I also made it optional in the update action now, to support that. |
Yes, exactly 👍 I had this idea on Friday during implementing the changes. I think, it makes sense, since a user might want to correct existing segments for which a new segment is not even needed. I'll let you know once the frontend is polished. Then, you could also have a look to see how this approach feels. |
…nd datasource properties
I extended the docs for the largest segment ID and also linked the "dataset edit view" in the new modal. Other than that, I think, that the problem is explained sufficiently in the modal, no? The two new toasts are not too detailed, but I don't think that they should be much longer. Do you think this is alright? |
…s/webknossos into largest-segment-id-optional
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 mostly LGTM 👍 I added a couple of minor comments.
I added an issue for the largest segment id in the NML format in wk-libs: scalableminds/webknossos-libs#791
...ossos-datastore/app/com/scalableminds/webknossos/datastore/models/datasource/DataLayer.scala
Show resolved
Hide resolved
@jstriebel Thanks for having a look! This is why reviews are important, this code was really quite cryptic :D I added some comments now, hopefully answering your questions. I also merged the precedence methods from AnnotationService and AnnotationIOController into one, and while I was there changed the artificially Fox-y method to synchronous. |
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, backend LGTM 👍 Didn't do any testing myself so far.
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 changes 👍 Let me know if you think this should be tested again :)
frontend/javascripts/oxalis/model/actions/volumetracing_actions.ts
Outdated
Show resolved
Hide resolved
frontend/javascripts/oxalis/model/reducers/volumetracing_reducer_helpers.ts
Show resolved
Hide resolved
@@ -234,6 +234,12 @@ function* getLargestSegmentId(layerName: string): Saga<number> { | |||
throw new Error("Mappings only exist for segmentation layers."); | |||
} | |||
|
|||
if (segmentationLayer.largestSegmentId == null) { | |||
// todo: fix this once the custom segment colors are merged into master |
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.
Reminder to fix this ToDo.
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.
This is resolved now. Since the new custom segment color mechanism doesn't need reassignment of segment ids (the old code had to reassign the IDs so that the texture access was aligned with its 256**2 dimension), I don't even need to access the largest segment anymore. This is quite lucky, as otherwise I would have had to disable mappings with custom colors for segmentations with unknown largest segment id.
By the way, I also added an analytics event so that we know whether custom mapping colors are used at all.
frontend/javascripts/test/reducers/volumetracing_reducer.spec.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Daniel <[email protected]>
Co-authored-by: Daniel <[email protected]>
…ent id; fine tune wording and UI
…gest-segment-id-optional
…gnment of IDs is not necessary with the new custom color mechanism anymore
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.
This PR is ready from my point of view. @fm3 Do you agree? I just tested it a bit and it seems good to go for me. Maybe you want to have a look, too. Then, we could merge&deploy on Monday, I'd say.
Makes the largestSegmentId for segmentation layers optional.
Persists the largestSegmentId for volume annotation layers in the NML
TODO Backend
TODO Frontend
null
. If so, tell the user about it and provide a way to input a largest segment idTODO python client
URL of deployed dev instance (used for testing):
Steps to test:
Issues: