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

Method SetupOutputInformation

IO/XML/vtkXMLDataReader.cxx:96–134  ·  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

94// Note that any changes (add or removing information) made to this method
95// should be replicated in CopyOutputInformation
96void 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//------------------------------------------------------------------------------
137void vtkXMLDataReader::CopyOutputInformation(vtkInformation* outInfo, int port)

Callers 1

RequestInformationMethod · 0.45

Calls 6

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

Tested by

no test coverage detected