| 67 | } |
| 68 | |
| 69 | bool 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 | |
| 103 | bool vtkUnstructuredGridToCellGrid::TranscribeQuery::SumOutputCounts() |
| 104 | { |
nothing calls this directly
no test coverage detected