I would like to use the maximum intensity projection (MIP) to view some 3D medical images in pyqtgraph using GLVolumeItem. I see that there are three pre-defined GLOptions
settings. The translucent
and additive
mode both look like MIP. So my questions are
GLOptions
(e.g., GL_DEPTH_TEST
, GL_BLEND
, etc)?GL_DEPTH_TEST
, GL_BLEND
, etc) for different display mode?Update:
From this website, I set the GLOptions
to be
{'glBlendFunc': (GL_ONE, GL_ONE), 'glBlendEquation': (GL_MAX_EXT), GL_BLEND: True}
However, an error pops up saying that GL_MAX_EXT
is not defined. Any ideas how I should fix it?
Finally I found the answer:
from OpenGL.GL import *
from OpenGL import GL
from OpenGL.GL.EXT.blend_minmax import GL_MAX_EXT
glOptions = {'glBlendFunc': (GL_ONE, GL_ONE), 'glBlendEquation': (GL_MAX_EXT, ), GL_BLEND: True}
This should give you the real MIP view.