------------------------------------------------------------------------------ For a specified index value, get the node parameters
| 1368 | //------------------------------------------------------------------------------ |
| 1369 | // For a specified index value, get the node parameters |
| 1370 | int 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 |