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

Method ReadPieceData

IO/XML/vtkXMLPUnstructuredDataReader.cxx:311–337  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

309
310//------------------------------------------------------------------------------
311int vtkXMLPUnstructuredDataReader::ReadPieceData()
312{
313 // Use the internal reader to read the piece.
314 this->PieceReaders[this->Piece]->UpdatePiece(0, 1, this->UpdateGhostLevel);
315
316 vtkPointSet* input = this->GetPieceInputAsPointSet(this->Piece);
317 vtkPointSet* output = vtkPointSet::SafeDownCast(this->GetCurrentOutput());
318
319 // If there are some points, but no PPoints element, report the
320 // error.
321 if (!this->PPointsElement && (this->GetNumberOfPoints() > 0))
322 {
323 vtkErrorMacro("Could not find PPoints element with 1 array.");
324 return 0;
325 }
326
327 if (!input->GetPoints())
328 {
329 return 0;
330 }
331
332 // Copy the points array.
333 this->CopyArrayForPoints(input->GetPoints()->GetData(), output->GetPoints()->GetData());
334
335 // Let the superclass read the data it wants.
336 return this->Superclass::ReadPieceData();
337}
338
339//------------------------------------------------------------------------------
340void vtkXMLPUnstructuredDataReader::CopyArrayForPoints(

Callers

nothing calls this directly

Calls 7

GetNumberOfPointsMethod · 0.95
CopyArrayForPointsMethod · 0.95
UpdatePieceMethod · 0.80
GetCurrentOutputMethod · 0.80
GetPointsMethod · 0.45
GetDataMethod · 0.45

Tested by

no test coverage detected