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

3D Web App Next Steps #47

Open
2 of 11 tasks
davramov opened this issue Dec 18, 2024 · 2 comments
Open
2 of 11 tasks

3D Web App Next Steps #47

davramov opened this issue Dec 18, 2024 · 2 comments

Comments

@davramov
Copy link
Contributor

davramov commented Dec 18, 2024

After discussing with Elizabeth, Dula, and Dylan, we came up with a few next steps about visualizing reconstructions both at the beamline, and when users return home.

When the new 8.3.2 Viz Computer arrives:

  • Reinstall Jupyter/ITK visualization
  • NFS mount the new viz computer's drive to data832 and use that globus endpoint for transfers
  • Host reconstructions via Tiled server running on the new BL computer
  • Build ITK widget into a web app
    • Link from SciCat to the web app (no code) and a Jupyter environment (deep dive)

Short term:

  • Downsample raw data by a factor of 2 (bilinear) on data832 before processing reconstruction (for more immediate results)
    • Run a Prefect worker on data832 for downsampling
    • Register a downsampling flow on flow-prd
    • Call the downsampling flow after new_file_832 (once the raw data is on data832) and before sending to an HPC facility (NERSC or ALCF)
    • Create queues for "downsampled" (high priority, fast throughput) and "full-scale" (slow, can sit in the queue) reconstructions
  • Start building ITK widget into a web app
@davramov
Copy link
Contributor Author

davramov commented Jan 6, 2025

Last week I tried getting the standalone web version of itkwidgets running locally, but couldn't, so I opened a git issue on their repository: InsightSoftwareConsortium/itkwidgets#765

Paul responded, and their instructions worked for me. I was able to start an HTTP file server (with CORS enabled) serving an NGFF-ZARR directory, and then appended that path to the viewer URL as described:
https://kitware.github.io/itk-vtk-viewer/app/?rotate=false&image=http://localhost:8000/rec20230606_152011_jong-seto_fungal-mycelia_flat-AQ_fungi2_fast.zarr

Using this approach, if we host the zarr reconstructions on Tiled, we could dynamically generate the URL to visualize each dataset, and add the link in SciCat.

@davramov
Copy link
Contributor Author

Update on the standalone viewer. I attempted to sort out why the cli version of itkwidgets was not working properly via pip, but I still hit roadblocks there. Interestingly, on the kitware site documentation, they listed a npm package for cli access to the viewer that can be installed globally on a machine, rather than python. Using this method, I got the viewer to run locally in fullscreen mode in the browser!

Reproduction instructions:

  1. Install npm. I downloaded the MacOS Installer .pkg version and installed it.
  2. Run npm install itk-vtk-viewer -g in the terminal
  3. Run itk-vtk-viewer in the terminal. This will open a new browser window at localhost:3000
  4. In another terminal, start scripts/serve_zarr_cors.py rec20230606_152011_jong-seto_fungal-mycelia_flat-AQ_fungi2_fast.zarr
  5. Update the url in the browser: http://localhost:3000/?fileToLoad=http://localhost:8001/rec20230606_152011_jong-seto_fungal-mycelia_flat-AQ_fungi2_fast.zarr

Now that I have the viewer running locally, I am trying to serve the zarr folder using Tiled rather than my python cors server.

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

1 participant