virtualcell / vcell-fiji

A tool that loads VCell simulation results into ImageJ and performs statistical analysis.
https://vcell.org/
MIT License
2 stars 1 forks source link

Progress Bar When Loading Virtual Image #21

Closed AvocadoMoon closed 7 months ago

AvocadoMoon commented 10 months ago

When loading a virtual Image remotely from the N5 plugin there is not status as to how long it's loading will take. When read in a virtual stack each chunk is read from the S3 endpoint that is required for the current slice, and if it reads more data than required it will, buffering the read slice.

The order of slice presentation is as follows:

  1. User navigates to new slice
  2. ImageJ ask the ImagePlus class to pull up this slice
  3. Cached Cell Image asks its reader for the next grid (chunk) available that can surmount to a slice
  4. The N5S3Reader uses the S3 API to stream the chunks that would be appropriate for that slice into memory

So the key moment to help display a progress bar would be in the S3 API, where the number of bytes read compared to total bytes needed can be compared. There can already be a method to do this, but I may need to implement it myself.

AvocadoMoon commented 10 months ago

N5ImgLib2 N5S3 S3ObjectStream ImgPlus

AvocadoMoon commented 10 months ago

Currently make it a spinner, then to show that it's working.