allen-cell-animated / volume-viewer

https://allen-cell-animated.github.io/volume-viewer/
Other
90 stars 7 forks source link

better single slice render #165

Closed toloudis closed 9 months ago

toloudis commented 9 months ago

This code change is meant to accompany #163 , which still has a bug that depends on being fixed in zarr.js.

Several improvements in this PR:

  1. Single-slice rendering was a bit too dim. When you switch modes, the colors were really muted. This was because of remnants of the volumetric shader still in the single-slice shader altering the alpha value. I simplified the single slice shader considerably.
  2. The z slider was initialized to 0 even though the volume is initialized to the middle slice. Slider now inits to middle value.
  3. Add z+1 and z-1 buttons to test caching when chunks consist of more than one slice
  4. Remember pathtrace vs raymarch when switching between z and 3d mode.
  5. Handle zarr data when the Z dimension is missing (e.g. CXY data) and add test cases from public image repo ( addresses https://github.com/allen-cell-animated/website-3d-cell-viewer/issues/172 )