-
Notifications
You must be signed in to change notification settings - Fork 74
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
silx.gui.plot: Refactored PlotWidget OpenGL backend to enable extensions #3147
Conversation
@PiRK you might be interested in this. |
Thanks! Maybe I can get rid of my |
Yes, that's the idea, extending rather than patching. |
When this PR is ready it would be nice to have a small example. I have played recently with pyqtgraph OpenGL, it was really convenient to patch item rendering. |
This is not intended to be supported API, so I won't add an example for this in silx, but here is a sample code rewriting (well mostly copy/pasting) the
|
Ok, i see, that's still really deep inside. |
Yes it gives a way to control OpenGL yourself without being restricted to what the backend provides... but it also mean you have to take care of it all. |
Here is another example, useful for RGB tiff images that store somewhat independant data in each channel (e. g. biomarker intensity in epifluorescence microscopy). It defines an RGB(A) image item with methods to show/hide individual color channels and modify luminosity and contrast for each individual channel. This methods works smoothly with 2 GB images, much smoother than adjusting the colormap limits for a single channel displayed as an
Thanks again. |
Good to hear that it also works for you! Not available yet, but FYI, I've made an item adapter that allows to use |
This PR is a small refactoring of the OpenGL backend which adds a
GLPlotItem
base class to rendering primitives.Along with
PlotWidget.addItem
, this allows writing user's defined plot items with their own OpenGL rendering implementation.