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

Function ExecuteDataSet

Filters/Geometry/vtkGeometryFilter.cxx:3543–3745  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3541{
3542template <typename TInputIdType>
3543int ExecuteDataSet(vtkGeometryFilter* self, vtkDataSet* input, vtkPolyData* output,
3544 vtkExcludedFaces<TInputIdType>* exc)
3545{
3546 auto explicitSG = vtkExplicitStructuredGrid::SafeDownCast(input);
3547 if (explicitSG)
3548 {
3549 explicitSG->BuildLinks();
3550 }
3551
3552 vtkIdType cellId;
3553 int i;
3554 vtkIdType numCells = input->GetNumberOfCells();
3555 double x[3];
3556 vtkIdType ptId;
3557 vtkPointData* inPD = input->GetPointData();
3558 vtkCellData* inCD = input->GetCellData();
3559 vtkPointData* outPD = output->GetPointData();
3560 vtkCellData* outCD = output->GetCellData();
3561 vtkNew<vtkAOSDataArrayTemplate<char>> cellVisArray;
3562 char* cellVis;
3563 unsigned char* cellGhosts = nullptr;
3564 unsigned char* pointGhosts = nullptr;
3565
3566 vtkDebugWithObjectMacro(self, << "Executing geometry filter");
3567
3568 if (inCD)
3569 {
3570 if (auto ghosts = inCD->GetGhostArray())
3571 {
3572 cellGhosts = ghosts->GetPointer(0);
3573 }
3574 }
3575 if (inPD)
3576 {
3577 if (auto ghosts = inPD->GetGhostArray())
3578 {
3579 pointGhosts = ghosts->GetPointer(0);
3580 }
3581 }
3582
3583 auto cellClipping = self->GetCellClipping();
3584 auto cellMinimum = self->GetCellMinimum();
3585 auto cellMaximum = self->GetCellMaximum();
3586 auto pointClipping = self->GetPointClipping();
3587 auto pointMinimum = self->GetPointMinimum();
3588 auto pointMaximum = self->GetPointMaximum();
3589 auto extentClipping = self->GetExtentClipping();
3590 auto extent = self->GetExtent();
3591 // Determine nature of what we have to do
3592 if ((!cellClipping) && (!pointClipping) && (!extentClipping))
3593 {
3594 cellVis = nullptr;
3595 }
3596 else
3597 {
3598 cellVisArray->SetNumberOfValues(numCells);
3599 cellVis = cellVisArray->GetPointer(0);
3600 }

Callers

nothing calls this directly

Calls 15

PassPointIdsFunction · 0.85
SetVertsMethod · 0.80
SetLinesMethod · 0.80
SetPolysMethod · 0.80
SetStripsMethod · 0.80
ForFunction · 0.50
ExecuteFunction · 0.50
BuildLinksMethod · 0.45
GetNumberOfCellsMethod · 0.45
GetPointDataMethod · 0.45
GetCellDataMethod · 0.45
GetGhostArrayMethod · 0.45

Tested by

no test coverage detected