MCPcopy Create free account
hub / github.com/Kitware/VTK / InternalUpdate

Method InternalUpdate

Rendering/VolumeOpenGL2/vtkOpenGLVolumeGradientOpacityTable.cxx:15–33  ·  view source on GitHub ↗

Update opacity transfer function texture. ------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

13// Update opacity transfer function texture.
14//------------------------------------------------------------------------------
15void vtkOpenGLVolumeGradientOpacityTable::InternalUpdate(vtkObject* func, int vtkNotUsed(blendMode),
16 double vtkNotUsed(sampleDistance), double vtkNotUsed(unitDistance), int filterValue)
17{
18 vtkPiecewiseFunction* gradientOpacity = vtkPiecewiseFunction::SafeDownCast(func);
19 if (!gradientOpacity)
20 {
21 return;
22 }
23 gradientOpacity->GetTable(
24 0, (this->LastRange[1] - this->LastRange[0]) * 0.25, this->TextureWidth, this->Table);
25
26 this->TextureObject->Create2DFromRaw(
27 this->TextureWidth, 1, this->NumberOfColorComponents, VTK_FLOAT, this->Table);
28
29 this->TextureObject->SetWrapS(vtkTextureObject::ClampToEdge);
30 this->TextureObject->SetMagnificationFilter(filterValue);
31 this->TextureObject->SetMinificationFilter(filterValue);
32 this->BuildTime.Modified();
33}
34
35//------------------------------------------------------------------------------
36void vtkOpenGLVolumeGradientOpacityTable::PrintSelf(ostream& os, vtkIndent indent)

Callers

nothing calls this directly

Calls 3

Create2DFromRawMethod · 0.80
GetTableMethod · 0.45
ModifiedMethod · 0.45

Tested by

no test coverage detected