------------------------------------------------------------------------------ Note that any changes (add or removing information) made to this method should be replicated in CopyOutputInformation
| 94 | // Note that any changes (add or removing information) made to this method |
| 95 | // should be replicated in CopyOutputInformation |
| 96 | void vtkXMLDataReader::SetupOutputInformation(vtkInformation* outInfo) |
| 97 | { |
| 98 | if (this->InformationError) |
| 99 | { |
| 100 | vtkErrorMacro("Should not still be processing output information if have set InformationError"); |
| 101 | return; |
| 102 | } |
| 103 | |
| 104 | // Initialize DataArraySelections to enable all that are present |
| 105 | this->SetDataArraySelections(this->PointDataElements[0], this->PointDataArraySelection); |
| 106 | this->SetDataArraySelections(this->CellDataElements[0], this->CellDataArraySelection); |
| 107 | |
| 108 | // Setup the Field Information for PointData. We only need the |
| 109 | // information from one piece because all pieces have the same set of arrays. |
| 110 | vtkInformationVector* infoVector = nullptr; |
| 111 | if (!this->SetFieldDataInfo(this->PointDataElements[0], vtkDataObject::FIELD_ASSOCIATION_POINTS, |
| 112 | this->GetNumberOfPoints(), infoVector)) |
| 113 | { |
| 114 | return; |
| 115 | } |
| 116 | if (infoVector) |
| 117 | { |
| 118 | outInfo->Set(vtkDataObject::POINT_DATA_VECTOR(), infoVector); |
| 119 | infoVector->Delete(); |
| 120 | } |
| 121 | |
| 122 | // now the Cell data |
| 123 | infoVector = nullptr; |
| 124 | if (!this->SetFieldDataInfo(this->CellDataElements[0], vtkDataObject::FIELD_ASSOCIATION_CELLS, |
| 125 | this->GetNumberOfCells(), infoVector)) |
| 126 | { |
| 127 | return; |
| 128 | } |
| 129 | if (infoVector) |
| 130 | { |
| 131 | outInfo->Set(vtkDataObject::CELL_DATA_VECTOR(), infoVector); |
| 132 | infoVector->Delete(); |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | //------------------------------------------------------------------------------ |
| 137 | void vtkXMLDataReader::CopyOutputInformation(vtkInformation* outInfo, int port) |
no test coverage detected