allen-cell-animated / volume-viewer

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

Feature/full dynamic range #197

Closed toloudis closed 3 days ago

toloudis commented 6 months ago

Review time: largeish

Goal: allow Channel to store full dynamic range channel data. Then use this full range data in the fuse draw calls. This removes the need to convert to 8-bit as part of channel data loading. Hopefully this preserves precision and the resulting image looks better because we retained some detail. Note this comes at an expense of some memory - now per-channel textures can take up to 2x or 4x as much memory (uint8 to uint16 or float32 for example)

So the main change here is that Channel now stores a TypedArray.

Updates threejs... not sure this was needed but it's good to drag this along to keep it semi-current.

Refactors Lut code so that all lut generation starts with computing control points and then runs through one basic function to convert from control points to array lut.

Some minor changes for implementation accuracy: e.g. AutoIJ now uses total pixel count instead of nonzero pixel count.