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

Method Contour

Common/DataModel/vtkPolyLine.cxx:374–401  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

372
373//------------------------------------------------------------------------------
374void vtkPolyLine::Contour(double value, vtkDataArray* cellScalars,
375 vtkIncrementalPointLocator* locator, vtkCellArray* verts, vtkCellArray* lines,
376 vtkCellArray* polys, vtkPointData* inPd, vtkPointData* outPd, vtkCellData* inCd, vtkIdType cellId,
377 vtkCellData* outCd)
378{
379 const vtkIdType numLines = this->Points->GetNumberOfPoints() - 1;
380 vtkNew<vtkDoubleArray> lineScalars;
381 lineScalars->SetNumberOfComponents(cellScalars->GetNumberOfComponents());
382 lineScalars->SetNumberOfTuples(2);
383
384 for (vtkIdType i = 0; i < numLines; i++)
385 {
386 this->Line->Points->SetPoint(0, this->Points->GetPoint(i));
387 this->Line->Points->SetPoint(1, this->Points->GetPoint(i + 1));
388
389 if (outPd)
390 {
391 this->Line->PointIds->SetId(0, this->PointIds->GetId(i));
392 this->Line->PointIds->SetId(1, this->PointIds->GetId(i + 1));
393 }
394
395 lineScalars->SetTuple(0, cellScalars->GetTuple(i));
396 lineScalars->SetTuple(1, cellScalars->GetTuple(i + 1));
397
398 this->Line->Contour(
399 value, lineScalars, locator, verts, lines, polys, inPd, outPd, inCd, cellId, outCd);
400 }
401}
402
403//------------------------------------------------------------------------------
404// Intersect with sub-lines

Callers

nothing calls this directly

Calls 10

GetNumberOfPointsMethod · 0.45
SetNumberOfComponentsMethod · 0.45
GetNumberOfComponentsMethod · 0.45
SetNumberOfTuplesMethod · 0.45
SetPointMethod · 0.45
GetPointMethod · 0.45
SetIdMethod · 0.45
GetIdMethod · 0.45
SetTupleMethod · 0.45
GetTupleMethod · 0.45

Tested by

no test coverage detected