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

Method Execute

Filters/Geometry/vtkGeometryFilter.cxx:1834–1888  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1832 void Reduce() override {}
1833
1834 static ExtractCellBoundaries<TInputIdType>* Execute(vtkGeometryFilter* self, TGrid* ds,
1835 int* wholeExtent, bool* extractFaces, bool merging, unsigned char* cellGhosts,
1836 vtkExcludedFaces<TInputIdType>* exc, ThreadOutputType<TInputIdType>* t)
1837 {
1838 auto extract = new ExtractStructured<TGrid, TInputIdType>(
1839 self, ds, wholeExtent, extractFaces, merging, cellGhosts, exc, t);
1840 if (extract->AllCellsVisible || extract->ForceSimpleVisibilityCheck)
1841 {
1842 const auto& extent = extract->Extent;
1843 auto& axis = extract->CurrentAxis;
1844 auto& iAxis = extract->IAxis;
1845 auto& jAxis = extract->JAxis;
1846 for (axis = 0; axis < 3; ++axis)
1847 {
1848 // axisMin-face
1849 iAxis = (axis + 1) % 3;
1850 jAxis = (axis + 2) % 3;
1851 extract->MinFace = true;
1852 bool processFace = !extract->ForceSimpleVisibilityCheck || extract->ExtractFaces[2 * axis];
1853 if (processFace && extract->CheckIfFaceShouldBeProcessed())
1854 {
1855 extract->NumberOfFaces = std::abs(extent[2 * iAxis + 1] - extent[2 * iAxis]) *
1856 std::abs(extent[2 * jAxis] - extent[2 * jAxis + 1]);
1857 vtkSMPTools::For(0, extract->NumberOfFaces, *extract);
1858 }
1859 // axisMax-face
1860 std::swap(iAxis, jAxis);
1861 extract->MinFace = false;
1862 processFace = !extract->ForceSimpleVisibilityCheck || extract->ExtractFaces[2 * axis + 1];
1863 if (processFace && extract->CheckIfFaceShouldBeProcessed())
1864 {
1865 extract->NumberOfFaces = std::abs(extent[2 * iAxis + 1] - extent[2 * iAxis]) *
1866 std::abs(extent[2 * jAxis] - extent[2 * jAxis + 1]);
1867 vtkSMPTools::For(0, extract->NumberOfFaces, *extract);
1868 }
1869 }
1870 }
1871 else
1872 {
1873 auto& extent = extract->Extent;
1874 auto& axis = extract->CurrentAxis;
1875 auto& iAxis = extract->IAxis;
1876 auto& jAxis = extract->JAxis;
1877 for (axis = 0; axis < 3; ++axis)
1878 {
1879 iAxis = (axis + 1) % 3;
1880 jAxis = (axis + 2) % 3;
1881 extract->NumberOfFaces = std::abs(extent[2 * iAxis + 1] - extent[2 * iAxis]) *
1882 std::abs(extent[2 * jAxis] - extent[2 * jAxis + 1]);
1883 vtkSMPTools::For(0, extract->NumberOfFaces, *extract);
1884 }
1885 }
1886 extract->ExtractCellBoundaries<TInputIdType>::Reduce();
1887 return extract;
1888 }
1889};
1890
1891// Extract the boundaries of a general vtkDataSet by visiting each cell and

Callers

nothing calls this directly

Calls 4

absFunction · 0.50
ForFunction · 0.50
swapFunction · 0.50

Tested by

no test coverage detected