Allow background color and n_colors for the scalarbar#370
Merged
akaszynski merged 1 commit intomasterfrom Sep 6, 2019
Merged
Conversation
31 tasks
Member
|
Awesome! Thanks! |
banesullivan
reviewed
Sep 8, 2019
Member
banesullivan
left a comment
There was a problem hiding this comment.
We need some tests for this new functionality
| self.scalar_bar.SetLookupTable(mapper.lookup_table) | ||
| if background_color is not None: | ||
| from ..core.common import vtk_to_numpy, numpy_to_vtk | ||
| if not isinstance(background_color, collections.Iterable): |
Member
There was a problem hiding this comment.
We should leverage parse_color here incase the user passes a string name of a color to be consistent with the rest of the API
| self.scalar_bar = vtk.vtkScalarBarActor() | ||
| self.scalar_bar.SetLookupTable(mapper.lookup_table) | ||
| if background_color is not None: | ||
| from ..core.common import vtk_to_numpy, numpy_to_vtk |
Member
There was a problem hiding this comment.
We should have an absolute import for this
Member
|
Thanks for adding these new features @GuillaumeFavelier! There are a few concerns I have which I will clean up on the master branch |
tkoyama010
pushed a commit
that referenced
this pull request
Nov 12, 2024
Bumps the trame group with 4 updates: [trame](https://github.com/Kitware/trame), [trame-client](https://github.com/Kitware/trame-client), [trame-server](https://github.com/Kitware/trame-server) and [trame-vuetify](https://github.com/Kitware/trame-vuetify). Updates `trame` from 3.6.3 to 3.6.5 - [Release notes](https://github.com/Kitware/trame/releases) - [Changelog](https://github.com/Kitware/trame/blob/master/CHANGELOG.md) - [Commits](Kitware/trame@v3.6.3...v3.6.5) Updates `trame-client` from 3.2.5 to 3.3.2 - [Release notes](https://github.com/Kitware/trame-client/releases) - [Changelog](https://github.com/Kitware/trame-client/blob/master/CHANGELOG.md) - [Commits](Kitware/trame-client@v3.2.5...v3.3.2) Updates `trame-server` from 3.1.0 to 3.2.3 - [Release notes](https://github.com/Kitware/trame-server/releases) - [Changelog](https://github.com/Kitware/trame-server/blob/master/CHANGELOG.md) - [Commits](Kitware/trame-server@v3.1.0...v3.2.3) Updates `trame-vuetify` from 2.7.0 to 2.7.1 - [Release notes](https://github.com/Kitware/trame-vuetify/releases) - [Changelog](https://github.com/Kitware/trame-vuetify/blob/master/CHANGELOG.md) - [Commits](Kitware/trame-vuetify@v2.7.0...v2.7.1) --- updated-dependencies: - dependency-name: trame dependency-type: direct:production update-type: version-update:semver-patch dependency-group: trame - dependency-name: trame-client dependency-type: direct:production update-type: version-update:semver-minor dependency-group: trame - dependency-name: trame-server dependency-type: direct:production update-type: version-update:semver-minor dependency-group: trame - dependency-name: trame-vuetify dependency-type: direct:production update-type: version-update:semver-patch dependency-group: trame ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.
This PR allows the
add_scalar_bar()function to use a givenbackground_colorin the very specific case where the input colormap uses alpha channel. It also adds a newn_colorsparameter to control the number of colors in the bar.