Add colormaps and stretches to ipyvolume viewer #484
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.
This PR is the equivalent of glue-viz/glue-vispy-viewers#395 and glue-viz/glue-vispy-viewers#396 for the ipyvolume viewer. FWIW, the colormaps look better in Max Intensity mode to me.
Along the way, I generalized our color widget to allow changing the name of the color mode attribute, as well as allowing the omission of the
cmap_attsub-widgets, to allow reusing the mode/colormap pieces for volume layers.As the ipyvolume volume layer state is a subclass of the vispy volume layer state, this PR builds off of the state updates from the two vispy viewer PRs. Thus I'm marking this as a draft until these updates land in a
glue-vispy-viewersrelease, but this works nicely for me when used with the dev version of that package.