Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
VTK Fix to speed up our image rendering. More...
#include <vtkNeverTranslucentTexture.h>
Public Member Functions | |
vtkTypeMacro (vtkNeverTranslucentTexture, vtkTexture) | |
void | PrintSelf (ostream &os, vtkIndent indent) override |
virtual int | IsTranslucent () override |
The FIX (see class description). More... | |
Static Public Member Functions | |
static vtkNeverTranslucentTexture * | New () |
Protected Member Functions | |
vtkNeverTranslucentTexture () | |
VTK Fix to speed up our image rendering.
The way we render images while changing the contrast via level/window extremely slows down rendering.
The cause of this slowdown is that VTK asks a texture (via a call to IsTranslucent) if it is translucent. When the texture refers to a lookup table this question is answered in a most expensive way: pushing every pixel through the lookup table to see whether it would render translucent.
We can speed this up extremely by always answering NO. 2D Image rendering in the context of MITK is still correct.
This class is injected into the VTK system by registering it with vtkObjectFactory as a replacement for vtkTexture.
We chose vtkOpenGLTexture as super class, because it seems that the other texture super class is deprecated: http://www.cmake.org/Wiki/VTK:How_I_mangled_Mesa
Definition at line 53 of file vtkNeverTranslucentTexture.h.
|
protected |
Definition at line 25 of file vtkNeverTranslucentTexture.cpp.
|
overridevirtual |
The FIX (see class description).
VTK Description: Is this Texture Translucent?
Returns false (0) if the texture is either fully opaque or has only fully transparent pixels and fully opaque pixels and the Interpolate flag is turn off.
Definition at line 29 of file vtkNeverTranslucentTexture.cpp.
|
static |
Referenced by mitk::PlaneGeometryDataVtkMapper3D::ProcessNode().
|
override |
Definition at line 34 of file vtkNeverTranslucentTexture.cpp.
vtkNeverTranslucentTexture::vtkTypeMacro | ( | vtkNeverTranslucentTexture | , |
vtkTexture | |||
) |