-
Notifications
You must be signed in to change notification settings - Fork 272
Update volume.py #1205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update volume.py #1205
Conversation
change the default alpha gradient for volume to be more even
WalkthroughThe changes in this pull request involve updates to the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Volume
User->>Volume: Create Volume instance
Volume->>Volume: Set default alpha values [0.0, 0.2, 0.4, 0.6, 0.8, 1.0]
User->>Volume: Call alpha method
Volume->>Volume: Update alpha values if provided
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (1)vedo/volume.py (1)
The change from
This should result in better depth perception and more intuitive volume visualization. Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
I think we need to revert this! most of the times for typical volumes there is a very large peak at zero and this needs to be removed. # make asigmoidal transfer function by default
# xvalues = np.linspace(0, 1, 11)
# sigmoid = np.clip(1/(1+np.exp(-20*(xvalues-0.5))), 0, 1)
# print("Volume: setting sigmoidal transfer function", xvalues, sigmoid)
# self.alpha(sigmoid)
self.alpha([0.0, 0.001, 0.3, 0.5, 0.7, 0.8, 1.0]) we might have some refinement by looking at the histogram of the scalars to make some more sensible automatic choice... |
change the default alpha gradient for volume to be more even