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

Method ExportLegacyFormat

Common/DataModel/vtkCellArray.cxx:1449–1468  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1447
1448//------------------------------------------------------------------------------
1449void vtkCellArray::ExportLegacyFormat(vtkIdTypeArray* data)
1450{
1451 vtkIdType size;
1452 this->Dispatch(GetLegacyDataSizeImpl{}, size);
1453 data->Allocate(size);
1454
1455 auto it = vtk::TakeSmartPointer(this->NewIterator());
1456
1457 vtkIdType cellSize;
1458 const vtkIdType* cellPoints;
1459 for (it->GoToFirstCell(); !it->IsDoneWithTraversal(); it->GoToNextCell())
1460 {
1461 it->GetCurrentCell(cellSize, cellPoints);
1462 data->InsertNextValue(cellSize);
1463 for (vtkIdType i = 0; i < cellSize; ++i)
1464 {
1465 data->InsertNextValue(cellPoints[i]);
1466 }
1467 }
1468}
1469
1470//------------------------------------------------------------------------------
1471void vtkCellArray::ImportLegacyFormat(vtkIdTypeArray* data)

Callers 13

GetDataMethod · 0.95
WriteMethod · 0.80
GetFacesMethod · 0.80
TestPolyhedron0Function · 0.80
TestPolyhedralCellsInUGFunction · 0.80
ToJsonMethod · 0.80

Calls 6

NewIteratorMethod · 0.95
GoToNextCellMethod · 0.80
DispatchMethod · 0.45
AllocateMethod · 0.45
IsDoneWithTraversalMethod · 0.45
InsertNextValueMethod · 0.45