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

Method Finalize

Filters/CellGrid/vtkUnstructuredGridToCellGrid.cxx:69–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69bool vtkUnstructuredGridToCellGrid::TranscribeQuery::Finalize()
70{
71 switch (this->Phase)
72 {
73 case VTK_TRANSCRIBE_CELLGRID_PHASE_CLAIM:
74 {
75 // TODO: Identify whether any cell types are unclaimed and warn or fail as configured.
76
77 // Create cell-attribute instances on output to match input point- and cell-data arrays.
78 // Also, create a "shape" cell-attribute instance for the geometry.
79 vtkNew<vtkCellAttribute> shape;
80 // NB: These values are hardwired for now. In the future, we should examine the
81 // claimed cell types and choose something appropriate.
82 shape->Initialize("shape", "ℝ³", 3);
83 this->Output->SetShapeAttribute(shape);
84 this->Coordinates = this->Input->GetPoints()->GetData();
85 if (this->Coordinates)
86 {
87 if (!this->Coordinates->GetName() || !this->Coordinates->GetName()[0])
88 {
89 this->Coordinates->SetName("points");
90 }
91 this->Output->GetAttributes("coordinates"_token)->SetVectors(this->Coordinates);
92 }
93 }
94 break;
95 case VTK_TRANSCRIBE_CELLGRID_PHASE_CONVERT:
96 this->Input = nullptr;
97 this->Output = nullptr;
98 break;
99 }
100 return true;
101}
102
103bool vtkUnstructuredGridToCellGrid::TranscribeQuery::SumOutputCounts()
104{

Callers

nothing calls this directly

Calls 8

SetShapeAttributeMethod · 0.80
SetVectorsMethod · 0.80
InitializeMethod · 0.45
GetDataMethod · 0.45
GetPointsMethod · 0.45
GetNameMethod · 0.45
SetNameMethod · 0.45
GetAttributesMethod · 0.45

Tested by

no test coverage detected