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

Method GetNodeValue

Rendering/Core/vtkColorTransferFunction.cxx:1370–1388  ·  view source on GitHub ↗

------------------------------------------------------------------------------ For a specified index value, get the node parameters

Source from the content-addressed store, hash-verified

1368//------------------------------------------------------------------------------
1369// For a specified index value, get the node parameters
1370int vtkColorTransferFunction::GetNodeValue(int index, double val[6])
1371{
1372 int size = static_cast<int>(this->Internal->Nodes.size());
1373
1374 if (index < 0 || index >= size)
1375 {
1376 vtkErrorMacro("Index out of range!");
1377 return -1;
1378 }
1379
1380 val[0] = this->Internal->Nodes[index]->X;
1381 val[1] = this->Internal->Nodes[index]->R;
1382 val[2] = this->Internal->Nodes[index]->G;
1383 val[3] = this->Internal->Nodes[index]->B;
1384 val[4] = this->Internal->Nodes[index]->Midpoint;
1385 val[5] = this->Internal->Nodes[index]->Sharpness;
1386
1387 return 1;
1388}
1389
1390//------------------------------------------------------------------------------
1391// For a specified index value, get the node parameters

Callers 8

GetColorMethod · 0.95
GetIndexedColorMethod · 0.95
BuildMethod · 0.45
DeepCopyMethod · 0.45
ShallowCopyMethod · 0.45

Calls 1

sizeMethod · 0.45

Tested by 1