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

Function WrapDataObject

Wrapping/Python/vtkmodules/numpy_interface/dataset_adapter.py:1480–1501  ·  view source on GitHub ↗

Returns a Numpy friendly wrapper of a vtkDataObject.

(ds)

Source from the content-addressed store, hash-verified

1478 BondData = property(GetBondData, None, None, "This property returns the bond data of the molecule.")
1479
1480def WrapDataObject(ds):
1481 """Returns a Numpy friendly wrapper of a vtkDataObject."""
1482 if ds.IsA("vtkPolyData"):
1483 return PolyData(ds)
1484 elif ds.IsA("vtkUnstructuredGrid"):
1485 return UnstructuredGrid(ds)
1486 elif ds.IsA("vtkPointSet"):
1487 return PointSet(ds)
1488 elif ds.IsA("vtkDataSet"):
1489 return DataSet(ds)
1490 elif ds.IsA("vtkCompositeDataSet"):
1491 return CompositeDataSet(ds)
1492 elif ds.IsA("vtkTable"):
1493 return Table(ds)
1494 elif ds.IsA("vtkMolecule"):
1495 return Molecule(ds)
1496 elif ds.IsA("vtkGraph"):
1497 return Table(ds)
1498 elif ds.IsA("vtkHyperTreeGrid"):
1499 return HyperTreeGrid(ds)
1500 elif ds.IsA("vtkDataObject"):
1501 return DataObject(ds)

Callers 3

DataSetMethod · 0.85
__next__Method · 0.85
__next__Method · 0.85

Calls 10

CompositeDataSetClass · 0.85
HyperTreeGridClass · 0.85
DataObjectClass · 0.85
IsAMethod · 0.80
PolyDataClass · 0.70
UnstructuredGridClass · 0.70
PointSetClass · 0.70
DataSetClass · 0.70
TableClass · 0.70
MoleculeClass · 0.70

Tested by

no test coverage detected