webknossos
webknossos copied to clipboard
WIP: Limit bbox of volume tracings to that of fallback layer
URL of deployed dev instance (used for testing):
- https://___.webknossos.xyz
Steps to test:
- On a datast with a segmentation layer that is smaller than the color layer,
- Create a volume annotation with fallback segmentation (is the default)
- bbox should be limited to fallback layer’s
- should still look the same after download + reupload
Issues:
- fixes #7365
(Please delete unneeded items, merge only when none are left open)
- [ ] Updated changelog
- [ ] Updated migration guide if applicable
- [ ] Updated documentation if applicable
- [ ] Adapted wk-libs python client if relevant API parts change
- [ ] Removed dev-only changes like prints and application.conf edits
- [ ] Considered common edge cases
- [ ] Needs datastore update after deployment
The backend part of this works now, frontend logging shows that the bbox in the volumetracing proto object is set to the fallback layer bbox. However, I noticed a few strange effects in the frontend
- If a skeleton layer exists also, the volume layer bbox is not shown and the brushing is not restricted to the volume layer bbox
- If a skeleton layer does not exist, the volume layer bbox is shown, but you can still brush outside of it, but only unto the next bucket border
- Related: segmentation data is rendered (also in dataset view mode) unto the next bigger bucket border (I reduced the segmentation layer bbox in the datasource-properties.json but didn’t delete the actual data outside of it)
@philippotto can you estimate if these points would be easy to fix in the frontend? If not, maybe I’d defer the issue again (I just thought it would be a quick change in the backend). But this particular behavior is pretty weird and unexpected.
If a skeleton layer exists also, the volume layer bbox is not shown and the brushing is not restricted to the volume layer bbox If a skeleton layer does not exist, the volume layer bbox is shown, but you can still brush outside of it, but only unto the next bucket border
Regarding the differing visibility of the volume bbox, I'd have to investigate why this is the case. That brushing is possible outside of the bbox (until the next bucket border) is known (see https://github.com/scalableminds/webknossos/issues/6303) and requires a bit of thought. Not super complicated, but also not a 3-line-change.
segmentation data is rendered (also in dataset view mode) unto the next bigger bucket border (I reduced the segmentation layer bbox in the datasource-properties.json but didn’t delete the actual data outside of it)
This is also known (see https://github.com/scalableminds/webknossos/issues/5775). Each layer's bbox needs to be passed into the shader and then be handled accordingly.
Both issues together might take approx. 2 hours :tm:.
Thanks for investigating! I think it would be worth tackling these two to three issues, but it certainly does not have the highest priority. I guess I’ll let this PR lie here until someone of the frontend team has some free capacity :)