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

Method GetRGBTransferFunction

Rendering/Core/vtkVolumeProperty.cxx:363–380  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Get the currently set RGB transfer function. Create one if none set.

Source from the content-addressed store, hash-verified

361//------------------------------------------------------------------------------
362// Get the currently set RGB transfer function. Create one if none set.
363vtkColorTransferFunction* vtkVolumeProperty::GetRGBTransferFunction(int index)
364{
365 if (this->RGBTransferFunction[index] == nullptr)
366 {
367 this->RGBTransferFunction[index] = vtkColorTransferFunction::New();
368 this->RGBTransferFunction[index]->Register(this);
369 this->RGBTransferFunction[index]->Delete();
370 this->RGBTransferFunction[index]->AddRGBPoint(0, 0.0, 0.0, 0.0);
371 this->RGBTransferFunction[index]->AddRGBPoint(1024, 1.0, 1.0, 1.0);
372 if (this->ColorChannels[index] != 3)
373 {
374 this->ColorChannels[index] = 3;
375 }
376 this->Modified();
377 }
378
379 return this->RGBTransferFunction[index];
380}
381
382//------------------------------------------------------------------------------
383// Set the scalar opacity of a volume to a transfer function

Callers 15

DeepCopyMethod · 0.95
initializeVTKMethod · 0.80
volumePropertySerializerFunction · 0.80
SetupVectorModeMethod · 0.80
CreateCanonicalViewMethod · 0.80
InternalUpdateMethod · 0.80

Calls 5

AddRGBPointMethod · 0.80
NewFunction · 0.70
DeleteMethod · 0.65
RegisterMethod · 0.45
ModifiedMethod · 0.45