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

Method SelectCells

Common/DataModel/vtkCellLinks.cxx:208–227  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Mark cells with one or more points whose degree lies in the range indicated.

Source from the content-addressed store, hash-verified

206//------------------------------------------------------------------------------
207// Mark cells with one or more points whose degree lies in the range indicated.
208void vtkCellLinks::SelectCells(vtkIdType minMaxDegree[2], unsigned char* cellSelection)
209{
210 std::fill_n(cellSelection, this->NumberOfCells, 0);
211 vtkSMPTools::For(0, this->NumberOfPoints,
212 [this, minMaxDegree, cellSelection](vtkIdType ptId, vtkIdType endPtId)
213 {
214 for (; ptId < endPtId; ++ptId)
215 {
216 vtkIdType degree = this->GetNcells(0);
217 if (degree >= minMaxDegree[0] && degree < minMaxDegree[1])
218 {
219 vtkIdType* cells = this->GetCells(ptId);
220 for (auto i = 0; i < degree; ++i)
221 {
222 cellSelection[cells[i]] = 1;
223 }
224 }
225 } // for all points in this batch
226 }); // end lambda
227}
228
229//------------------------------------------------------------------------------
230unsigned long vtkCellLinks::GetActualMemorySize()

Callers 1

SelectCellsFunction · 0.80

Calls 3

fill_nFunction · 0.85
ForFunction · 0.50
GetCellsMethod · 0.45

Tested by

no test coverage detected