allen-cell-animated / volume-viewer

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

consistent transfer functions when playing through time #191

Closed toloudis closed 6 months ago

toloudis commented 6 months ago

Use case:

  1. We always renormalize intensity data from originalMin and originalMax into the 0..255 range, and the transfer function lookup tables are based on that 0..255 range
  2. When playing through time, we wish to have a consistent transfer function across time changes
  3. When playing through time, if intensity ranges are changing, then our 0..255 range is not consistently representing the same intensity range.

Fix: Store the absolute min and max intensity when loading and renormalizing channel data. Then we can use that to rescale/remap the transfer function lookup table. These changes ignore the "atlas" input path because atlases are always representing a 0..255 data range and would never be remapped. A future PR will have to integrate these changes with the website-3d-cell-viewer front end.

Bonus fix: volume scaling was accidentally using the wrong multiresolution level.