refactor: extract self-contained colormaps module#98
Open
patrickoleary wants to merge 1 commit into
Open
Conversation
QuickView previously contained ~1,400 lines of hand-rolled colormap
state management, color transfer function algorithms, log/symlog/discrete
transforms, tick computation, and colorbar/control-panel UI spread across
view_manager.py, components/view.py, app.py, utils/color.py, and
utils/math.py.
All of that functionality is now provided by the external trame-colormaps
package (pip-installable). The integration reduces to a handful of imports
and a single widget call per view:
- ColormapController wires the VTK mapper, manages presets and range
- create_colorbar(orientation='horizontal') renders the full colorbar
with its popup control panel
Removed colormap functionality from:
- view_manager.py (-800 lines): colormap state, controller wiring, range/preset logic
- components/view.py (-209 lines): create_bottom_bar colorbar widget
- utils/color.py (-125 lines, deleted): color transfer function helpers
- utils/math.py (-265 lines): tick computation and scale transform math
- app.py (-25 lines): colormap initialization and state serialization
Added:
- pyproject.toml: trame-colormaps>=0.1.0 dependency
- ViewConfiguration fields matching the trame-colormaps API
cc66b4c to
bdc32ec
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
refactor: extract self-contained trame-colormaps module
Note: This pull request will fail until trame-colormaps is at PyPI it is currently at trame-colormaps
QuickView previously contained ~1,400 lines of hand-rolled colormap
state management, color transfer function algorithms, log/symlog/discrete
transforms, tick computation, and colorbar/control-panel UI spread across
view_manager.py, components/view.py, app.py, utils/color.py, and
utils/math.py.
All of that functionality is now provided by the external trame-colormaps
package (pip-installable). The integration reduces to a handful of imports
and a single widget call per view:
with its popup control panel
Removed colormap functionality from:
Added: