Skip to content

Conversation

@davramov
Copy link
Contributor

I am starting this as a draft PR for the features outlined here: #47

This initial commit includes:

  • a small 11MB scan for testing (examples/tomo_scan.h5)
  • downsampling methods using Torch and OpenCV (orchestration/flows/bl832/downsample.py)
    • For small datasets (~11MB), Torch/OpenCV performs similarly (4 seconds)
    • For large datasets (~7GB), OpenCV works well, however, Torch appears to run into a memory issue (at least on my laptop) which prevents some of the images from downsampling correctly (exchange/data). To address this, I include a memory check, enabling Torch chunking. This slows down the downsampling (OpenCV: 80 seconds vs Torch: 123 seconds), but at least it works. I am keeping both versions here in case one works better in production.

…irectory you want to visualize, and then it hosts it locally and opens the web browser to the full-screen itk-vtik-viewer widget.
…ds the itk-vtk-viewer in an iframe, with a goal to select the dataset using the Tiled Browser Seij is working on.
@davramov
Copy link
Contributor Author

Yesterday I was able to get Seij's Bluesky TIled React component installed in my app via npm, and connected it to my "Select Dataset" button. There are still a few things to fix before it works properly:

  • Test switching between datasets
  • Update Tiled when a new dataset is available
  • Fix the UI so there isn't a huge wrapper around the widget
  • Load the bluesky icon correctly
  • Close the Tiled Browser widget when the user presses "Select"

image

…ible Select button when a Zarr directory is open, and then extract the filename from the metadata below. Then it generates the url, passes it back to App.jsx with the new url, and reloads the itk-vtk-viewer with the new url if it is different.
…nd startup script for centralized setup and installation. Still need to debug itk-vtk-viewer in this configuration
@davramov
Copy link
Contributor Author

davramov commented Apr 2, 2025

While testing at the beamline, I noticed that I should make it easier to tell the app (Dockerfile) where Tiled should look for the data.

EDIT: Actually I just need better documentation. Setting DATA_PATH in .env to the full path on the filesystem where the Zarr files are located works as expected

@davramov
Copy link
Contributor Author

davramov commented Apr 5, 2025

A few steps left to make this perfect...

  • currently the tiled server isn't picking up new zarrs in the hosted directory, and I have to restart the container each time a new scan is done. this is not ideal, it should update automatically
  • set up the vis computer with a prefect agent + reconstruction job controller flow
    • Reconstruction on the new vis computer is very fast (2-3x faster than a full HPC node, 2-4 minutes vs 10 minutes)
    • tiff to zarr on the other hand is very slow (6x slower than HPC. 10 minutes vs nearly 60 minutes). I am not sure what exactly is causing this slowdown
    • best of both worlds: maybe we run automated reconstruction on the vis computer, then send it to an HPC facility for tiff to zarr, alternating between ALCF and NERSC to keep the throughput up

@davramov
Copy link
Contributor Author

davramov commented Apr 7, 2025

A few things I've noticed after using the vis app some more:

  • Tiled browser widget

    • broken image
    • the "Select" hover-over popup button is not wired into the select function. this could be confusing
  • itk-vtk-viewer levels of detail

    • I haven't seen it actually load L0 or L1. Not sure if it's hitting some built-in browser limit, but I expect the vis PC with its specs should be able to handle it.
  • A tutorial or info popup could be helpful

…t to match changes made at the beamline computer
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

Successfully merging this pull request may close these issues.

1 participant