allen-cell-animated / volume-viewer

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

Feature/lut refactor #194

Closed toloudis closed 3 months ago

toloudis commented 4 months ago

Decoupling Lut from Histogram for future work.

There are some things about the way the lookup tables (Luts) and Histograms are handled that make it hard to update certain things. See #189 or https://github.com/allen-cell-animated/website-3d-cell-viewer/issues/192 for examples.

This PR is a first step and should introduce no functionality changes.

Key changes:

Lut.ts is a new module that is responsible only for a lookup table as array, plus control points to describe its piecewise linear function. Histogram.ts no longer has any responsibilities for creating luts.
Channel.ts no longer has any responsibilities for creating luts. All the rest of the changes stem from these.

Again, no functionality is supposed to be changed as a result of this PR. It does have an API change for which there will need to be some changes in website-3d-cell-viewer.