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

Method SetupOutputData

IO/XML/vtkXMLPUnstructuredDataReader.cxx:144–171  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

142
143//------------------------------------------------------------------------------
144void vtkXMLPUnstructuredDataReader::SetupOutputData()
145{
146 this->Superclass::SetupOutputData();
147
148 // Create the points array.
149 vtkPoints* points = vtkPoints::New();
150 if (this->PPointsElement)
151 {
152 vtkAbstractArray* aa = this->CreateArray(this->PPointsElement->GetNestedElement(0));
153 vtkDataArray* a = vtkArrayDownCast<vtkDataArray>(aa);
154 if (a)
155 {
156 a->SetNumberOfTuples(this->GetNumberOfPoints());
157 points->SetData(a);
158 a->Delete();
159 }
160 else
161 {
162 if (aa)
163 {
164 aa->Delete();
165 }
166 this->DataError = 1;
167 }
168 }
169 vtkPointSet::SafeDownCast(this->GetCurrentOutput())->SetPoints(points);
170 points->Delete();
171}
172
173//------------------------------------------------------------------------------
174void vtkXMLPUnstructuredDataReader::SetupUpdateExtent(int piece, int numberOfPieces, int ghostLevel)

Callers

nothing calls this directly

Calls 9

GetNumberOfPointsMethod · 0.95
GetNestedElementMethod · 0.80
GetCurrentOutputMethod · 0.80
DeleteMethod · 0.65
NewFunction · 0.50
CreateArrayMethod · 0.45
SetNumberOfTuplesMethod · 0.45
SetDataMethod · 0.45
SetPointsMethod · 0.45

Tested by

no test coverage detected