------------------------------------------------------------------------------ Note that any changes (add or removing information) made to this method should be replicated in CopyOutputInformation
| 157 | // Note that any changes (add or removing information) made to this method |
| 158 | // should be replicated in CopyOutputInformation |
| 159 | void vtkXMLPDataReader::SetupOutputInformation(vtkInformation* outInfo) |
| 160 | { |
| 161 | if (this->InformationError) |
| 162 | { |
| 163 | vtkErrorMacro("Should not still be processing output information if have set InformationError"); |
| 164 | return; |
| 165 | } |
| 166 | |
| 167 | // Initialize DataArraySelections to anable all that are present |
| 168 | this->SetDataArraySelections(this->PPointDataElement, this->PointDataArraySelection); |
| 169 | this->SetDataArraySelections(this->PCellDataElement, this->CellDataArraySelection); |
| 170 | |
| 171 | // Setup the Field Information for PointData. We only need the |
| 172 | // information from one piece because all pieces have the same set of arrays. |
| 173 | vtkInformationVector* infoVector = nullptr; |
| 174 | if (!this->SetFieldDataInfo(this->PPointDataElement, vtkDataObject::FIELD_ASSOCIATION_POINTS, |
| 175 | this->GetNumberOfPoints(), infoVector)) |
| 176 | { |
| 177 | return; |
| 178 | } |
| 179 | if (infoVector) |
| 180 | { |
| 181 | outInfo->Set(vtkDataObject::POINT_DATA_VECTOR(), infoVector); |
| 182 | infoVector->Delete(); |
| 183 | } |
| 184 | |
| 185 | // now the Cell data |
| 186 | infoVector = nullptr; |
| 187 | if (!this->SetFieldDataInfo(this->PCellDataElement, vtkDataObject::FIELD_ASSOCIATION_CELLS, |
| 188 | this->GetNumberOfCells(), infoVector)) |
| 189 | { |
| 190 | return; |
| 191 | } |
| 192 | if (infoVector) |
| 193 | { |
| 194 | outInfo->Set(vtkDataObject::CELL_DATA_VECTOR(), infoVector); |
| 195 | infoVector->Delete(); |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | //------------------------------------------------------------------------------ |
| 200 | void vtkXMLPDataReader::CopyOutputInformation(vtkInformation* outInfo, int port) |
nothing calls this directly
no test coverage detected