-
Notifications
You must be signed in to change notification settings - Fork 24
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
Support uploading neuroglancer precomputed and N5 #7578
Conversation
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.
Looking good :)
Do you think it would help to introduce a trait LayerWithMagLocators that implements a withMags method (and does the switch case over the different implementations there?). That way we wouldn’t have to do all of this switch-casing everywhere in the business logic? Did not test if this would work but maybe it’s worth trying.
Also, thanks for going through the docs! 👏
layer.copy(mags = layer.mags.map(m => m.copy(path = m.path.map(_.split("/").takeRight(2).mkString("/"))))) | ||
|
||
private def makeZarrSegmentationLayerPathRelative(layer: ZarrSegmentationLayer): DataLayer = | ||
layer.copy(mags = layer.mags.map(m => m.copy(path = m.path.map(_.split("/").takeRight(2).mkString("/"))))) |
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.
what is this doing? 🤔
Also, should probably be extracted to makeMagPathRelative since this is used twice here.
For N5/precomputed this is not needed?
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.
Is used for zarr because of the different directory format (for ngff and zarr, there is an additional directory e.g. color)
...-datastore/app/com/scalableminds/webknossos/datastore/services/uploading/UploadService.scala
Outdated
Show resolved
Hide resolved
Have a look now. I think it does make sense, but I am not sure I like the name. Is there something more abstract that seperates layers with maglocators from others? |
Good question! I’m afraid, not at this point. Layers without magLocators are currently
In fact, I think we should add magLocator support for wkw layers as well, either with a migration of the jsons or an adapter that can read WKWResolution objects and turn them into MagLocators. This would also enable remote wkw datasets. But that does not have a high priority atm and it should not block this PR. |
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.
🎉
URL of deployed dev instance (used for testing):
Steps to test:
TODOs:
Issues:
(Please delete unneeded items, merge only when none are left open)