Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window leveling and Opacity mapping #6879

Open
shainatorumc opened this issue May 1, 2024 · 3 comments
Open

Window leveling and Opacity mapping #6879

shainatorumc opened this issue May 1, 2024 · 3 comments
Labels
feature New feature or request

Comments

@shainatorumc
Copy link

馃殌 Feature

In addition to contrast limits, it would be useful to have a window leveling adjuster for viewing 3D stacks.

Motivation

This tool would make the background disappear in 3D stacks and only show the structures of interest. This would allow for better viewing of the whole 3D structure.

Alternatives

I tried with only the adjustment of the contrast limits, but it is not sufficient.

Pitch

Similar to the Dragonfly software for 3D visualization, there would be a widget showing the histogram of the current image in view. Then the option to choose the opacity mapping to visualize the stack as desired.

Here is a screenshot of the Window leveling widget with the option to choose the Opacity mapping. Here the Bandpass Gaussian opacity mapping is chosen and the limits of the mapping were adjusted according to the image histogram (yellow lines on either side of the gaussian distribution overlayed on the image histogram)
Bandpass gaussian opacity mapping

Two images: Image above is the stack with the Bandpass Gaussian opacity mapping, while the image below is with the Left Gated Ramp opacity mapping.
Scalebar

Here is a screenshot of the Window leveling widget with the Left Gated Ramp opacity mapping selected.
Left gated ramp opacity mapping

@shainatorumc shainatorumc added the feature New feature or request label May 1, 2024
@psobolewskiPhD
Copy link
Member

In case anyone else was confused like me, basically what this allows you to do is to control the opacity over pixel values.
Right now in napari everything below the lower contrast limit is made transparent, but then everything above has opacity controlled by the slider.
The feature requested lets you more precisely control what you want to visualize, particularly useful if you have just one channel, but different structures at different intensities.

@shainatorumc
Copy link
Author

Thanks @psobolewskiPhD for clarifying the requested feature! Your explanation is exactly right.

@Czaki
Copy link
Collaborator

Czaki commented May 8, 2024

For me, it looks like something that should be implemented first using a plugin, that will generate a custom colormap. This will speed up validation and testing.
Having validated the plugin, then we could think about including it by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants