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

Method FillFromDataPointer

Common/DataModel/vtkPiecewiseFunction.cxx:1009–1034  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1007
1008//------------------------------------------------------------------------------
1009void vtkPiecewiseFunction::FillFromDataPointer(int nb, double* ptr)
1010{
1011 if (nb <= 0 || !ptr)
1012 {
1013 return;
1014 }
1015
1016 this->RemoveAllPoints();
1017
1018 double* inPtr = ptr;
1019
1020 int i;
1021 for (i = 0; i < nb; i++)
1022 {
1023 vtkPiecewiseFunctionNode* node = new vtkPiecewiseFunctionNode;
1024 node->X = inPtr[0];
1025 node->Y = inPtr[1];
1026 node->Sharpness = 0.0;
1027 node->Midpoint = 0.5;
1028
1029 this->Internal->Nodes.push_back(node);
1030 inPtr += 2;
1031 }
1032
1033 this->SortAndUpdateRange();
1034}
1035
1036//------------------------------------------------------------------------------
1037void vtkPiecewiseFunction::UpdateSearchMethod(double epsilon, double thresh)

Callers

nothing calls this directly

Calls 3

RemoveAllPointsMethod · 0.95
SortAndUpdateRangeMethod · 0.95
push_backMethod · 0.45

Tested by

no test coverage detected