-
Notifications
You must be signed in to change notification settings - Fork 16
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 "Export" menu to toolbars with CSV/NPY/TIFF exports #885
Conversation
Marking the PR as "waiting" until you find the time to implement the TIFF endpoint in H5Grove. |
The demo is now requesting the tentative implementation at silx-kit/h5grove#54. You can give it a try |
I'm getting a black TIFF file with the right dimensions, so I assume it works! |
We'll just have to update the compatibility comment in |
Add controls to export dataset or slice to NPY and CSV
Fix #35
The feature detection is actually quite simple: I've discovered that an abstract class can have an optional method! So if the provider implements the method, it is defined; otherwise it isn't. This means that the toolbar can just check if
getTiffUrl
is defined to decide whether to show the export button.I've provided a tentative implementation of the method for H5Grove. It returns a URL of this form:
https://<h5grove.url>/tiff/?<axios-params>&path=/foo&selection=0:,:
. Up to H5Grove to then respond at this URL with the TIFF data and the correctContent-type
HTTP header (image/tiff
).Update
I've merged #890 into this branch, so now it includes CSV and NPY exports as well.