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

New service: serve output OME-Zarr #1

Closed
tcompa opened this issue Oct 10, 2023 · 4 comments
Closed

New service: serve output OME-Zarr #1

tcompa opened this issue Oct 10, 2023 · 4 comments

Comments

@tcompa
Copy link
Collaborator

tcompa commented Oct 10, 2023

This would be a nice-to-have prototype of a feature that we will eventually include in Fractal.

After the demos service is complete, we could startup a image-viewer service so that the user can directly go to localhost:something and view the output image.

@tcompa tcompa changed the title New service prototype: serve output OME-Zarr New service: serve output OME-Zarr Oct 10, 2023
@tcompa
Copy link
Collaborator Author

tcompa commented Oct 13, 2023

Here is a log of a preliminary exploration.

Serve the zarr array via http

I could not find whether vizarr can work with local zarr arrays. If not, we have to serve the array via http.
I used https://github.com/manzt/simple-zarr-server, with a serve.py script like

from simple_zarr_server import serve
import zarr
  
group = zarr.open_group("/.../fractal-tasks-core/tests/data/10_5281_zenodo_8091756/plate.zarr/B/03/0")
serve(group, allowed_origins=["*"])

Run vizarr locally

I cloned the https://github.com/hms-dbmi/vizarr repo, and I modified vite.config.js as in

const source = process.env.VIZARR_DATA || 'http://127.0.0.1:8000'

Other than that, a combination of npm install and npm start already works.

The first view is empty:
image
But what is missing is simply to select the DAPI channel (maybe there is an option to provide a default):
image

(note: one could even start by using the existing vizarr instance, e.g. with https://hms-dbmi.github.io/vizarr/?source=http://127.0.0.1:8000)

@jluethi
Copy link

jluethi commented Oct 13, 2023

Oh, that's super promising! Will want to try this locally as well, thanks for sharing the steps!

@tcompa
Copy link
Collaborator Author

tcompa commented Oct 23, 2023

Interesting link: hms-dbmi/vizarr#176

EDIT:

group = zarr.open("/somewhere.zarr")
viewer = vizarr.Viewer()
viewer.add_image(group)

@tcompa tcompa transferred this issue from fractal-analytics-platform/fractal-containers Apr 4, 2024
@tcompa
Copy link
Collaborator Author

tcompa commented Jul 12, 2024

Closing (old issue)

@tcompa tcompa closed this as completed Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants