------------------------------------------------------------------------------
| 111 | |
| 112 | //------------------------------------------------------------------------------ |
| 113 | void vtkXMLStructuredGridReader::SetupOutputData() |
| 114 | { |
| 115 | this->Superclass::SetupOutputData(); |
| 116 | |
| 117 | // Create the points array. |
| 118 | vtkPoints* points = vtkPoints::New(); |
| 119 | |
| 120 | // Use the configuration of the first piece since all are the same. |
| 121 | vtkXMLDataElement* ePoints = this->PointElements[0]; |
| 122 | if (ePoints) |
| 123 | { |
| 124 | // Non-zero volume. |
| 125 | vtkAbstractArray* aa = this->CreateArray(ePoints->GetNestedElement(0)); |
| 126 | vtkDataArray* a = vtkArrayDownCast<vtkDataArray>(aa); |
| 127 | if (a) |
| 128 | { |
| 129 | // Allocate the points array. |
| 130 | a->SetNumberOfTuples(this->GetNumberOfPoints()); |
| 131 | points->SetData(a); |
| 132 | a->Delete(); |
| 133 | } |
| 134 | else |
| 135 | { |
| 136 | if (aa) |
| 137 | { |
| 138 | aa->Delete(); |
| 139 | } |
| 140 | this->DataError = 1; |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | vtkStructuredGrid::SafeDownCast(this->GetCurrentOutput())->SetPoints(points); |
| 145 | points->Delete(); |
| 146 | } |
| 147 | |
| 148 | //------------------------------------------------------------------------------ |
| 149 | int vtkXMLStructuredGridReader::ReadPieceData() |
nothing calls this directly
no test coverage detected