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

Function StructuredExecute

Filters/Geometry/vtkMarkBoundaryFilter.cxx:777–824  ·  view source on GitHub ↗

Mark 3D structured grids

Source from the content-addressed store, hash-verified

775
776// Mark 3D structured grids
777int StructuredExecute(vtkDataSet* input, const unsigned char* ghosts, unsigned char* bPoints,
778 unsigned char* bCells, vtkIdType* bFaces, vtkMarkBoundaryFilter* self)
779{
780 vtkIdType numCells = input->GetNumberOfCells();
781
782 // Setup processing
783 vtkIdType ext[6];
784 int* tmpext;
785 switch (input->GetDataObjectType())
786 {
787 case VTK_STRUCTURED_GRID:
788 {
789 vtkStructuredGrid* grid = vtkStructuredGrid::SafeDownCast(input);
790 tmpext = grid->GetExtent();
791 break;
792 }
793 case VTK_RECTILINEAR_GRID:
794 {
795 vtkRectilinearGrid* grid = vtkRectilinearGrid::SafeDownCast(input);
796 tmpext = grid->GetExtent();
797 break;
798 }
799 case VTK_UNIFORM_GRID:
800 case VTK_STRUCTURED_POINTS:
801 case VTK_IMAGE_DATA:
802 {
803 vtkImageData* image = vtkImageData::SafeDownCast(input);
804 tmpext = image->GetExtent();
805 break;
806 }
807 default:
808 return 0;
809 }
810
811 // Update the extent
812 ext[0] = tmpext[0];
813 ext[1] = tmpext[1];
814 ext[2] = tmpext[2];
815 ext[3] = tmpext[3];
816 ext[4] = tmpext[4];
817 ext[5] = tmpext[5];
818
819 // Perform the threaded boundary marking.
820 MarkStructured mark(input, ext, ghosts, bPoints, bCells, bFaces, self);
821 vtkSMPTools::For(0, numCells, mark);
822
823 return 1;
824}
825
826// Process general datasets
827struct MarkDataSet : MarkCellBoundary

Callers 1

RequestDataMethod · 0.85

Calls 4

GetDataObjectTypeMethod · 0.80
ForFunction · 0.50
GetNumberOfCellsMethod · 0.45
GetExtentMethod · 0.45

Tested by

no test coverage detected