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

Method SetupOutputInformation

IO/XML/vtkXMLPDataReader.cxx:159–197  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Note that any changes (add or removing information) made to this method should be replicated in CopyOutputInformation

Source from the content-addressed store, hash-verified

157// Note that any changes (add or removing information) made to this method
158// should be replicated in CopyOutputInformation
159void 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//------------------------------------------------------------------------------
200void vtkXMLPDataReader::CopyOutputInformation(vtkInformation* outInfo, int port)

Callers

nothing calls this directly

Calls 6

SetFieldDataInfoMethod · 0.80
DeleteMethod · 0.65
GetNumberOfPointsMethod · 0.45
SetMethod · 0.45
GetNumberOfCellsMethod · 0.45

Tested by

no test coverage detected