This is a python friendly wrapper of a vtkDataSet that defines a few useful properties.
| 1350 | Points = property(GetPoints, None, None, "This property returns the points of the dataset.") |
| 1351 | |
| 1352 | class DataSet(DataObject): |
| 1353 | """This is a python friendly wrapper of a vtkDataSet that defines |
| 1354 | a few useful properties.""" |
| 1355 | |
| 1356 | def GetPointData(self): |
| 1357 | "Returns the point data as a DataSetAttributes instance." |
| 1358 | return self.GetAttributes(ArrayAssociation.POINT) |
| 1359 | |
| 1360 | def GetCellData(self): |
| 1361 | "Returns the cell data as a DataSetAttributes instance." |
| 1362 | return self.GetAttributes(ArrayAssociation.CELL) |
| 1363 | |
| 1364 | def HasAttributes(self, type): |
| 1365 | "Returns if current object support this attributes type" |
| 1366 | return type == ArrayAssociation.POINT or type == ArrayAssociation.CELL or DataObject.HasAttributes(self, type) |
| 1367 | |
| 1368 | PointData = property(GetPointData, None, None, "This property returns the point data of the dataset.") |
| 1369 | CellData = property(GetCellData, None, None, "This property returns the cell data of a dataset.") |
| 1370 | |
| 1371 | class PointSet(DataSet): |
| 1372 | """This is a python friendly wrapper of a vtkPointSet that defines |