fix(mapper.js): fix color texture coordinate mapping when using logarithmic scale#3250
Merged
floryst merged 1 commit intoKitware:masterfrom May 16, 2025
Merged
Conversation
…ithmic scale Scalars array was already mapped with log scaling but texture coordinates were incorrectly mapped using the linear range and value. Log color mapping was working if scalar interpolation was off when scalars were not directly mapped to textures. Also added some missing types to ColorTransferFunction.
Contributor
Author
|
@floryst Do you have time to check this out? |
floryst
approved these changes
May 16, 2025
|
🎉 This PR is included in version 33.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Scalars array was already mapped with log scaling but texture coordinates were incorrectly mapped using the linear range and value. Log color mapping was working if scalar interpolation was off when scalars were not directly mapped to textures.
Also added some missing types to ColorTransferFunction.
Context
Results
In the following screenshots the first rectangle has point values of 1 everywhere, second has 100 and the last 1000.
Changes
PR and Code Checklist
npm run reformatto have correctly formatted codeTesting
The scalar bar actor example doesn't really work at all with interpolated values (because of the geometry?) but the rim of the cone can be seen barely to see the change.